]> git.proxmox.com Git - pve-manager.git/commitdiff
ui/Parser: printPropertyString: simplify and always put defaultKey values first
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 2 Aug 2018 14:00:56 +0000 (16:00 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 2 Aug 2018 14:20:12 +0000 (16:20 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
www/manager6/Parser.js

index 3300a078013fc5c112e99066886d4bb0f09c6c28..f63ccdabc95a2d6a9a28a424620b670ccd3ffc45 100644 (file)
@@ -77,13 +77,11 @@ Ext.define('PVE.Parser', { statics: {
        var stringparts = [];
 
        Ext.Object.each(data, function(key, value) {
-           var keystring = '' ;
-           if (key === defaultKey) {
-               keystring = '';
+           if (defaultKey !== undefined && key === defaultKey) {
+               stringparts.unshift(value);
            } else {
-               keystring = key + '=';
+               stringparts.push(key + '=' + value);
            }
-           stringparts.push(keystring+value);
        });
 
        return stringparts.join(',');