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

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


Author: dietmar
Date: 2011-07-08 16:19:17 +0200 (Fri, 08 Jul 2011)
New Revision: 6286

Modified:
   pve-manager/pve2/www/manager/dc/GroupEdit.js
Log:
avoid global 'title' variable, use me.create property


Modified: pve-manager/pve2/www/manager/dc/GroupEdit.js
===================================================================
--- pve-manager/pve2/www/manager/dc/GroupEdit.js	2011-07-08 14:17:15 UTC (rev 6285)
+++ pve-manager/pve2/www/manager/dc/GroupEdit.js	2011-07-08 14:19:17 UTC (rev 6286)
@@ -5,18 +5,12 @@
     initComponent : function() {
         var me = this;
 
-        var create = !me.groupid;
+        var me.create = !me.groupid;
 
-        if (create) {
-            title = "Create Group";
-        } else {
-            title = "Edit Group '" + me.groupid + "'";
-        }
-
         var url;
         var method;
 
-        if (create) {
+        if (me.create) {
             url = '/api2/extjs/access/groups';
             method = 'POST';
         } else {
@@ -25,7 +19,7 @@
         }
 
         Ext.applyIf(me, {
-            title: title,
+            title: me.create ? "Create Group" :  "Edit Group '" + me.groupid + "'",
             url: url,
             method: method,
             items: [
@@ -48,7 +42,7 @@
 
         me.callParent();
 
-        if (!create) {
+        if (!me.create) {
             me.load({
                 success: function(form, action) {
 //                    if (action.result.data.type !== me.groupid) {



More information about the pve-devel mailing list