2017-04-20 13:49:55 +02:00
|
|
|
Ext.namespace('Zarafa.plugins.mdm.ui');
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @class Zarafa.plugins.mdm.ui.MDMHierarchyTreePanel
|
|
|
|
* @extends Zarafa.hierarchy.ui.Tree
|
|
|
|
* @xtype mdm.hierarchytree
|
|
|
|
*
|
|
|
|
* MDMHierarchyTreePanel for hierachy list in the
|
|
|
|
* {@link Zarafa.plugins.mdm.dialogs.MDMManageSharedFolderPanel manageSharedFolderPanel}.
|
|
|
|
*/
|
|
|
|
Zarafa.plugins.mdm.ui.MDMHierarchyTreePanel = Ext.extend(Zarafa.hierarchy.ui.Tree, {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @constructor
|
|
|
|
* @param {Object} config Configuration object
|
|
|
|
*/
|
|
|
|
constructor : function(config)
|
|
|
|
{
|
|
|
|
Zarafa.plugins.mdm.ui.MDMHierarchyTreePanel.superclass.constructor.call(this, config);
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Function will initialize {@link Zarafa.hierarchy.ui.Tree Tree} and creates a
|
|
|
|
* {@link Zarafa.common.ui.LoadMask} if {@link Zarafa.hierarchy.ui.Tree Tree} is intantiated as full tree.
|
|
|
|
* @protected
|
|
|
|
*/
|
|
|
|
initComponent : function()
|
|
|
|
{
|
|
|
|
// Intialize the loader
|
|
|
|
if (!this.loader) {
|
|
|
|
this.loader = new Zarafa.plugins.mdm.data.MDMHierarchyTreeLoader({
|
|
|
|
tree : this,
|
|
|
|
store : this.store,
|
|
|
|
nodeConfig : this.nodeConfig,
|
|
|
|
deferredLoading : this.deferredLoading
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
// call parent
|
|
|
|
Zarafa.plugins.mdm.ui.MDMHierarchyTreePanel.superclass.initComponent.apply(this, arguments);
|
2017-09-13 14:12:57 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The filter which is applied for filtering nodes from the
|
|
|
|
* {@link Zarafa.hierarchy.ui.Tree HierarchyTree}.
|
|
|
|
* It will hide own user store.
|
|
|
|
*
|
|
|
|
* @param {Object} folder the folder to filter
|
|
|
|
* @return {Boolean} true to accept the folder
|
|
|
|
*/
|
|
|
|
nodeFilter: function (folder)
|
|
|
|
{
|
|
|
|
var hide = Zarafa.plugins.mdm.ui.MDMHierarchyTreePanel.superclass.nodeFilter.apply(this, arguments);
|
|
|
|
|
|
|
|
if(hide && this.hideOwnTree) {
|
|
|
|
hide = !folder.getMAPIStore().isDefaultStore();
|
|
|
|
}
|
|
|
|
|
|
|
|
return hide;
|
2017-04-20 13:49:55 +02:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
Ext.reg('mdm.hierarchytree', Zarafa.plugins.mdm.ui.MDMHierarchyTreePanel);
|