]> git.proxmox.com Git - pve-manager.git/commitdiff
do not use applyIf when adding items in initComponent()
authorEmmanuel Kasper <e.kasper@proxmox.com>
Thu, 3 Mar 2016 13:43:22 +0000 (14:43 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 4 Mar 2016 05:17:33 +0000 (06:17 +0100)
our parent class Ext.grid.GridPanel sets 'tbar: null'
and Ext.applyIf() will only apply our property
if it is undefined, so switch to Ext.apply()

it is safe to use Ext.apply() because none of these classes is further extended,
so we don't have to worry that might me might override a toolbar
set further down by a child class

this fixes allows the panel to display its top toolbar with add/edit buttons

www/manager6/lxc/DNS.js
www/manager6/lxc/Network.js
www/manager6/lxc/Options.js
www/manager6/lxc/Resources.js

index 55205b40916f5e7a705766601f6f946f8c59b114..dd5e45afc6361a30d16b4dee709aee0366feace2 100644 (file)
@@ -258,7 +258,7 @@ Ext.define('PVE.lxc.DNS', {
            edit_btn.setDisabled(!rowdef.editor);
        };
 
-       Ext.applyIf(me, {
+       Ext.apply(me, {
            url: "/api2/json/nodes/" + nodename + "/lxc/" + vmid + "/config",
            selModel: sm,
            cwidth1: 150,
index 7d152cc8172427b92206955289005c25f58a55d0..211fddc9aa0642719b59829fcaa84510b1af63c3 100644 (file)
@@ -448,7 +448,7 @@ Ext.define('PVE.lxc.NetworkView', {
            handler: run_editor
        });
 
-       Ext.applyIf(me, {
+       Ext.apply(me, {
            store: store,
            selModel: sm,
            stateful: false,
index fffd8e78a8f6191944ebe0d734a0b9ea2e273d70..4408114f241cbb9459b84a10b2ef8b7054abffc2 100644 (file)
@@ -188,7 +188,7 @@ Ext.define('PVE.lxc.Options', {
            handler: run_editor
        });
 
-       Ext.applyIf(me, {
+       Ext.apply(me, {
            url: "/api2/json/nodes/" + nodename + "/lxc/" + vmid + "/config",
            selModel: sm,
            cwidth1: 150,
index 2a0247d96aed5ccab9a03e62e928a5065deb7e65..ae9d3583b7141dddd2cf07677d34508d2370e8b7 100644 (file)
@@ -237,7 +237,7 @@ Ext.define('PVE.lxc.RessourceView', {
 
        };
        
-       Ext.applyIf(me, {
+       Ext.apply(me, {
            url: '/api2/json/' + baseurl,
            selModel: sm,
            cwidth1: 170,