[pve-devel] r6284 - pve-manager/pve2/www/manager/dc

svn-commits at proxmox.com svn-commits at proxmox.com
Fri Jul 8 16:16:22 CEST 2011


Author: dietmar
Date: 2011-07-08 16:16:22 +0200 (Fri, 08 Jul 2011)
New Revision: 6284

Modified:
   pve-manager/pve2/www/manager/dc/UserView.js
Log:
make lint happy


Modified: pve-manager/pve2/www/manager/dc/UserView.js
===================================================================
--- pve-manager/pve2/www/manager/dc/UserView.js	2011-07-08 14:14:16 UTC (rev 6283)
+++ pve-manager/pve2/www/manager/dc/UserView.js	2011-07-08 14:16:22 UTC (rev 6284)
@@ -38,13 +38,14 @@
 		handler: function() {
 		    var sm = me.getSelectionModel();
 		    var rec = sm.getSelection()[0];
-		    if (!rec)
+		    if (!rec) {
 			return;
+		    }
 
 		    var userid = rec.data.userid;
 
                     var win = Ext.create('PVE.dc.UserEdit',{
-                        userid: userid,
+                        userid: userid
                     });
                     win.on('destroy', reload);
                     win.show();
@@ -53,18 +54,21 @@
             {
 		text: 'Delete',
 		handler: function() {
+		    var msg;
 		    var sm = me.getSelectionModel();
 		    var rec = sm.getSelection()[0];
-		    if (!rec)
+		    if (!rec) {
 			return;
+		    }
 
 		    var userid = rec.data.userid;
 
 		    if (userid !== 'root at pam') {
-			var msg = 'Are you sure you want to permanently delete the user: ' + userid;
+			msg = 'Are you sure you want to permanently delete the user: ' + userid;
 			Ext.Msg.confirm('Deletion Confirmation', msg, function(btn) {
-			    if (btn !== 'yes')
+			    if (btn !== 'yes') {
 				return;
+			    }
 
 			    me.setLoading(true, true);
 			    PVE.Utils.API2Request({
@@ -80,7 +84,7 @@
 			    });
 			});
 		    } else {
-			var msg = 'You are not permitted to delete the user: root at pam';
+			msg = 'You are not permitted to delete the user: root at pam';
 			Ext.Msg.alert('Error', msg);
 		    }
 		}
@@ -88,9 +92,9 @@
         ];
 	   
 	var render_expire = function(date) {
-	    if (!date)
+	    if (!date) {
 		return 'never';
-
+	    }
 	    return Ext.Date.format(date, "Y-m-d");
 	};
 
@@ -175,7 +179,7 @@
 	fields: [ 
 	    'userid', 'firstname', 'lastname' , 'email', 'comment',
 	    { type: 'boolean', name: 'enabled' }, 
-	    { type: 'date', dateFormat: 'timestamp', name: 'expire' },
+	    { type: 'date', dateFormat: 'timestamp', name: 'expire' }
 	],
 	idProperty: 'userid'
     });




More information about the pve-devel mailing list