]> git.proxmox.com Git - proxmox-widget-toolkit.git/commitdiff
change time of startupdate
authorDominik Csapak <d.csapak@proxmox.com>
Wed, 5 Apr 2017 07:25:50 +0000 (09:25 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 5 Apr 2017 07:43:19 +0000 (09:43 +0200)
because these components are not always children of
a tabpanel or standalone, we cannot use activate here
else we do not trigger the startupdate

disadvantage: when used as a child of a tabpanel,
it starts immediately instead of when clicking on the tab

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
node/DNSView.js
node/NetworkView.js
node/TimeView.js

index 3c608dbfdca1931e34764895c1fbb739c0c1f92d..442752a07295aacac3dab5d4a1f51ca9a516edd6 100644 (file)
@@ -39,7 +39,7 @@ Ext.define('Proxmox.node.DNSView', {
 
        me.callParent();
 
-       me.on('activate', me.rstore.startUpdate);
        me.on('destroy', me.rstore.stopUpdate);
+       me.rstore.startUpdate();
     }
 });
index 22265b9cd1efc9295f0ed06f385461046df747e6..84996108e62b35e855b38ea0d4d03330796a63d3 100644 (file)
@@ -345,11 +345,9 @@ Ext.define('Proxmox.node.NetworkView', {
                    html: gettext("No changes")
                }
            ],
-           listeners: {
-               activate: reload
-           }
        });
 
        me.callParent();
+       reload();
     }
 });
index 6c79e2bdd74885fcf575b56023d984509a20cb9b..1327b801b4919282d927dc5d0d916b315758388a 100644 (file)
@@ -50,7 +50,12 @@ Ext.define('Proxmox.node.TimeView', {
 
        me.callParent();
 
-       me.on('activate', me.rstore.startUpdate);
-       me.on('destroy', me.rstore.stopUpdate); 
+       me.rstore.startUpdate();
+    },
+
+    onDestroy: function() {
+       var me = this;
+       me.rstore.stopUpdate();
+       me.callParent();
     }
 });