[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] conga ./conga.spec.in.in luci/cluster/fence_de ...



CVSROOT:	/cvs/cluster
Module name:	conga
Branch: 	RHEL5
Changes by:	rmccabe sourceware org	2007-07-12 04:41:39

Modified files:
	.              : conga.spec.in.in 
	luci/cluster   : fence_device.js form-macros index_html 
	                 resource-form-macros resource_form_handlers.js 
	                 validate_config_qdisk.js validate_fence.js 
	luci/homebase  : form-macros homebase_common.js index_html 
	                 validate_cluster_add.js 
	                 validate_cluster_add_initial.js 
	                 validate_perm.js validate_sys_add.js 
	                 validate_sys_remove.js validate_user_add.js 
	                 validate_user_del.js 

Log message:
	Fix 245202: Conga needs to support Internet Explorer 6.0 and later

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/conga.spec.in.in.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.45.2.44&r2=1.45.2.45
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/fence_device.js.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.2.2.5&r2=1.2.2.6
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/form-macros.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.90.2.24&r2=1.90.2.25
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/index_html.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.20.2.11&r2=1.20.2.12
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/resource-form-macros.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.21.2.7&r2=1.21.2.8
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/resource_form_handlers.js.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.20.2.8&r2=1.20.2.9
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/validate_config_qdisk.js.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.4.2.2&r2=1.4.2.3
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/validate_fence.js.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.2.2&r2=1.1.2.3
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/form-macros.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.44.2.9&r2=1.44.2.10
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/homebase_common.js.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.13.2.3&r2=1.13.2.4
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/index_html.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.18.2.4&r2=1.18.2.5
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/validate_cluster_add.js.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.4.2.3&r2=1.4.2.4
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/validate_cluster_add_initial.js.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/validate_perm.js.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.2&r2=1.2.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/validate_sys_add.js.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1&r2=1.1.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/validate_sys_remove.js.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.2.2.1&r2=1.2.2.2
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/validate_user_add.js.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.3&r2=1.3.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/validate_user_del.js.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.2&r2=1.2.2.1

--- conga/conga.spec.in.in	2007/06/29 15:58:22	1.45.2.44
+++ conga/conga.spec.in.in	2007/07/12 04:41:39	1.45.2.45
@@ -282,6 +282,10 @@
 
 ###  changelog ###
 
+%changelog
+* Thu Jul 12 2007 Ryan McCabe <rmccabe redhat com> 0.10.0-2
+- Fixed bz245202 (Conga needs to support Internet Explorer 6.0 and later)
+- Resolves: bz245202
 
 %changelog
 * Wed Jun 27 2007 Ryan McCabe <rmccabe redhat com> 0.10.0-1
@@ -310,7 +314,6 @@
 - Fixed bz225588 (luci web app does not enforce selection of fence port)
 - Fixed bz212022 (cannot create cluster using ip addresses)
 - Fixed bz223162 (Error trying to create a new fence device for a cluster node)
-
 - Upgraded to the latest Plone (2.5.3)
 - Added a "reprobe storage" button that invalidates cached storage reports
   and forces a new probe.
--- conga/luci/cluster/fence_device.js	2007/03/01 00:31:08	1.2.2.5
+++ conga/luci/cluster/fence_device.js	2007/07/12 04:41:39	1.2.2.6
@@ -1,5 +1,5 @@
-var num_fences_level = Array(0, 0)
-var num_fence_instances = new Array()
+var num_fences_level = [ 0, 0 ];
+var num_fence_instances = [];
 
 function del_fence_instance(fi_div_id) {
 	delete_element_id(fi_div_id);
@@ -11,8 +11,9 @@
 
 function add_fence_instance(fi_cont_id, fence_type) {
 	var instance_div = document.getElementById(fi_cont_id + '_instances');
-	if (!instance_div)
+	if (!instance_div) {
 		return (-1);
+	}
 
 	var fi_form = document.getElementById(fence_type + '_instance');
 	if (fi_form) {
@@ -32,8 +33,7 @@
 			} else if (	ielem[i].type == 'button' &&
 						ielem[i].name == 'remove_fence')
 			{
-				ielem[i].setAttribute('onclick',
-					'del_fence_instance(\'' + cloned_iform.id + '\')');
+				ielem[i].onclick = new Function('del_fence_instance(\'' + cloned_iform.id + '\')');
 			}
 		}
 
@@ -49,13 +49,16 @@
 
 	var child_element = document.getElementById(element_id);
 	if (!child_element) {
-		if (container_element.firstChild)
+		if (container_element.firstChild) {
 			container_element.removeChild(container_element.firstChild);
+		}
 		return (-1);
 	}
 
-	if (container_element.firstChild)
+	if (container_element.firstChild) {
 		container_element.removeChild(container_element.firstChild);
+	}
+
 	var target = child_element.cloneNode(1);
 	target.id = null;
 	container_element.appendChild(target);
@@ -63,15 +66,21 @@
 
 function swap_node_fence_div(container_id, fence_opt) {
 	var container_element = document.getElementById(container_id);
-	if (!container_element || !fence_opt || !fence_opt.value)
+	if (!container_element) {
 		return (-1);
+	}
+	if (!container_element || !fence_opt || !fence_opt.value) {
+		return (-1);
+	}
 
 	var fence_id = fence_opt.value;
 	var child_element = document.getElementById(fence_id);
-	if (!child_element)
+	if (!child_element) {
 		return (-1);
-	if (container_element.firstChild)
+	}
+	if (container_element.firstChild) {
 		container_element.removeChild(container_element.firstChild);
+	}
 
 	var target = child_element.cloneNode(1);
 	target.id = '';
@@ -82,8 +91,9 @@
 		for (var i = 0 ; i < input_tags.length ; i++) {
 			if (input_tags[i].type != 'button') {
 				input_tags[i].disabled = true;
-				if (input_tags[i].name == 'fence_type')
+				if (input_tags[i].name == 'fence_type') {
 					fence_type = input_tags[i].value;
+				}
 			}
 		}	
 	}
@@ -115,8 +125,7 @@
 			} else if (	ielem[i].type == 'button'
 						&& ielem[i].name == 'remove_fence')
 			{
-				ielem[i].setAttribute('onclick',
-					'del_fence_instance(\'' + cloned_iform.id + '\')');
+				ielem[i].onclick = new Function('del_fence_instance(\'' + cloned_iform.id + '\')');
 			}
 		}
 		idiv.appendChild(form_elem);
@@ -131,21 +140,22 @@
 	var remove_button = document.createElement('input');
 	remove_button.setAttribute('type', 'button');
 	remove_button.setAttribute('value', 'Remove this device');
-	remove_button.setAttribute('onclick', "del_fence('" + container_element.id + "');");
+	remove_button.onclick = new Function("del_fence('" + container_element.id + "');");
 
 	if (sharable) {
 		var add_instance_button = document.createElement('input');
 		add_instance_button.setAttribute('type', 'button');
 		add_instance_button.setAttribute('name', 'add_fence_inst');
 		add_instance_button.setAttribute('value', 'Add an instance');
-		add_instance_button.setAttribute('onclick', "add_fence_instance('" + container_element.id + "','" + fence_type + "');");
+		add_instance_button.onclick = new Function("add_fence_instance('" + container_element.id + "','" + fence_type + "');");
 		add_instance_button.className = 'pad_left';
 	}
 
 	var remove_form = document.createElement('form');
 	remove_form.appendChild(remove_button);
-	if (sharable)
+	if (sharable) {
 		remove_form.appendChild(add_instance_button);
+	}
 	remove_div.appendChild(remove_form);
 	container_element.appendChild(remove_div);
 }
@@ -153,38 +163,45 @@
 function add_node_fence_device(fence_level) {
 	var cont_name = 'fence_list_level' + fence_level;
 	var container = document.getElementById(cont_name);
-	if (!container)
+	if (!container) {
 		return (-1);
+	}
 
-	var chooser_elem = document.getElementById('fence_selection_block');
-	if (!chooser_elem)
+	var chooser_elem_orig = document.getElementById('fence_selection_block');
+	if (!chooser_elem_orig) {
 		return (-1);
+	}
 
 	var div_elem = document.createElement('div');
-	if (!div_elem)
+	if (!div_elem) {
 		return (-1);
+	}
 	var level_num_fences = num_fences_level[fence_level - 1];
 
 	div_elem.id = 'fence' + fence_level + '_' + level_num_fences;
 	div_elem.className = 'fence_level';
-	chooser_elem = chooser_elem.cloneNode(1);
+
+	var chooser_elem = chooser_elem_orig.cloneNode(1);
 	chooser_elem.id = null;
 	chooser_elem.className = null;
 
 	var input_elems = chooser_elem.getElementsByTagName('input');
-	if (!input_elems || input_elems.length < 2)
+	if (!input_elems || input_elems.length < 2) {
 		return (-1);
+	}
 	for (var i = 0 ; i < input_elems.length ; i++) {
-		if (input_elems[i].name == 'fence_level')
+		if (input_elems[i].name == 'fence_level') {
 			input_elems[i].value = fence_level;
-		else if (input_elems[i].name == 'fence_num')
+		} else if (input_elems[i].name == 'fence_num') {
 			input_elems[i].value = level_num_fences++;
+		}
 	}
-
 	var select_elem = chooser_elem.getElementsByTagName('select');
-	if (!select_elem || select_elem.length != 1)
+	if (!select_elem || select_elem.length !== 1) {
 		return (-1);
-	select_elem[0].setAttribute('onChange', "swap_node_fence_div('" + div_elem.id + "', this.options[this.selectedIndex])");
+	}
+	select_elem = select_elem[0];
+	select_elem.onchange = new Function("swap_node_fence_div('" + div_elem.id + "', this.options[this.selectedIndex])");
 
 	div_elem.appendChild(chooser_elem);
 	container.appendChild(div_elem);
--- conga/luci/cluster/form-macros	2007/06/19 15:54:09	1.90.2.24
+++ conga/luci/cluster/form-macros	2007/07/12 04:41:39	1.90.2.25
@@ -384,7 +384,7 @@
 
 			<tal:block tal:define="global cur_sysnum python:0" />
 
-			<tbody class="systemsTable">
+			<tbody class="systemsTable" id="sys_tbody">
 			 <tal:block
 				tal:condition="exists: add_cluster/nodes"
 				tal:repeat="cur_sys add_cluster/nodes">
@@ -404,7 +404,7 @@
 					<td class="systemsTable">
 						<tal:block tal:condition="not: exists: sys/auth">
 							<input type="password"
-								onChange="pwd0Change(this.form)"
+								onchange="pwd0Change(this.form)"
 								autocomplete="off"
 								tal:attributes="
 									value nothing;
@@ -414,7 +414,7 @@
 						</tal:block>
 
 						<tal:block tal:condition="exists: sys/auth">
-							<input type="text" onChange="pwd0Change(this.form)"
+							<input type="text" onchange="pwd0Change(this.form)"
 								disabled="disabled" value="[authenticated]"
 								tal:attributes="
 									class python: 'hbInputPass' + ('errors' in sys and ' error' or '');
@@ -461,9 +461,8 @@
 					</td>
 					<td class="systemsTable">
 						<input type="password"
-							onChange="pwd0Change(this.form)"
+							onchange="pwd0Change(this.form)"
 							class="hbInputPass" autocomplete="off"
-							onChange="pwd0Change(this.form)"
 							id="__SYSTEM0:Passwd" name="__SYSTEM0:Passwd" />
 					</td>
 					<td class="systemsTable">
@@ -480,7 +479,7 @@
 					</td>
 					<td class="systemsTable">
 						<input type="password"
-							onChange="pwd0Change(this.form)"
+							onchange="pwd0Change(this.form)"
 							class="hbInputPass" autocomplete="off"
 							id="__SYSTEM1:Passwd" name="__SYSTEM1:Passwd" />
 					</td>
@@ -498,7 +497,7 @@
 					</td>
 					<td class="systemsTable">
 						<input type="password"
-							onChange="pwd0Change(this.form)"
+							onchange="pwd0Change(this.form)"
 							class="hbInputPass" autocomplete="off"
 							id="__SYSTEM2:Passwd" name="__SYSTEM2:Passwd" />
 					</td>
@@ -609,7 +608,7 @@
 				</td></tr>
 			</thead>
 
-			<tbody class="systemsTable">
+			<tbody class="systemsTable" id="sys_tbody">
 				<tr class="systemsTable">
 					<td class="systemsTable">Cluster Name</td>
 					<td class="systemsTable">
@@ -943,7 +942,7 @@
 				</td></tr>
 			</thead>
 
-			<tbody class="systemsTable">
+			<tbody class="systemsTable" id="sys_tbody">
 				<tr class="systemsTable">
 					<td class="systemsTable">Post Fail <span tal:attributes="onclick python:'window.location.assign(\'./?pagetype=80&clustername=' + request['clustername'] + '\')'">Delay</span>
 					</td>
@@ -1009,7 +1008,7 @@
 				</td></tr>
 			</thead>
 
-			<tbody class="systemsTable">
+			<tbody class="systemsTable" id="sys_tbody">
 				<tr class="systemsTable">
 					<td class="systemsTable">
 						<input type="radio" name="mcast" value="False"
@@ -1093,7 +1092,7 @@
 				</td></tr>
 			</thead>
 
-			<tbody class="systemsTable">
+			<tbody class="systemsTable" id="sys_tbody">
 				<tr class="systemsTable" id="st_row"><td class="systemsTable" id="st_col">
 					<input type="radio" name="quorumd" value="False"
 						onClick="disableChildrenInput('quorumdisk');"
@@ -1314,7 +1313,7 @@
 					<th class="systemsTable">Lock Server</th>
 				</tr>
 			</thead>
-			<tbody>
+			<tbody id="sys_tbody">
 				<tal:block tal:repeat="c clusterinfo/gulm_lockservers">
 					<tr class="systemsTable">
 						<td class="systemsTable">
@@ -1919,10 +1918,10 @@
 			<tr>
 				<td>IP Address</td>
 				<td>
-					<input name="hostname" type="text"
+					<input name="ipaddr" type="text"
 						tal:attributes="
 							disabled cur_fencedev/isShared | nothing;
-							value cur_fencedev/hostname | nothing" />
+							value cur_fencedev/ipaddr | nothing" />
 				</td>
 			</tr>
 			<tr>
@@ -3731,7 +3730,7 @@
 
 			<tal:block tal:define="global cur_sysnum python:0" />
 
-			<tbody class="systemsTable">
+			<tbody class="systemsTable" id="sys_tbody">
 			 <tal:block
 				tal:condition="exists: add_cluster/nodes"
 				tal:repeat="cur_sys add_cluster/nodes">
@@ -3752,7 +3751,7 @@
 						<tal:block tal:condition="not: exists: sys/auth">
 							<input type="password"
 								autocomplete="off"
-								onChange="pwd0Change(this.form)"
+								onchange="pwd0Change(this.form)"
 								tal:attributes="
 									value nothing;
 									class python: 'hbInputPass' + ('errors' in sys and ' error' or '');
@@ -3761,7 +3760,7 @@
 						</tal:block>
 
 						<tal:block tal:condition="exists: sys/auth">
-							<input type="text" onChange="pwd0Change(this.form)"
+							<input type="text" onchange="pwd0Change(this.form)"
 								disabled="disabled" value="[authenticated]"
 								tal:attributes="
 									class python: 'hbInputPass' + ('errors' in sys and ' error' or '');
@@ -3808,9 +3807,8 @@
 					</td>
 					<td class="systemsTable">
 						<input type="password"
-							onChange="pwd0Change(this.form)"
+							onchange="pwd0Change(this.form)"
 							class="hbInputPass" autocomplete="off"
-							onChange="pwd0Change(this.form)"
 							id="__SYSTEM0:Passwd" name="__SYSTEM0:Passwd" />
 					</td>
 					<td class="systemsTable">
@@ -4976,7 +4974,7 @@
 			<td class="cluster node fence_main fence">
 				<form name="main_fence_form">
 					<select name="select_div"
-						onChange="swap_fence_div('fence_container',
+						onchange="swap_fence_div('fence_container',
 									this.options[this.selectedIndex].value)">
 						<tal:block metal:use-macro="here/form-macros/macros/shared-fence-option-list" />
 					</select>
--- conga/luci/cluster/index_html	2007/06/27 06:19:21	1.20.2.11
+++ conga/luci/cluster/index_html	2007/07/12 04:41:39	1.20.2.12
@@ -203,7 +203,7 @@
 		<tal:block tal:define="ret python: request.SESSION.get('checkRet')">
 		<div class="retmsgs" id="retmsgsdiv" tal:condition="python:(ret and 'messages' in ret and len(ret['messages']))">
 			<div class="hbclosebox">
-				<a href="javascript:hide_element('retmsgsdiv')"><img src="/luci/homebase/x.png" class="closeBox" title="dismiss"></a>
+				<img onclick="hide_element('retmsgsdiv')" src="/luci/homebase/x.png" class="closeBox" title="dismiss" />
 			</div>
 			<p class="retmsgs">Status messages:</p>
 			<ul class="statusmsg">
@@ -215,7 +215,7 @@
 
 		<div id="errmsgsdiv" class="errmsgs" tal:condition="python:(ret and 'errors' in ret and len(ret['errors']))">
 			<div class="hbclosebox">
-				<a class="hbclosebox" href="javascript:hide_element('errmsgsdiv')"><img src="/luci/homebase/x.png" class="closeBox" title="dismiss"></a>
+				<img onclick="hide_element('errmsgsdiv')" src="/luci/homebase/x.png" class="closeBox" title="dismiss" />
 			</div>
 			<p class="errmsgs">The following errors occurred:</p>
 			<ul class="statusmsg">
--- conga/luci/cluster/resource-form-macros	2007/06/18 18:39:31	1.21.2.7
+++ conga/luci/cluster/resource-form-macros	2007/07/12 04:41:39	1.21.2.8
@@ -102,8 +102,7 @@
 		<strong class="reshdr">Select a Resource Type</strong>
 	</p>
 
-	<p class="reshdr">
-		<form>
+	<form>
 		<select onChange="swap_div_elem(this.form.parentNode,
 									this.options[this.selectedIndex].value);">
 			<option name="blank" value="blank" checked>
@@ -128,8 +127,7 @@
 			<option name="SAPDatabase" value="SAPDatabase">SAP Database</option>
 			<option name="SAPInstance" value="SAPInstance">SAP Instance</option>
 		</select>
-		</form>
-	</p>
+	</form>
 
 	<div name="invisible" class="invisible">
 		<div name="blank">&nbsp;</div>
@@ -155,9 +153,10 @@
 <div metal:define-macro="service-compose-macro">
 	<p class="reshdr">
 		<strong class="reshdr">Add a new local resource</strong>
-		<form>
+	</p>
+	<form>
 		<select onChange="swap_div_elem(this.form.parentNode,
-							this.options[this.selectedIndex].value);">
+							this.options[this.selectedIndex].value)">
 			<option checked="checked">Select a resource type</option>
 			<option name="IP" value="IP">IP address</option>
 			<option name="FS" value="FS">File system</option>
@@ -177,20 +176,21 @@
 			<option name="SAPDatabase" value="SAPDatabase">SAP Database</option>
 			<option name="SAPInstance" value="SAPInstance">SAP Instance</option>
 		</select>
-		</form>
-	</p>
+	</form>
 
 	<p style="margin-left: +5em;margin-top:1em;"><strong>or</strong></p>
 	<p class="reshdr">
 		<strong class="reshdr">Use an existing global resource</strong>
 		<br/>
-		<form>
+	</p>
+
+	<form>
 		<input type="hidden" name="parent_uuid" value="" />
 		<input type="hidden" name="uuid" value="" />
 		<input type="hidden" name="tree_level" value="" />
 		<select id="gres_chooser"
 			onChange="swap_in_global_res('global_resources_block', this,
-						this.form.parentNode, this.form);">
+						this.form.parentNode, this.form)">
 			<option checked="checked">Select a resource name</option>
 			<tal:block
 				tal:repeat="gres global_resources">
@@ -200,8 +200,7 @@
 					tal:content="python: gres['name'] + ' (' + gres['type'].split(':')[0] + ')'" />
 			</tal:block>
 		</select>
-		</form>
-	</p>
+	</form>
 
 	<div name="invisible" class="invisible">
 		<div name="">&nbsp;</div>
--- conga/luci/cluster/resource_form_handlers.js	2007/06/20 20:19:34	1.20.2.8
+++ conga/luci/cluster/resource_form_handlers.js	2007/07/12 04:41:39	1.20.2.9
@@ -69,14 +69,14 @@
 	var divs = container.getElementsByTagName('div');
 
 	for (var i = 0 ; i < divs.length ; i++) {
-		if (!swap_in_elem && divs[i].getAttribute('name') == swap_in_name) {
+		if (divs[i].getAttribute('name') == swap_in_name) {
 			swap_in_elem = divs[i];
 			break;
 		}
 	}
-	if (!swap_in_elem)
+	if (!swap_in_elem) {
 		return (-1);
-
+	}
 	container.parentNode.replaceChild(swap_in_elem, container);
 }
 
--- conga/luci/cluster/validate_config_qdisk.js	2007/03/01 00:31:08	1.4.2.2
+++ conga/luci/cluster/validate_config_qdisk.js	2007/07/12 04:41:39	1.4.2.3
@@ -281,7 +281,7 @@
 	del_img.setAttribute('id', hstr + ':hdel');
 	del_img.setAttribute('src', '/luci/delete-row.png');
 	del_img.setAttribute('title', 'delete this row');
-	del_img.setAttribute('onClick', 'delete_qdisk_heur(this, document.quorum_partition)');
+	del_img.onclick = new Function('delete_qdisk_heur(this, document.quorum_partition)');
 	del_td.appendChild(del_img);
 
 	var tr = document.createElement('tr');
--- conga/luci/cluster/validate_fence.js	2007/06/20 20:19:34	1.1.2.2
+++ conga/luci/cluster/validate_fence.js	2007/07/12 04:41:39	1.1.2.3
@@ -1,4 +1,4 @@
-var fence_inst_validator = new Array();
+var fence_inst_validator = [];
 fence_inst_validator['apc'] = [ 'port', 'switch' ];
 fence_inst_validator['bladecenter'] = [ 'blade' ];
 fence_inst_validator['brocade'] = [ 'port' ];
@@ -12,7 +12,7 @@
 fence_inst_validator['wti'] = [ 'port' ];
 fence_inst_validator['xvm'] = [ 'domain' ];
 
-var fence_validator = new Array();
+var fence_validator = [];
 fence_validator['apc'] = [ 'ipaddr', 'login', 'passwd', 'passwd_script' ];
 fence_validator['bladecenter'] = [ 'ipaddr', 'login', 'passwd', 'passwd_script' ];
 fence_validator['brocade'] = [ 'ipaddr', 'login', 'passwd', 'passwd_script' ];
@@ -34,12 +34,12 @@
 fence_validator['xvm'] = [];
 
 function validate_field_str(form, form_elem) {
-	var errors = new Array();
+	var errors = [];
 
 	if (!form_elem || str_is_blank(form_elem.value)) {
-		if (!form_elem)
+		if (!form_elem) {
 			errors.push('No value was given for this field.');
-		else {
+		} else {
 			set_form_err(form_elem);
 			errors.push(form_elem.name + ' values must not be blank.');
 		}
@@ -71,16 +71,18 @@
 }
 
 function validate_field_noop(form, form_elem) {
-	if (form_elem)
+	if (form_elem) {
 		clr_form_err(form_elem);
+	}
 	return (null);
 }
 
 function validate_field_ipmilan_auth(form, form_elem) {
-	var errors = new Array();
+	var errors = [];
 
-	if (!form_elem || str_is_blank(form_elem.value))
+	if (!form_elem || str_is_blank(form_elem.value)) {
 		return (null);
+	}
 
 	var auth_type = form_elem.value;
 	if (auth_type != 'none' && auth_type != 'password' && auth_type != 'md5') {
@@ -93,7 +95,7 @@
 	return (null);
 }
 
-var field_validator = new Array();
+var field_validator = [];
 field_validator['ipaddr'] = validate_field_host;
 field_validator['hostname'] = validate_field_host;
 field_validator['login'] = validate_field_str;
@@ -119,37 +121,44 @@
 field_validator['domain'] = validate_field_str;
 
 function validate_fence(form) {
-	var errors = new Array();
+	var errors = [];
 
-	if (!form.fence_type || str_is_blank(form.fence_type.value))
+	if (!form.fence_type || str_is_blank(form.fence_type.value)) {
 		errors.push('No fence device was selected.');
+	}
 
-	if (errors.length > 0)
+	if (errors.length > 0) {
 		return (errors);
+	}
 
 	if (!form.name || str_is_blank(form.name.value)) {
 		errors.push('A unique name must be given for all fence devices.');
 		set_form_err(form.name);
-	} else
+	} else {
 		clr_form_err(form.name);
+	}
 
-	if (errors.length > 0)
+	if (errors.length > 0) {
 		return (errors);
+	}
 
 	var fence_type = form.fence_type.value.replace(/^fence_/, '');
 	var fields = fence_validator[fence_type];
-	if (!fields)
+	if (!fields) {
 		errors.push('An unknown fence device type was given: \"' + fence_type + '.\"');
+	}
 
-	if (errors.length > 0)
+	if (errors.length > 0) {
 		return (errors);
+	}
 
 	for (var i = 0 ; i < fields.length ; i++) {
 		var field_name = fields[i];
 		if (form[field_name]) {
 			var err = field_validator[field_name](form, form[field_name]);
-			if (err)
+			if (err) {
 				errors = errors.concat(err);
+			}
 		}
 	}
 
@@ -159,36 +168,43 @@
 function validate_fence_form(form) {
 	var errors = validate_fence(form);
 
-	if (error_dialog(errors))
+	if (error_dialog(errors)) {
 		return (-1);
+	}
 
-	if (confirm('Update fence device properties?'))
+	if (confirm('Update fence device properties?')) {
 		form.submit();
+	}
 }
 
 function validate_fence_instance(form) {
-	var errors = new Array();
+	var errors = [];
 
-	if (!form.fence_type || str_is_blank(form.fence_type.value))
+	if (!form.fence_type || str_is_blank(form.fence_type.value)) {
 		errors.push('The fence device associated with this instance could not be determined.');
+	}
 
-	if (errors.length > 0)
+	if (errors.length > 0) {
 		return (errors);
+	}
 
 	var fence_type = form.fence_type.value.replace(/^fence_/, '');
 	var fields = fence_inst_validator[fence_type];
-	if (!fields)
+	if (!fields) {
 		errors.push('An unknown fence device type was given: \"' + fence_type + '.\"');
+	}
 
-	if (errors.length > 0)
+	if (errors.length > 0) {
 		return (errors);
+	}
 
 	for (var i = 0 ; i < fields.length ; i++) {
 		var field_name = fields[i];
 		if (form[field_name]) {
 			var err = field_validator[field_name](form, form[field_name]);
-			if (err)
+			if (err) {
 				errors = errors.concat(err);
+			}
 		}
 	}
 
@@ -196,21 +212,25 @@
 }
 
 function validate_node_fence_form(master_form, container_id) {
-	var errors = new Array();
+	var errors = [];
 	var div_elem = document.getElementById(container_id);
-	if (!div_elem)
+	if (!div_elem) {
 		return (-1);
+	}
 	var form_xml = '';
 
 	var form = div_elem.getElementsByTagName('form');
 	for (var i = 0 ; i < form.length ; i++) {
 		var err = null;
-		if (form[i].fence_instance)
+		if (form[i].fence_instance) {
 			err = validate_fence_instance(form[i]);
-		else if (form[i].fence_type)
+		} else if (form[i].fence_type) {
 			err = validate_fence(form[i]);
-		if (err)
+		}
+
+		if (err) {
 			errors = errors.concat(err);
+		}
 		var input_elem = form[i].getElementsByTagName('input');
 		var temp = '';
 		for (var j = 0 ; j < input_elem.length ; j++) {
@@ -222,10 +242,11 @@
 			} else if (res_type == 'checkbox' || res_type == 'radio') {
 				if (input_elem[j].checked) {
 					temp += '<input type="' + res_type + '" name="' + escapeXML(input_elem[j].name) + '"';
-					if (res_type == 'checkbox')
+					if (res_type == 'checkbox') {
 						temp += ' value="1"';
-					else if (res_type == 'radio')
+					} else if (res_type == 'radio') {
 						temp += ' value="' + escapeXML(input_elem[j].value) + '"';
+					}
 					temp += ' />';
 				} else if (res_type == 'checkbox') {
 					temp += '<input type="' + res_type + '" name="' + escapeXML(input_elem[j].name) + '" value="0" />';
@@ -237,15 +258,16 @@
 		for (var j = 0 ; j < select_elem.length ; j++) {
 			temp += '<input type="text" name="' + escapeXML(select_elem[j].name) + '" value="' + escapeXML(select_elem[j].options[select_elem[j].options.selectedIndex].value) + '" />';
 		}
-
-		form_xml += '<form id="' + escapeXML(form[i].getAttribute('name')) + '">' + temp + '</form>';
+		form_xml += '<form id="' + escapeXML(form[i].attributes['name'].value) + '">' + temp + '</form>';
 	}
 
 	master_form.fence_xml.value = '<formlist>' + form_xml + '</formlist>';
 
-	if (error_dialog(errors))
+	if (error_dialog(errors)) {
 		return (-1);
+	}
 
-	if (confirm('Update this node\'s fence configuration?'))
+	if (confirm('Update this node\'s fence configuration?')) {
 		master_form.submit();
+	}
 }
--- conga/luci/homebase/form-macros	2007/06/18 18:39:31	1.44.2.9
+++ conga/luci/homebase/form-macros	2007/07/12 04:41:39	1.44.2.10
@@ -69,7 +69,7 @@
 
 		<div class="hbSubmit" tal:condition="python:userList" id="hbSubmit">
 			<input name="Submit" type="button" value="Delete This User"
-				onClick="validateForm(this.form)" />
+				onclick="validateForm(this.form)" />
 		</div>
 	</form>
 
@@ -136,7 +136,7 @@
 
 		<div class="hbSubmit" id="hbSubmit">
 			<input name="Submit" type="button" value="Submit"
-				onClick="validateForm(this.form)" />
+				onclick="validateForm(this.form)" />
 		</div>
 	</form>
 </div>
@@ -189,7 +189,7 @@
 		<span tal:content="string:Select a User" /><br/>
 		
 		<select class="homebase" name="userList"
-			onChange="document.location = '/luci/homebase/?pagetype=3&user=' + this.form.userList.options[this.form.userList.selectedIndex].text">
+			onchange="document.location = '/luci/homebase/?pagetype=3&user=' + this.form.userList.options[this.form.userList.selectedIndex].text">
 			<tal:block tal:define="userlist python: perms">
 				<tal:block tal:repeat="user userlist">
 					<option class="homebase"
@@ -247,7 +247,7 @@
 		<div class="hbSubmit" id="hbSubmit">
 			<input type="button" name="Update Permissions"
 				value="Update Permissions"
-				onClick="validateForm(this.form)" />
+				onclick="validateForm(this.form)" />
 		</div>
 
 		</tal:block>
@@ -308,7 +308,7 @@
 					</tr>
 				</thead>
 			
-				<tbody class="systemsTable">
+				<tbody class="systemsTable" id="sys_tbody">
 					<tr class="systemsTable" id="__SYSTEM_ROW_0">
 						<td class="systemsTable">
 							<input class="hbInputSys" type="text"
@@ -320,7 +320,7 @@
 								id="__SYSTEM0:Passwd"
 								name="__SYSTEM0:Passwd"
 								class="hbInputPass"
-								onChange="pwd0Change(this.form)" />
+								onchange="pwd0Change(this.form)" />
 						</td>
 						<td class="systemsTable">
 							<img src="/luci/delete-row.png" class="deleteRow"
@@ -343,7 +343,7 @@
 				</thead>
 				<tal:block tal:define="global cur_sysnum python: 0" />
 
-				<tbody class="systemsTable">
+				<tbody class="systemsTable" id="sys_tbody">
 				<tal:block tal:repeat="cur_sys new_systems">
 					<tr class="systemsTable"
 						tal:attributes="
@@ -363,7 +363,7 @@
 							<input type="password"
 								autocomplete="off"
 								class="hbInputPass"
-								onChange="pwd0Change(this.form)"
+								onchange="pwd0Change(this.form)"
 								tal:attributes="
 									id python: '__SYSTEM%d:Passwd' % cur_sysnum;
 									name python: '__SYSTEM%d:Passwd' % cur_sysnum;
@@ -414,7 +414,7 @@
 						<li class="vanilla"
 							tal:attributes="id python: cur_sysnum < 2 and 'allSameDiv' or ''">
 							<input type="checkbox" name="allSameCheckBox"
-								id="allSameCheckBox" onClick="allPasswdsSame(this.form)" />
+								id="allSameCheckBox" onclick="allPasswdsSame(this.form)" />
 							Check if system passwords are identical.
 						</li>
 					</ul>
@@ -423,7 +423,7 @@
 				<tr class="systemsTable"><td class="systemsTable" colspan="2">
 					<div class="systemsTableEnd">
 						<input type="button" value="Add another entry"
-							onClick="addSystem(this.form)" />
+							onclick="addSystem(this.form)" />
 					</div>
 				</td></tr>
 			</tfoot>
@@ -436,7 +436,7 @@
 
 		<div class="hbSubmit" id="hbSubmit">
 			<input type="button" name="Submit" value="Submit"
-				onClick="validateAuth(this.form)" />
+				onclick="validateAuth(this.form)" />
 		</div>
 
 		<tal:block tal:condition="exists: request/SESSION/auth_status">
@@ -542,7 +542,7 @@
 
 		<div class="hbSubmit">
 			<input type="button" name="Submit" value="Remove selected entries"
-				onClick="validateForm(this.form)" />
+				onclick="validateForm(this.form)" />
 		</div>
 	</fieldset>
 	</form>
@@ -601,7 +601,7 @@
 					</tr>
 				</thead>
 			
-				<tbody class="systemsTable">
+				<tbody class="systemsTable" id="sys_tbody">
 					<tr class="systemsTable" id="__SYSTEM_ROW_0">
 						<td class="systemsTable">
 							<input class="hbInputSys" type="text"
@@ -613,7 +613,7 @@
 								id="__SYSTEM0:Passwd"
 								name="__SYSTEM0:Passwd"
 								class="hbInputPass"
-								onChange="pwd0Change(this.form)" />
+								onchange="pwd0Change(this.form)" />
 						</td>
 						<td class="systemsTable">
 							<img src="/luci/delete-row.png" class="deleteRow"
@@ -636,7 +636,7 @@
 				</thead>
 				<tal:block tal:define="global cur_sysnum python: 0" />
 
-				<tbody class="systemsTable">
+				<tbody class="systemsTable" id="sys_tbody">
 				<tal:block tal:repeat="cur_sys new_systems">
 					<tr class="systemsTable"
 						tal:attributes="
@@ -656,7 +656,7 @@
 							<input type="password"
 								autocomplete="off"
 								class="hbInputPass"
-								onChange="pwd0Change(this.form)"
+								onchange="pwd0Change(this.form)"
 								tal:attributes="
 									id python: '__SYSTEM%d:Passwd' % cur_sysnum;
 									name python: '__SYSTEM%d:Passwd' % cur_sysnum;
@@ -706,14 +706,14 @@
 								onchange="view_certs_only(this.form, this.checked)"
 								type="checkbox">View system certificates before sending any passwords.</li>
 						<li class="vanilla"
-							tal:attributes="id python: cur_sysnum < 2 and 'allSameDiv' or ''"><input type="checkbox" name="allSameCheckBox" id="allSameCheckBox" onClick="allPasswdsSame(this.form);"/>Check if storage system passwords are identical.</li>
+							tal:attributes="id python: cur_sysnum < 2 and 'allSameDiv' or ''"><input type="checkbox" name="allSameCheckBox" id="allSameCheckBox" onclick="allPasswdsSame(this.form);"/>Check if storage system passwords are identical.</li>
 					</ul>
 				</td></tr>
 
 				<tr class="systemsTable"><td class="systemsTable" colspan="2">
 					<div class="systemsTableEnd">
 						<input type="button" value="Add another entry"
-							onClick="addSystem(this.form)" />
+							onclick="addSystem(this.form)" />
 					</div>
 				</td></tr>
 			</tfoot>
@@ -724,7 +724,7 @@
 
 		<div class="hbSubmit" id="hbSubmit">
 			<input type="button" name="Submit" value="Submit"
-				onClick="validateForm(this.form)" />
+				onclick="validateForm(this.form)" />
 		</div>
 	</form>
 </div>
@@ -805,7 +805,7 @@
 						<li class="vanilla" id="allSameDiv">
 						<li class="vanilla" tal:condition="not: exists: add_cluster/complete">
 							<input type="checkbox" name="allSameCheckBox"
-								id="allSameCheckBox" onClick="allPasswdsSame(this.form)"
+								id="allSameCheckBox" onclick="allPasswdsSame(this.form)"
 								tal:attributes="checked python: add_cluster['identical_passwds'] and 'checked'"
 							/>
 							
@@ -823,7 +823,8 @@
 
 			<tal:block tal:define="global cur_sysnum python:0" />
 
-			<tbody class="systemsTable" tal:condition="add_cluster/nodes">
+			<tbody class="systemsTable" id="sys_tbody"
+				tal:condition="add_cluster/nodes">
 			 <tal:block tal:repeat="cur_sys add_cluster/nodes">
 				<tr class="systemsTable"
 					tal:define="sys python: add_cluster['nodes'][cur_sys]">
@@ -841,7 +842,7 @@
 						<tal:block tal:condition="not: exists: sys/auth">
 							<input type="password"
 								autocomplete="off"
-								onChange="pwd0Change(this.form)"
+								onchange="pwd0Change(this.form)"
 								tal:attributes="
 									value nothing;
 									class python: 'hbInputPass' + ('errors' in sys and ' error' or '');
@@ -850,7 +851,7 @@
 						</tal:block>
 
 						<tal:block tal:condition="exists: sys/auth">
-							<input type="text" onChange="pwd0Change(this.form)"
+							<input type="text" onchange="pwd0Change(this.form)"
 								disabled="disabled" value="[authenticated]"
 								tal:attributes="
 									class python: 'hbInputPass' + ('errors' in sys and ' error' or '');
@@ -889,7 +890,7 @@
 
 		<div class="hbSubmit" id="hbSubmit">
 			<input type="button" name="Submit" value="Add This Cluster"
-				onClick="validateForm(this.form)" />
+				onclick="validateForm(this.form)" />
 		</div>
 	</form>
 
@@ -958,7 +959,7 @@
 				</td></tr>
 			</tfoot>
 
-			<tbody class="systemsTable">
+			<tbody class="systemsTable" id="sys_tbody">
 				<tr class="systemsTable">
 					<td class="systemsTable">
 						<input class="hbInputSys" type="text"
@@ -968,7 +969,7 @@
 					</td>
 					<td class="systemsTable">
 						<input class="hbInputPass" type="password"
-							onChange="pwd0Change(this.form)"
+							onchange="pwd0Change(this.form)"
 							autocomplete="off"
 							id="__SYSTEM0:Passwd" name="__SYSTEM0:Passwd"
 							tal:attributes="
@@ -997,7 +998,7 @@
 
 		<div class="hbSubmit" id="hbSubmit">
 			<input type="button" name="Submit" value="Submit"
-				onClick="validateForm(this.form)" />
+				onclick="validateForm(this.form)" />
 		</div>
 	</form>
 </div>
--- conga/luci/homebase/homebase_common.js	2007/03/01 00:31:08	1.13.2.3
+++ conga/luci/homebase/homebase_common.js	2007/07/12 04:41:39	1.13.2.4
@@ -1,28 +1,34 @@
 function set_form_err(ielem) {
-	if (ielem)
+	if (ielem) {
 		ielem.className += ' formerror';
+	}
 }
 
 function clr_form_err(ielem) {
-	if (ielem)
+	if (ielem) {
 		ielem.className = ielem.className.replace(/( )?formerror/, '');
+	}
 }
 
 function toggle_visible(img_obj, elem_id, label_id) {
-	var elem = document.getElementById(elem_id)
-	if (!elem)
+	var elem = document.getElementById(elem_id);
+	if (!elem) {
 		return (-1);
+	}
 
 	var old_state = !!!elem.className.match(/invisible/i);
 
 	if (label_id) {
-		var label = document.getElementById(label_id);
-		if (!label)
+		var label_obj = document.getElementById(label_id);
+		if (!label_obj) {
 			return (-1);
-		if (old_state)
-			label.innerHTML = 'Show';
-		else
-			label.innerHTML = 'Hide';
+		}
+
+		if (old_state) {
+			label_obj.innerHTML = 'Show';
+		} else {
+			label_obj.innerHTML = 'Hide';
+		}
 	}
 
 	if (old_state) {
@@ -38,21 +44,26 @@
 }
 
 function is_valid_int(str, min, max) {
-	if (str.match(/[^0-9 -]/))
+	if (str.match(/[^0-9 -]/)) {
 		return (0);
+	}
 	var val = parseInt(str, 10);
-	if (isNaN(val))
+	if (isNaN(val)) {
 		return (0);
-	if (min !== null && val < min)
+	}
+	if (min !== null && val < min) {
 		return (0);
-	if (max !== null && val > max)
+	}
+	if (max !== null && val > max) {
 		return (0);
+	}
 	return (1);
 }
 
 function error_dialog(errors) {
-	if (!errors || errors.length < 1)
+	if (!errors || errors.length < 1) {
 		return (null);
+	}
 	alert('The following errors were found:\n\n' + errors.join('\n'));
 	return (-1);
 }
@@ -62,32 +73,38 @@
 }
 
 function str_is_valid(str, valid_regex_str) {
-	if (!str || !valid_regex_str)
+	if (!str || !valid_regex_str) {
 		return (null);
+	}
 	var re = eval(valid_regex_str);
 	var invalid = str.replace(re, '');
-	if (!invalid)
+	if (!invalid) {
 		return (null);
+	}
 	return (invalid);
 }
 
 function checkAllBoxes(str, val) {
 	var i = 0;
 	var element;
-	while ((element = document.getElementById(str + i++)))
+	while ((element = document.getElementById(str + i++))) {
 		element.checked = val;
+	}
 }
 
 function checkChildren(parent_cont, parent_input) {
-	if (!parent_cont || !parent_input)
+	if (!parent_cont || !parent_input) {
 		return;
+	}
 	var parent = document.getElementById(parent_cont);
 	var children = parent.getElementsByTagName('input');
 	for (var i = 0 ; i < children.length ; i++) {
-		if (children[i] == parent_input)
+		if (children[i] === parent_input) {
 			continue;
-		if (children[i].type == 'checkbox')
+		}
+		if (children[i].type === 'checkbox') {
 			children[i].checked = parent_input.checked;
+		}
 	}
 }
 
@@ -102,20 +119,21 @@
 function isValidHost(str) {
 	var i = str.split('.');
 
-	if (i.length == 1)
+	if (i.length === 1) {
 		return ('Hostnames must be fully qualified.');
+	}
 
-	if (i.length == 4 && !isNaN(parseInt(i[3]))) {
+	if (i.length === 4 && !isNaN(parseInt(i[3]))) {
 		var o1 = parseInt(i[0]);
 		var o2 = parseInt(i[1]);
 		var o3 = parseInt(i[2]);
 		var o4 = parseInt(i[3]);
 
 		if (isNaN(o1) || isNaN(o2) || isNaN(o3) ||
-			((o1 & 0xff) != o1) ||
-			((o2 & 0xff) != o2) ||
-			((o3 & 0xff) != o3) ||
-			((o4 & 0xff) != o4))
+			((o1 & 0xff) !== o1) ||
+			((o2 & 0xff) !== o2) ||
+			((o3 & 0xff) !== o3) ||
+			((o4 & 0xff) !== o4))
 		{
 			return ('Invalid IP Address.');
 		}
@@ -123,24 +141,28 @@
 		return (null);
 	}
 
-	if (!isNaN(parseInt(i[i.length - 1])))
+	if (!isNaN(parseInt(i[i.length - 1]))) {
 		return ('Invalid IP Address.');
+	}
 
-	if (!str.match(/^[0-9A-Za-z][0-9A-Za-z.-]*$/))
+	if (!str.match(/^[0-9A-Za-z][0-9A-Za-z.-]*$/)) {
 		return ('Hostnames can contain only alphanumeric characters and hyphens.');
+	}
 
 	return (null);
 }
 
 function view_certs_only(form, state) {
 	var num_systems = form.numStorage.value;
-	if (!form.numStorage)
+	if (!form.numStorage) {
 		return (-1);
+	}
 
 	if (state) {
 		var cb = document.getElementById('allSameCheckBox');
-		if (cb && cb.checked)
+		if (cb && cb.checked) {
 			cb.checked = false;
+		}
 	}
 
 	for (var i = 0 ; i < num_systems ; i++) {
@@ -154,8 +176,9 @@
 
 function allPasswdsSame(form) {
 	var cb = document.getElementById('allSameCheckBox');
-	if (!cb)
+	if (!cb) {
 		return (-1);
+	}
 	var num_systems = form.numStorage.value;
 
 	var state = cb.checked;
@@ -164,22 +187,25 @@
 	var first_system = 0;
 	for (var i = 0 ; i < num_systems ; i++) {
 		var passwd = document.getElementById('__SYSTEM' + i + ':Passwd');
-		if (!passwd || passwd.type != 'password')
-			continue
+		if (!passwd || passwd.type !== 'password') {
+			continue;
+		}
 		first_passwd = passwd.value;
 		first_system = i;
 		break;
 	}
 
-	if (first_passwd === null)
+	if (first_passwd === null) {
 		return (-1);
+	}
 
-	if (!first_passwd || !state)
+	if (!first_passwd || !state) {
 		first_passwd = '';
+	}
 
 	for (var i = first_system + 1 ; i < num_systems ; i++) {
 		var element = document.getElementById('__SYSTEM' + i + ':Passwd');
-		if (element && element.type == 'password') {
+		if (element && element.type === 'password') {
 			element.value = first_passwd;
 			element.disabled = state;
 		}
@@ -188,21 +214,24 @@
 
 function delete_element_id(id_str) {
 	var elem = document.getElementById(id_str);
-	if (!elem || !elem.parentNode)
+	if (!elem || !elem.parentNode) {
 		return (-1);
+	}
 	elem.parentNode.removeChild(elem);
 }
 
 function pwd0Change(form) {
 	var element = document.getElementById('allSameCheckBox');
-	if (element && element.checked)
+	if (element && element.checked) {
 		allPasswdsSame(form);
+	}
 }
 
 function addSystem(form) {
-	var sltab = document.getElementById('systemsTable');
-	if (!sltab)
+	var sltab = document.getElementById('sys_tbody');
+	if (!sltab) {
 		return;
+	}
 	var num_systems = form.numStorage.value;
 
 	var newsys = document.createElement('input');
@@ -223,8 +252,9 @@
 	var first_passwd = '';
 	for (var i = 0 ; i < num_systems - 1 ; i++) {
 		var pwd = document.getElementById('__SYSTEM' + i + ':Passwd');
-		if (!pwd || pwd.type != 'password')
+		if (!pwd || pwd.type !== 'password') {
 			continue;
+		}
 		first_passwd = pwd.value;
 		break;
 	}
@@ -247,11 +277,11 @@
 	dcol.className = 'systemsTable';
 	var del_img = document.createElement('img');
 	del_img.src = '/luci/delete-row.png';
-	del_img.title = 'delete this row'
-	del_img.className = 'deleteRow'
-	del_img.setAttribute('onClick', 'delete_element_id(\'' + newrow.id + '\')');
-	dcol.appendChild(del_img);
+	del_img.title = 'delete this row';
+	del_img.className = 'deleteRow';
+	del_img.onclick = new Function('delete_element_id(\'' + newrow.id + '\')');
 
+	dcol.appendChild(del_img);
 	hcol.appendChild(newsys);
 	pcol.appendChild(newsysp);
 	newrow.appendChild(hcol);
@@ -260,7 +290,7 @@
 	sltab.appendChild(newrow);
 
 	form.numStorage.value = ++num_systems;
-	if (num_systems == 2) {
+	if (num_systems === 2) {
 		var temp = document.getElementById('allSameDiv');
 		temp.style.visibility = 'visible';
 		temp.style.display = 'block';
@@ -269,20 +299,22 @@
 
 function validate_systems(form, errors) {
 	var allSameCB = document.getElementById('allSameCheckBox');
-	var added_storage = new Array();
+	var added_storage = [];
 	var num_systems = form.numStorage.value;
 
 	var view_certs = document.getElementById('view_certs');
-	if (view_certs)
+	if (view_certs) {
 		view_certs = view_certs.checked;
-	else
+	} else {
 		view_certs = false;
+	}
 
 	for (var i = 0 ; i < num_systems ; i++) {
 		var element = document.getElementById('__SYSTEM' + i + ':Addr');
 
-		if (!element)
+		if (!element) {
 			continue;
+		}
 		element.disabled = false;
 
 		var pwdElem = document.getElementById('__SYSTEM' + i + ':Passwd');
@@ -292,11 +324,13 @@
 				if (!allSameCB || !allSameCB.checked) {
 					errors.push('You entered a password, but no hostname for system ' + (i + 1));
 					clr_form_err(pwdElem);
-				} else
+				} else {
 					pwdElem.value = '';
+				}
 			}
-			if (pwdElem)
+			if (pwdElem) {
 				clr_form_err(pwdElem);
+			}
 			continue;
 		}
 
@@ -316,8 +350,9 @@
 		} else if (str_is_blank(pwdElem.value)) {
 			errors.push('The password entered for \"' + element.value + '\" is blank.');
 			set_form_err(pwdElem);
-		} else
+		} else {
 			clr_form_err(pwdElem);
+		}
 
 		if (str_is_blank(element.value)) {
 			errors.push('You entered a blank hostname for system ' + (i + 1));
--- conga/luci/homebase/index_html	2007/06/18 18:39:31	1.18.2.4
+++ conga/luci/homebase/index_html	2007/07/12 04:41:39	1.18.2.5
@@ -119,7 +119,7 @@
 
 		<div class="retmsgs" id="retmsgsdiv" tal:condition="python:(ret and 'messages' in ret and len(ret['messages']))">
 			<div class="hbclosebox">
-				<a href="javascript:hide_element('retmsgsdiv');"><img src="x.png" class="closeBox" title="dismiss"></a>
+				<img onclick="hide_element('retmsgsdiv')" src="x.png" class="closeBox" title="dismiss" />
 			</div>
 			<p class="retmsgs">Status messages:</p>
 			<ul class="statusmsg">
@@ -131,7 +131,7 @@
 
 		<div id="errmsgsdiv" class="errmsgs" tal:condition="python:(ret and 'errors' in ret and len(ret['errors']))">
 			<div class="hbclosebox">
-				<a class="hbclosebox" href="javascript:hide_element('errmsgsdiv');"><img src="x.png" class="closeBox" title="dismiss"></a>
+				<img onclick="hide_element('errmsgsdiv')" src="x.png" class="closeBox" title="dismiss">
 			</div>
 			<p class="errmsgs">The following errors occurred:</p>
 			<ul class="statusmsg">
--- conga/luci/homebase/validate_cluster_add.js	2007/06/18 18:39:31	1.4.2.3
+++ conga/luci/homebase/validate_cluster_add.js	2007/07/12 04:41:39	1.4.2.4
@@ -1,8 +1,9 @@
 function validateForm(form) {
-	var errors = new Array();
+	var errors = [];
 
-	if (!form)
+	if (!form) {
 		return (-1);
+	}
 
 	var clustername = form.clustername;
 	if (!clustername || str_is_blank(clustername.value)) {
@@ -18,34 +19,41 @@
 			if (invalid_chars) {
 				errors.push('The cluster name you gave contains the following invalid characters: "' + invalid_chars + '".');
 				set_form_err(form.clustername);
-			} else
+			} else {
 				clr_form_err(form.clustername);
+			}
 		}
 	}
 
 	var added_storage = validate_systems(form, errors);
 
-	if (error_dialog(errors))
+	if (error_dialog(errors)) {
 		return (-1);
+	}
 
-	if (!added_storage || added_storage.length < 1)
+	if (!added_storage || added_storage.length < 1) {
 		errors.push('You have not added any cluster nodes.');
+	}
 
-	if (error_dialog(errors))
+	if (error_dialog(errors)) {
 		return (-1);
+	}
 
 	var view_certs = document.getElementById('view_certs');
 	if (!view_certs || !view_certs.checked) {
 		var confirm_str = '';
-		if (form.addnode)
+		if (form.addnode) {
 			confirm_str = 'Add ' + (added_storage.length > 1 ? 'these nodes' : 'this node') + ' to the \"' + clustername + '\" cluster?';
-		else
+		} else {
 			confirm_str = 'Add the cluster \"' + clustername + '\" to the Luci management interface?';
+		}
 
-		if (confirm(confirm_str))
+		if (confirm(confirm_str)) {
 			form.submit();
-	} else
+		}
+	} else {
 		form.submit();
+	}
 
 	return (0);
 }
--- conga/luci/homebase/validate_cluster_add_initial.js	2006/07/18 19:25:20	1.1
+++ conga/luci/homebase/validate_cluster_add_initial.js	2007/07/12 04:41:39	1.1.2.1
@@ -1,22 +1,28 @@
 function validateForm(form) {
-	var errors = new Array();
+	var errors = [];
 
-	if (!form)
+	if (!form) {
 		return (-1);
+	}
 
 	var added_storage = validate_systems(form, errors);
 
-	if (error_dialog(errors))
+	if (error_dialog(errors)) {
 		return (-1);
+	}
 
-	if (!added_storage || added_storage.length < 1)
+	if (!added_storage || added_storage.length < 1) {
 		errors.push('You have not added any cluster nodes.');
+	}
 
-	if (error_dialog(errors))
+	if (error_dialog(errors)) {
 		return (-1);
+	}
 
 	if (confirm('Retrieve cluster information from ' + added_storage[0] + '?'))
+	{
 		form.submit();
+	}
 
 	return (0);
 }
--- conga/luci/homebase/validate_perm.js	2006/06/30 23:07:32	1.2
+++ conga/luci/homebase/validate_perm.js	2007/07/12 04:41:39	1.2.2.1
@@ -1,48 +1,58 @@
 function validateForm(form) {
-	var errors = new Array();
+	var errors = [];
 
-	if (!form || !form.userList)
+	if (!form || !form.userList) {
 		return (-1);
+	}
 
 	var userIdx = form.userList.selectedIndex;
-	if (userIdx < 0 || !form.userList.options[userIdx].value)
+	if (userIdx < 0 || !form.userList.options[userIdx].value) {
 		errors.push('You have not selected a valid user.');
+	}
 
-	if (error_dialog(errors))
+	if (error_dialog(errors)) {
 		return (-1);
+	}
 
 	var username = form.userList.options[userIdx].value;
-	var selected_clusters = new Array();
-	var selected_storage = new Array();
+	var selected_clusters = [];
+	var selected_storage = [];
 
-	if (!form)
+	if (!form) {
 		return (-1);
+	}
 
 	var num_clusters = document.getElementById('numClusters').value;
 	for (var i = 0 ; i < num_clusters ; i++) {
 		var element = document.getElementById('__CLUSTER' + i);
-		if (!element || !element.value || !element.checked)
+		if (!element || !element.value || !element.checked) {
 			continue;
+		}
 		selected_clusters.push(element.value);
 	}
 
 	var num_storage = document.getElementById('numStorage').value;
 	for (var i = 0 ; i < num_storage ; i++) {
 		var element = document.getElementById('__SYSTEM' + i);
-		if (!element || !element.value || !element.checked)
+		if (!element || !element.value || !element.checked) {
 			continue;
+		}
 		selected_storage.push(element.value);
 	}
 
-	if (error_dialog(errors))
+	if (error_dialog(errors)) {
 		return (-1);
+	}
 
-	if (selected_clusters.length + selected_storage.length < 1)
+	var confirm_str = '';
+	if (selected_clusters.length + selected_storage.length < 1) {
 		confirm_str = 'Remove all permissions for ' + username + '?';
-	else
+	} else {
 		confirm_str = 'Modify permissions for ' + username + '?';
+	}
 
-	if (confirm(confirm_str))
+	if (confirm(confirm_str)) {
 		form.submit();
+	}
 	return (0);
 }
--- conga/luci/homebase/validate_sys_add.js	2006/06/30 18:06:10	1.1
+++ conga/luci/homebase/validate_sys_add.js	2007/07/12 04:41:39	1.1.2.1
@@ -1,12 +1,14 @@
 function validateForm(form) {
-	var errors = new Array();
+	var errors = [];
 
-	if (!form)
+	if (!form) {
 		return (-1);
+	}
 
 	var added_storage = validate_systems(form, errors);
-	if (error_dialog(errors))
+	if (error_dialog(errors)) {
 		return (-1);
+	}
 
 	if (added_storage.length > 0 &&
 		confirm("Do you really want to add the following Storage Systems:\n" + added_storage.join('\n')))
--- conga/luci/homebase/validate_sys_remove.js	2006/12/22 17:50:16	1.2.2.1
+++ conga/luci/homebase/validate_sys_remove.js	2007/07/12 04:41:39	1.2.2.2
@@ -1,65 +1,77 @@
 function validateForm(form) {
-	var errors = new Array();
-	var selected_clusters = new Array();
-	var selected_storage = new Array();
+	var errors = [];
+	var selected_clusters = [];
+	var selected_storage = [];
 
-	if (!form)
+	if (!form) {
 		return (-1);
+	}
 
 	var num_clusters = document.getElementById('num_clusters').value;
 	for (var i = 0 ; i < num_clusters ; i++) {
 		var element = document.getElementById('__CLUSTER' + i);
-		if (!element || !element.value || !element.checked)
+		if (!element || !element.value || !element.checked) {
 			continue;
+		}
 		selected_clusters.push(element.value);
 	}
 
 	var num_storage = document.getElementById('num_storage').value;
 	for (var i = 0 ; i < num_storage ; i++) {
 		var element = document.getElementById('__SYSTEM' + i);
-		if (!element || !element.value || !element.checked)
+		if (!element || !element.value || !element.checked) {
 			continue;
+		}
 		selected_storage.push(element.value);
 	}
 
-	if (selected_clusters.length + selected_storage.length < 1)
+	if (selected_clusters.length + selected_storage.length < 1) {
 		return (0);
+	}
 
-	if (error_dialog(errors))
+	if (error_dialog(errors)) {
 		return (-1);
+	}
 
 	var confirm_str = 'Do you really want to remove the following managed systems:';
-	if (selected_clusters.length > 0)
+	if (selected_clusters.length > 0) {
 		confirm_str += '\nClusters:\n-' + selected_clusters.join('\n-');
+	}
 
 	if (selected_storage.length > 0) {
-		if (selected_clusters.length > 0)
+		if (selected_clusters.length > 0) {
 			confirm_str += '\n';
+		}
 
 		confirm_str += '\nStorage Systems:\n-' + selected_storage.join('\n-');
 	}
 
-	if (confirm(confirm_str))
+	if (confirm(confirm_str)) {
 		form.submit();
+	}
 	return (0);
 }
 
 function validateAuth(form) {
-	var errors = new Array();
+	var errors = [];
 
-	if (!form)
+	if (!form) {
 		return (-1);
+	}
 
 	var added_storage = validate_systems(form, errors);
 
-	if (error_dialog(errors))
+	if (error_dialog(errors)) {
 		return (-1);
+	}
 
-	if (!added_storage || added_storage.length < 1)
+	if (!added_storage || added_storage.length < 1) {
 		errors.push('You have not specified any hosts.');
+	}
 
-	if (error_dialog(errors))
+	if (error_dialog(errors)) {
 		return (-1);
+	}
 
 	form.submit();
 	return (0);
--- conga/luci/homebase/validate_user_add.js	2006/10/04 16:39:07	1.3
+++ conga/luci/homebase/validate_user_add.js	2007/07/12 04:41:39	1.3.2.1
@@ -1,8 +1,9 @@
 function validateForm(form) {
-	var errors = new Array()
+	var errors = [];
 
-	if (!form)
+	if (!form) {
 		return (-1);
+	}
 
 	if (!form.newUserName || !form.newUserName.value) {
 		errors.push('You did not enter a user name.');
@@ -12,8 +13,9 @@
 		if (invalid) {
 			errors.push('The user name you specified contains the following invalid characters: "' + invalid + '"');
 			set_form_err(form.newUserName);
-		} else
+		} else {
 			clr_form_err(form.newUserName);
+		}
 	}
 
 	if (!form.newPassword || !form.newPassword.value) {
@@ -43,9 +45,13 @@
 		}
 	}
 
-	if (error_dialog(errors))
+	if (error_dialog(errors)) {
 		return (-1);
+	}
+
 	if (confirm('Do you really want to add the user \"' + form.newUserName.value + '\"?'))
+	{
 		form.submit();
+	}
 	return (0);
 }
--- conga/luci/homebase/validate_user_del.js	2006/09/27 22:49:09	1.2
+++ conga/luci/homebase/validate_user_del.js	2007/07/12 04:41:39	1.2.2.1
@@ -1,8 +1,9 @@
 function validateForm(form) {
-	var errors = new Array();
+	var errors = [];
 
-	if (!form || !form.deluserId)
+	if (!form || !form.deluserId) {
 		return (-1);
+	}
 
 	var userIdx = form.deluserId.selectedIndex;
 	if (userIdx <= 0 ||
@@ -13,8 +14,10 @@
 		return (-1);
 	}
 
-	if (error_dialog(errors))
+	if (error_dialog(errors)) {
 		return (-1);
+	}
+
 	if (confirm('Do you really want to remove the user \"' +
 		form.deluserId.options[userIdx].value + '\"?'))
 	{


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]