0013074: some context menu entries missing
[tine20] / tine20 / Tinebase / js / widgets / grid / GridPanel.js
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'