]> git.proxmox.com Git - pve-manager-legacy.git/commitdiff
jslint: fix curly braces for if
authorDominik Csapak <d.csapak@proxmox.com>
Fri, 29 Apr 2016 10:06:26 +0000 (12:06 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 29 Apr 2016 15:05:44 +0000 (17:05 +0200)
in one change, there is also a change from object['property']
to object.property which jslint complains about

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
www/manager6/Parser.js
www/manager6/dc/AuthEdit.js
www/manager6/lxc/Network.js

index 18136b70815db3ac82b18fb63bd4090fb6572291..3f15d8f85431e5a4cb2c10a68598d1fd3bd36032 100644 (file)
@@ -6,8 +6,9 @@ Ext.define('PVE.Parser', { statics: {
     // this class only contains static functions
 
     parseBoolean: function(value, default_value) {
-       if (!Ext.isDefined(value))
+       if (!Ext.isDefined(value)) {
            return default_value;
+       }
        value = value.toLowerCase();
        return value === 1 || value === '1' ||
               value === 'on' ||
@@ -407,7 +408,7 @@ Ext.define('PVE.Parser', { statics: {
        var datastr = '';
 
        Ext.Object.each(data, function(key, value) {
-           if (value === '') return;
+           if (value === '') { return; }
            datastr += (datastr !== '' ? ',' : '') + key + '=' + value;
        });
 
@@ -481,8 +482,9 @@ Ext.define('PVE.Parser', { statics: {
        });
 
        if (!cpustr) {
-           if (optstr)
+           if (optstr) {
                return 'kvm64' + optstr;
+           }
            return;
        }
 
index d6ad1b68d9016f8e1d4d501ac966b66264ca7b80..ca305e9377dbc62e66f257dc4c2bf3f1901f78d7 100644 (file)
@@ -64,13 +64,17 @@ Ext.define('PVE.dc.AuthEdit', {
             });
        } else if (me.authType === 'pve') {
 
-           if (me.create) throw 'unknown auth type';
+           if (me.create) {
+               throw 'unknown auth type';
+           }
 
            me.subject = 'Proxmox VE authentication server';
 
        } else if (me.authType === 'pam') {
 
-           if (me.create) throw 'unknown auth type';
+           if (me.create) {
+               throw 'unknown auth type';
+           }
 
            me.subject = 'linux PAM';
 
index 9bfdfb55f1a2f88417bab69cebeda5f514a41a02..3ef96a2f5536b3f60a12caca171db5fdcacbe55d 100644 (file)
@@ -34,10 +34,12 @@ Ext.define('PVE.lxc.NetworkInputPanel', {
 
        var newdata = {};
 
-       if (values['ipv6mode'] !== 'static')
-           values['ip6'] = values['ipv6mode'];
-       if (values['ipv4mode'] !== 'static')
-           values['ip'] = values['ipv4mode']
+       if (values.ipv6mode !== 'static') {
+           values.ip6 = values.ipv6mode;
+       }
+       if (values.ipv4mode !== 'static') {
+           values.ip = values.ipv4mode;
+       }
        newdata[id] = PVE.Parser.printLxcNetwork(values);
        return newdata;
     },