|
| 1 | + |
| 2 | +<!DOCTYPE html> |
| 3 | +<html lang="en"> |
| 4 | + <head> |
| 5 | + <title>IT Hit Ajax File Browser</title> |
| 6 | + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| 7 | + <meta name="viewport" content="width=device-width, initial-scale=1"> |
| 8 | + <meta http-equiv="X-UA-Compatible" content="IE=Edge" /> |
| 9 | + |
| 10 | + <style type='text/css'> |
| 11 | + html, body { margin: 0px; padding: 0px; width: 100%; height: 100%; } |
| 12 | + </style> |
| 13 | + <!-- |
| 14 | + JavaScript file, styles and images required to run Ajax File Browser are loaded from IT Hit website. |
| 15 | + To load files from your website download them here: http://www.webdavsystem.com/ajaxfilebrowser/download, |
| 16 | + deploy them to your website and replace the 'http://www.ajaxbrowser.com/ITHitService/' path in this file. |
| 17 | + --> |
| 18 | + <script src="http://www.ajaxbrowser.com/ITHitService/AjaxFileBrowser/ITHitAJAXFileBrowserLoader.js" type="text/javascript"></script> |
| 19 | + <script type="text/javascript"> |
| 20 | + |
| 21 | + // This function creates Ajax File Browser |
| 22 | + function InitAjaxFileBrowser() { |
| 23 | + |
| 24 | + var webDavFolderUrl = window.opener != null ? window.opener.webDavFolderUrl : '/'; |
| 25 | + var selectedFolder = window.opener != null ? window.opener.location.href : '/'; |
| 26 | + |
| 27 | + // Customize the look of Ajax File Browser below |
| 28 | + // http://www.webdavsystem.com/ajaxfilebrowser/programming/settings_reference |
| 29 | + var settings = { |
| 30 | + BasePath: 'http://www.ajaxbrowser.com/ITHitService/AjaxFileBrowser/', // (required) path to ajax file browser files (this folder contains ITHitAJAXFileBrowser.js) |
| 31 | + Id: 'AjaxFileBrowserContainer', // (required) ID of the HTML control in which Ajax File Browser will be created |
| 32 | + Url: webDavFolderUrl, // (required) the root folder to be displyed in Ajax File browser |
| 33 | + Style: 'height: 100%; width: 100%', // (required) always provide size of the control |
| 34 | + MsOfficeTemplatesPath: webDavFolderUrl + 'Templates/', // path to MS Office templates, always specify full path including domain: http://server/path/ |
| 35 | + SelectedFolder: selectedFolder, // folder to be selected, same as SetSelectedFolderAsync call |
| 36 | + ThemeName: 'windows_8', // theme name (folder name under /themes/ folder: 'clean', 'golden', etc), see themes here: http://ajaxbrowser.com/?themesdemo |
| 37 | + IconsSize: 16, // icon size: 16, 24, 32, 48, 64, 72 |
| 38 | + Platform: 'auto', // show either desktop or mobile UI: 'desktop', 'tablet', 'mobile', 'auto' |
| 39 | + ShowFolders: true, // show/hide folders in Files View panel |
| 40 | + ViewModeDesktop: 'details', // view mode for desktop UI: 'details', 'medium', 'large', 'extralarge' |
| 41 | + ViewModeMobile: 'list', // view mode for mobile UI: 'list', 'content', 'thumbnail' |
| 42 | + EditModeMobile: 'auto', // show bottom menu in mobile UI: 'auto', 'edit', 'view' |
| 43 | + ShowImagePreview: true, // show thumbnail for images |
| 44 | + ImageTypes: 'png|jpg|jpeg|gif', // show thumbnails for these image types |
| 45 | + SearchAutocompleteEnable: true, // enable auto-complete in search field |
| 46 | + SearchDynamicEnable: true, // update search results list while typing |
| 47 | + NotAllowedCharacters: '\/:*?"<>|', // the list of characters that file and folder names can not contain |
| 48 | + ProgressRefreshTime: 5, // progress refresh time for IE 9 and earlier |
| 49 | + EnableHistoryNavigation: true, // use Back and Forward web browser buttons to navigate through history |
| 50 | + OpenHistoryLink: true, // navigate to path specified in url hash |
| 51 | + ShowContextHelp: true, // show description in icons view, for toolbar buttons and context menus |
| 52 | + |
| 53 | + // The block below is used when opening documents from server with pure cookies authentication. Not required for challenge-response auth (Basic/Digest/NTLM/Kerberos). |
| 54 | + // EditDocAuth: { |
| 55 | + // Authentication: 'cookies', // Authentication to use when opening documents for editing: 'challenge', 'cookies' |
| 56 | + // SearchIn: 'current', // Web browsers to search and copy permanent cookies from: 'сurrent', 'none', 'all'. |
| 57 | + // CookieNames: '.AspNet.ApplicationCookie', // Coma separated list of cookie names to search for. |
| 58 | + // LoginUrl: '/Account/login/' // Login URL to redirect to in case any cookies specified in CookieNames parameter are not found. |
| 59 | + //}, |
| 60 | + Panels: { |
| 61 | + Toolbar: { Show: true }, |
| 62 | + AddressBar: { Show: true }, |
| 63 | + Folders: { Show: true }, |
| 64 | + UploadPanel: { Show: true }, |
| 65 | + FilesView: { |
| 66 | + Show: true, |
| 67 | + Order: ['Icon', 'Name', 'Size', 'Type', 'DateModified'], |
| 68 | + Columns: [ |
| 69 | + { |
| 70 | + Id: 'Icon', |
| 71 | + Show: true |
| 72 | + }, |
| 73 | + { |
| 74 | + Id: 'Name', |
| 75 | + //Text: 'My Caption', |
| 76 | + //Tooltip: 'My Tooltip', |
| 77 | + //CellStyles: { textAlign: 'right', color: 'blue', fontWeight: 'bold' }, |
| 78 | + //HeaderStyles: { textAlign: 'right' }, |
| 79 | + Width: '300px' |
| 80 | + }, |
| 81 | + { |
| 82 | + Id: 'Size', |
| 83 | + Show: true |
| 84 | + }, |
| 85 | + { |
| 86 | + Id: 'Type', |
| 87 | + Show: true |
| 88 | + }, |
| 89 | + { |
| 90 | + Id: 'DateModified', |
| 91 | + Show: true |
| 92 | + } |
| 93 | + ] |
| 94 | + }, |
| 95 | + UploadProgressPanel: { |
| 96 | + Show: true, |
| 97 | + Order: ['Icon', 'Source', 'Destination'], |
| 98 | + Columns: [ |
| 99 | + { |
| 100 | + Id: 'Icon', |
| 101 | + Show: true |
| 102 | + }, |
| 103 | + { |
| 104 | + Id: 'Source', |
| 105 | + Show: false |
| 106 | + }, |
| 107 | + { |
| 108 | + Id: 'Destination', |
| 109 | + //Width: 'auto' |
| 110 | + Show: true |
| 111 | + }, |
| 112 | + { |
| 113 | + Id: 'ProgressBar', |
| 114 | + Show: true, |
| 115 | + Width: '180px' |
| 116 | + }, |
| 117 | + { |
| 118 | + Id: 'Progress', |
| 119 | + Show: true |
| 120 | + }, |
| 121 | + { |
| 122 | + Id: 'Uploaded', |
| 123 | + Show: true |
| 124 | + }, |
| 125 | + { |
| 126 | + Id: 'FileSize', |
| 127 | + Show: true |
| 128 | + }, |
| 129 | + { |
| 130 | + Id: 'Speed', |
| 131 | + Show: true |
| 132 | + }, |
| 133 | + { |
| 134 | + Id: 'TimeLeft', |
| 135 | + Show: true, |
| 136 | + Noresize: 'true' |
| 137 | + }, |
| 138 | + { |
| 139 | + Id: 'TimeElapsed', |
| 140 | + Show: true |
| 141 | + } |
| 142 | + ] |
| 143 | + } |
| 144 | + } |
| 145 | + }; |
| 146 | + |
| 147 | + var ajaxFileBrowserLoader = new ITHit.WebDAV.Client.AjaxFileBrowserLoader(settings); |
| 148 | + ajaxFileBrowserLoader.oninit = function (ajaxFileBrowser) { |
| 149 | + // This event is fired when control is loaded and created. |
| 150 | + // Your code here... |
| 151 | + }; |
| 152 | + ajaxFileBrowserLoader.LoadAsync(); // starts loading Ajax File Browser files asynchronously |
| 153 | + } |
| 154 | + </script> |
| 155 | + </head> |
| 156 | + <body onload="InitAjaxFileBrowser()"> |
| 157 | + <div id="AjaxFileBrowserContainer" class="ih_style" style="width: 100%; height: 100%"></div> |
| 158 | + </body> |
| 159 | +</html> |
0 commit comments