b0e809afba108d35c261baa51c30d481a1c6dcc4
[tine20] / tine20 / MailFiler / js / NodeTreePanel.js
1 /*
2  * Tine 2.0
3  * 
4  * @package     Tinebase
5  * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
6  * @author      Philipp Schüle <p.schuele@metaways.de>
7  * @copyright   Copyright (c) 2010-2017 Metaways Infosystems GmbH (http://www.metaways.de)
8  */
9
10 Ext.ns('Tine.MailFiler');
11
12 require('./nodeContextMenu');
13
14 Tine.MailFiler.NodeTreePanel = Ext.extend(Tine.Filemanager.NodeTreePanel, {
15     recordClass : Tine.MailFiler.Model.Node,
16     enableDD: false,
17
18     /**
19      * initiates tree context menus
20      *
21      * @private
22      */
23     initContextMenu: function() {
24         this.ctxMenu = Tine.MailFiler.nodeContextMenu.getMenu({
25             actionMgr: Tine.MailFiler.nodeActionsMgr,
26             nodeName: this.recordClass.getContainerName(),
27             actions: ['reload', 'createFolder', 'delete', 'rename', 'move' /* ? */, 'edit'],
28             scope: this,
29             backend: 'MailFiler',
30             backendModel: 'Node'
31         });
32
33         this.actionUpdater = new Tine.widgets.ActionUpdater({
34             actions: this.ctxMenu.items
35         });
36     }
37 });