Advertisement
peterb

MODX Revolution remember ExtJS tab state

Nov 22nd, 2011
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. In your tab panel definition (you know, the object with "xtype: 'modx-tabs'" in it) add the following lines to have the active tab remembered:
  3.  
  4. Tested on MODX Revolution 2.1.5-pl
  5. */
  6.  
  7. // Copied from modx.layout.js
  8. ,activeTab: 0
  9. ,stateful: true
  10. ,stateId: 'modx-ima_graph-state'
  11. ,stateEvents: ['tabchange']
  12. ,getState:function() {
  13.     return {
  14.         activeTab:this.items.indexOf(this.getActiveTab())
  15.     };
  16. }
  17. // End copied from modx.layout.js
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement