0013074: some context menu entries missing
authorMichael Spahn <m.spahn@metaways.de>
Tue, 16 May 2017 11:39:41 +0000 (13:39 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Tue, 16 May 2017 14:05:33 +0000 (16:05 +0200)
https://forge.tine20.org/view.php?id=13074

Change-Id: I57ed7385f4e40fc02b2f7180bd2dadd766652e69
Reviewed-on: http://gerrit.tine20.com/customers/4678
Reviewed-by: Michael Spahn <m.spahn@metaways.de>
Tested-by: Michael Spahn <m.spahn@metaways.de>
Tested-by: Jenkins CI (http://ci.tine20.com/)
Tested-by: Philipp Schüle <p.schuele@metaways.de>
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Filemanager/js/FilePicker.js
tine20/Tinebase/js/widgets/grid/GridPanel.js

index b3b179d..709a01e 100644 (file)
@@ -192,7 +192,7 @@ Tine.Filemanager.FilePicker = Ext.extend(Ext.Container, {
             enableDrag: false,
             treePanel: this.getTreePanel(),
             hasQuickSearchFilterToolbarPlugin: false,
-            stateIdPrefix: '-FilePicker',
+            stateIdSuffix: '-FilePicker',
             plugins: [this.getTreePanel().getFilterPlugin()]
         });
 
index 420498b..9ba02ed 100644 (file)
@@ -35,15 +35,9 @@ Tine.widgets.grid.GridPanel = function(config) {
         limit: 50
     };
 
-    var stateIdPrefix = '';
-
-    if (config.hasOwnProperty('stateIdPrefix')) {
-        stateIdPrefix = config.stateIdPrefix;
-    }
-
     // autogenerate stateId
     if (this.stateful !== false && ! this.stateId) {
-        this.stateId = this.recordClass.getMeta('appName') + '-' + this.recordClass.getMeta('recordName') + '-GridPanel' + stateIdPrefix;
+        this.stateId = this.recordClass.getMeta('appName') + '-' + this.recordClass.getMeta('recordName') + '-GridPanel';
     }
 
     if (this.stateId && Ext.isTouchDevice) {
@@ -355,7 +349,7 @@ Ext.extend(Tine.widgets.grid.GridPanel, Ext.Panel, {
     border: false,
     stateful: true,
 
-    stateIdPrefix: null,
+    stateIdSuffix: null,
 
     /**
      * Makes the grid readonly, this means, no dialogs, no actions, nothing else than selection, no dbclick
@@ -1389,7 +1383,7 @@ Ext.extend(Tine.widgets.grid.GridPanel, Ext.Panel, {
 
         if (this.stateful) {
             this.gridConfig.stateful = true;
-            this.gridConfig.stateId  = this.stateId + '-Grid';
+            this.gridConfig.stateId  = this.stateId + '-Grid' + this.stateIdSuffix;
         }
 
         this.grid = new Grid(Ext.applyIf(this.gridConfig, {
@@ -1677,7 +1671,7 @@ Ext.extend(Tine.widgets.grid.GridPanel, Ext.Panel, {
                 items: [],
                 plugins: [{
                     ptype: 'ux.itemregistry',
-                    key:   this.app.appName + '-' + this.recordClass.prototype.modelName + '-GridPanel-ContextMenu-New' + this.stateIdPrefix
+                    key:   this.app.appName + '-' + this.recordClass.prototype.modelName + '-GridPanel-ContextMenu-New'
                 }]
             });
 
@@ -1696,7 +1690,7 @@ Ext.extend(Tine.widgets.grid.GridPanel, Ext.Panel, {
                 items: [],
                 plugins: [{
                     ptype: 'ux.itemregistry',
-                    key:   this.app.appName + '-' + this.recordClass.prototype.modelName + '-GridPanel-ContextMenu-Add' + this.stateIdPrefix
+                    key:   this.app.appName + '-' + this.recordClass.prototype.modelName + '-GridPanel-ContextMenu-Add'
                 }]
             });
 
@@ -1714,7 +1708,7 @@ Ext.extend(Tine.widgets.grid.GridPanel, Ext.Panel, {
                 items: items,
                 plugins: [{
                     ptype: 'ux.itemregistry',
-                    key:   this.app.appName + '-' + this.recordClass.prototype.modelName + '-GridPanel-ContextMenu' + this.stateIdPrefix
+                    key:   this.app.appName + '-' + this.recordClass.prototype.modelName + '-GridPanel-ContextMenu'
                 }, {
                     ptype: 'ux.itemregistry',
                     key:   'Tinebase-MainContextMenu'