Author: jfthomps
Date: Thu Apr 26 16:30:52 2012
New Revision: 1330933

URL: http://svn.apache.org/viewvc?rev=1330933&view=rev
Log:
VCL-463
add ability to deploy images as servers

serverprofiles.js:
-modified clearProfileItems and getServerProfileDataManageCB - added code that 
handles profileadmingroup and profilelogingroup drop downs as widgets or normal 
form elements instead of just as form elements

Modified:
    incubator/vcl/trunk/web/js/serverprofiles.js

Modified: incubator/vcl/trunk/web/js/serverprofiles.js
URL: 
http://svn.apache.org/viewvc/incubator/vcl/trunk/web/js/serverprofiles.js?rev=1330933&r1=1330932&r2=1330933&view=diff
==============================================================================
--- incubator/vcl/trunk/web/js/serverprofiles.js (original)
+++ incubator/vcl/trunk/web/js/serverprofiles.js Thu Apr 26 16:30:52 2012
@@ -103,10 +103,14 @@ function clearProfileItems() {
        dijit.byId('profileimage').reset();
        //dijit.byId('profilefixedIP').set('value', '');
        //dijit.byId('profilefixedMAC').set('value', '');
-       //dijit.byId('profileadmingroup').reset();
-       //dijit.byId('profilelogingroup').reset();
-       dojo.byId('profileadmingroup').value = 0;
-       dojo.byId('profilelogingroup').value = 0;
+       if(dijit.byId('profileadmingroup'))
+               dijit.byId('profileadmingroup').reset();
+       else
+               dojo.byId('profileadmingroup').value = 0;
+       if(dijit.byId('profilelogingroup'))
+               dijit.byId('profilelogingroup').reset();
+       else
+               dojo.byId('profilelogingroup').value = 0;
        dijit.byId('profilemonitored').reset();
 }
 
@@ -240,10 +244,14 @@ function getServerProfileDataManageCB(da
        dijit.byId('profileimage').set('value', data.items.imageid);
        //dijit.byId('profilefixedIP').set('value', data.items.fixedIP);
        //dijit.byId('profilefixedMAC').set('value', data.items.fixedMAC);
-       //dijit.byId('profileadmingroup').set('value', data.items.admingroupid);
-       //dijit.byId('profilelogingroup').set('value', data.items.logingroupid);
-       dojo.byId('profileadmingroup').value = data.items.admingroupid;
-       dojo.byId('profilelogingroup').value = data.items.logingroupid;
+       if(dijit.byId('profileadmingroup'))
+               dijit.byId('profileadmingroup').set('value', 
data.items.admingroupid);
+       else
+               dojo.byId('profileadmingroup').value = data.items.admingroupid;
+       if(dijit.byId('profilelogingroup'))
+               dijit.byId('profilelogingroup').set('value', 
data.items.logingroupid);
+       else
+               dojo.byId('profilelogingroup').value = data.items.logingroupid;
        dijit.byId('profilemonitored').set('value', 
parseInt(data.items.monitored));
        dojo.removeClass('serverprofiledata', 'hidden');
 }


Reply via email to