The Browser Plugin
In this guide we give an overview about:
- What is this plugin used for
- How you can use and
- How you cann Extend it
This guide is currently work-in-progress.
1 What the Browser Plugin can do for you?
The Browser Plugin (Browser) provides a good possibility for users to browse, search and select any kind of files in repositories.
These are some specific kinds of files the user can look for:
- Websites
- Images
- Folders
- etc..
2 Extending the Browser for your needs
2.1 Using Configuration
Here we can see the default options:
var options = jQuery.extend({ // Set to true for development and debugging verbose : false, // The repository manager which this browser will interface with repositoryManager : null, repositoryFilter : [], objectTypeFilter : [], renditionFilter : ['cmis:none'], // ['*'] filter : ['url'], // DOMObject to which this instance of browser is bound to element : undefined, // root folder id rootFolderId : 'aloha', // root path to where Browser resources are located rootPath : '', treeWidth : 300, listWidth : 'auto', pageSize : 10, columns : { icon : {title: '', width: 30, sortable: false, resizable: false}, name : {title: i18n.t('Name'), width: 250, sorttype: 'text'}, url : {title: i18n.t('URL'), width: 250, sorttype: 'text'}, preview : {title: i18n.t('Preview'), width: 200, sorttype: 'text'} }, isFloating : false }, opts || {});
2.2 Build your own specific Extension
Basically you are able override every function, for example the init() to use custom options:
var MyCustomBrowser = Browser.extend({ init: function (config, oneMoreParameter) { this._super(config); this.moreParameter = oneMoreParameter; ... do something with it } })
2.2.1 Customize table rows and columns
3 Capability for multiple Instances
In the current version (0.20) there is the possibility to add multiple browser instances to a page.
- November 24, 2011: Initial version by Leonard Osang