Commits

Sebastian Sdorra  committed 19ff56e

keep same repository group id after logout and re login

  • Participants
  • Parent commits 468ace0
  • Branches issue-268

Comments (0)

Files changed (2)

File scm-webapp/src/main/webapp/resources/js/override/ext.grid.groupingview.js

 Ext.override(Ext.grid.GroupingView,{
   
   storedState: null,
+  idPrefix: '{grid.el.id}',
   
   initTemplates : function(){
     this.initTemplatesExt();
   
   applyState: function(state){
     this.storedState = state;
+  },
+  
+  getPrefix: function(field){
+    var prefix;
+    if ( this.idPrefix == '{grid.id}' ){
+      prefix = this.grid.getId();
+    } else if (this.idPrefix == '{grid.el.id}') {
+      prefix = this.grid.getGridEl().id;
+    } else {
+      prefix = this.idPrefix;
+    }
+    prefix += '-gp-' + field + '-';
+    return prefix;
   }
   
 });

File scm-webapp/src/main/webapp/resources/js/repository/sonia.repository.grid.js

         }
       },
       view: new Ext.grid.GroupingView({
+        idPrefix: '{grid.id}',
         enableGrouping: ! state.clientConfig.disableGroupingGrid,
         enableNoGroups: false,
         forceFit: true,