]> git.proxmox.com Git - proxmox-backup.git/blobdiff - www/DataStorePanel.js
ui: DataStorePanel: save active tab statefully
[proxmox-backup.git] / www / DataStorePanel.js
index 059fd3b2c1a1beac802f1df63f8d680fd0cf5bae..0da943611c880a811fc78999397366e484f566a3 100644 (file)
@@ -10,6 +10,25 @@ Ext.define('PBS.DataStorePanel', {
        };
     },
 
+    stateId: 'pbs-datastore-panel',
+    stateful: true,
+
+    stateEvents: ['tabchange'],
+
+    applyState: function(state) {
+       let me = this;
+       if (state.tab !== undefined) {
+           me.setActiveTab(state.tab);
+       }
+    },
+
+    getState: function() {
+       let me = this;
+       return {
+           tab: me.getActiveTab().getItemId(),
+       };
+    },
+
     border: false,
     defaults: {
        border: false,