[pve-devel] [PATCH manager 07/10] jslint: change (x)?x:y to x || y

Dominik Csapak d.csapak at proxmox.com
Fri Apr 29 12:06:32 CEST 2016


Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/manager6/Utils.js          | 4 ++--
 www/manager6/form/ComboGrid.js | 2 +-
 www/manager6/ha/Resources.js   | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js
index 4eac6cc..bc52af1 100644
--- a/www/manager6/Utils.js
+++ b/www/manager6/Utils.js
@@ -785,10 +785,10 @@ Ext.define('PVE.Utils', { statics: {
 
 	if (value.managed) {
 	    text += ', ' + PVE.Utils.stateText + ': ';
-	    text += value.state ? value.state : PVE.Utils.noneText;
+	    text += value.state || PVE.Utils.noneText;
 
 	    text += ', ' +  PVE.Utils.groupText + ': ';
-	    text += value.group ? value.group : PVE.Utils.noneText;
+	    text += value.group || PVE.Utils.noneText;
 	}
 
 	return text;
diff --git a/www/manager6/form/ComboGrid.js b/www/manager6/form/ComboGrid.js
index 33f3059..cd8c757 100644
--- a/www/manager6/form/ComboGrid.js
+++ b/www/manager6/form/ComboGrid.js
@@ -269,7 +269,7 @@ Ext.define('PVE.form.ComboGrid', {
 		if (me.enableAfterLoad) {
 		    delete me.enableAfterLoad;
 		    if (me.picker) {
-			me.picker.setMinHeight((me.savedMinHeight)?me.savedMinHeight:0);
+			me.picker.setMinHeight(me.savedMinHeight || 0);
 			delete me.savedMinHeight;
 			me.picker.updateLayout();
 		    }
diff --git a/www/manager6/ha/Resources.js b/www/manager6/ha/Resources.js
index 4c68c9f..b40c99b 100644
--- a/www/manager6/ha/Resources.js
+++ b/www/manager6/ha/Resources.js
@@ -119,7 +119,7 @@ Ext.define('PVE.ha.ResourcesView', {
 		    width: 100,
 		    sortable: true,
 		    renderer: function(v) {
-			return v ? v : 'enabled';
+			return v || 'enabled';
 		    },
 		    dataIndex: 'state'
 		},
-- 
2.1.4




More information about the pve-devel mailing list