AJAX File Browser Panels Customization
In AJAX File Browser you can customize panels visibility, you can find the example here.
Panels Visibility
IT Hit AJAX File Browser consists of 6 panels: Toolbar, Address bar, Folders panel, Files View panel, Upload panel and Upload Progress panel. You can specify the visibility of these panels while creating the control or later change visibility at runtime. To specify panels visibility while creating the control use the Panels property of AJAX File Browser Settings Object:
var settings = { BasePath: '/', // path to ajax file browser files Id: 'AjaxFileBrowserContainer', // ID of the parent control Url: 'http://webdavserver.com', // the root folder to be displayed Style: 'height: 100%; width: 100%', MsOfficeTemplatesPath: 'http://webdavserver.com/MSOfficeTemplates/', SelectedFolder: '/Pictures', // folder to be selected Panels: { Folders: { Show: false }, FilesView: { Show: true }, Toolbar: { Show: true }, AddressBar: { Show: true }, UploadPanel: { Show: false }, UploadProgressPanel: { Show: false } } }; var ajaxFileBrowserLoader = new ITHit.WebDAV.Client.AjaxFileBrowserLoader(settings);
As you can see each panel has a Show property that specifies panel visibility. To manage panels visibility at runtime AJAX File Browser provides following methods:
- Folders panel: SetShowFolders() / GetShowFolders()
- Files View panel: GetShowFilesView() / SetShowFilesView()
- Toolbar: SetShowToolbar() / GetShowToolbar()
- Address Bar: SetShowAddressBar() / GetShowAddressBar()
- Upload panel: SetShowUploadPanel() / GetShowUploadPanel()
- Upload Progress panel: SetShowUploadProgressPanel() / GetShowUploadProgressPanel()
For example to hide and show Folders panel use SetShowFolders method:
var loader = new ITHit.WebDAV.Client.AjaxFileBrowserLoader(settings); loader.oninit = function (ajaxBrowser) { // This event is fired when control is loaded and created. ajaxFileBrowser = ajaxBrowser; ajaxFileBrowser.SetShowFolders(false); }; loader.LoadAsync(); // starts loading Ajax File Browser files asynchronously
To read folders visibility use the GetShowFolders() method.