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

[Cluster-devel] conga/luci cluster/resource_form_handlers.js c ...



CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	rmccabe sourceware org	2006-10-04 17:24:58

Modified files:
	luci/cluster   : resource_form_handlers.js 
	                 validate_config_general.js 
	                 validate_config_multicast.js 
	                 validate_config_qdisk.js 
	luci/homebase  : homebase_common.js 

Log message:
	fix some javascript messiness

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/resource_form_handlers.js.diff?cvsroot=cluster&r1=1.18&r2=1.19
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/validate_config_general.js.diff?cvsroot=cluster&r1=1.2&r2=1.3
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/validate_config_multicast.js.diff?cvsroot=cluster&r1=1.2&r2=1.3
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/cluster/validate_config_qdisk.js.diff?cvsroot=cluster&r1=1.3&r2=1.4
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/homebase/homebase_common.js.diff?cvsroot=cluster&r1=1.12&r2=1.13

--- conga/luci/cluster/resource_form_handlers.js	2006/10/04 16:42:05	1.18
+++ conga/luci/cluster/resource_form_handlers.js	2006/10/04 17:24:58	1.19
@@ -228,13 +228,13 @@
 	var errors = valfn(form);
 	if (form.type.value != 'ip') {
 		if (!form.resourceName || str_is_blank(form.resourceName.value)) {
-			errors.push('No resource name was given.')
+			errors.push('No resource name was given.');
 			set_form_err(form.resourceName);
 		} else
 			clr_form_err(form.resourceName);
 	}
 
-	return (errors)
+	return (errors);
 }
 
 function validate_form(form) {
@@ -396,7 +396,7 @@
 	}
 
 	if (!form_xml)
-		errors.push('No resource information was submitted.')
+		errors.push('No resource information was submitted.');
 
 	if (error_dialog(errors))
 		return (-1);
--- conga/luci/cluster/validate_config_general.js	2006/09/27 22:24:11	1.2
+++ conga/luci/cluster/validate_config_general.js	2006/10/04 17:24:58	1.3
@@ -14,7 +14,7 @@
 	if (!form.cfgver || str_is_blank(form.cfgver.value)) {
 		errors.push('You did not specify a configuration version.');
 		set_form_err(form.cfgver);
-	else
+	} else
 		ver = form.cfgver.value;
 
 	if (ver && !is_valid_int(ver, 0, null)) {
--- conga/luci/cluster/validate_config_multicast.js	2006/09/27 22:24:11	1.2
+++ conga/luci/cluster/validate_config_multicast.js	2006/10/04 17:24:58	1.3
@@ -39,7 +39,7 @@
 		set_form_err(form.mcast[1]);
 	}
 
-	if (mcast != null) {
+	if (mcast !== null) {
 		clr_form_err(form.mcast[0]);
 		clr_form_err(form.mcast[1]);
 		clr_form_err(form.mcast_address);
--- conga/luci/cluster/validate_config_qdisk.js	2006/09/27 22:24:11	1.3
+++ conga/luci/cluster/validate_config_qdisk.js	2006/10/04 17:24:58	1.4
@@ -44,8 +44,7 @@
 
 	if (!confirm('Delete qurorum disk heuristic ' + (hnum + 1) + '?'))
 		return (-1);
-
-	heur_body.deleteRow(hnum)
+	heur_body.deleteRow(hnum);
 
 	for (var i = hnum + 1 ; i <= num_heur ; i++) {
 		var tr = document.getElementById('heuristic' + i);
@@ -160,7 +159,7 @@
 
 	var qpart = null;
 	if (form.quorumd[0].checked)
-		qpart = 0
+		qpart = 0;
 	else if (form.quorumd[1].checked)
 		qpart = 1;
 	else {
@@ -170,7 +169,7 @@
 		return (error_dialog(errors));
 	}
 
-	if (qpart != null) {
+	if (qpart !== null) {
 		clr_form_err(form.quorumd[0]);
 		clr_form_err(form.quorumd[1]);
 	}
@@ -241,7 +240,7 @@
 		var hnum = document.getElementById('num_heuristics');
 		if (hnum) {
 			hnum = Number(hnum.value);
-			if (hnum == 0)
+			if (hnum === 0)
 				hnum++;
 			for (var i = 0 ; i < hnum ; i++) {
 				var err = check_heuristic(i, form);
@@ -254,7 +253,7 @@
 	if (error_dialog(errors))
 		return (-1);
 	if (confirm('Update quorum partition properties?'))
-		form.submit()
+		form.submit();
 }
 
 var oldInput = null;
--- conga/luci/homebase/homebase_common.js	2006/09/27 22:49:09	1.12
+++ conga/luci/homebase/homebase_common.js	2006/10/04 17:24:58	1.13
@@ -14,9 +14,9 @@
 	var val = parseInt(str, 10);
 	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);
 }
@@ -51,9 +51,9 @@
 
 function checkChildren(parent_cont, parent_input) {
 	if (!parent_cont || !parent_input)
-		return
-	parent = document.getElementById(parent_cont);
-	children = parent.getElementsByTagName('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)
 			continue;
@@ -118,7 +118,7 @@
 		passwd = '';
 
 	for (var i = 1 ; i < num_systems ; i++) {
-		var element = document.getElementById('__SYSTEM' + i + ':Passwd')
+		var element = document.getElementById('__SYSTEM' + i + ':Passwd');
 		if (element && element.type == 'password') {
 			element.value = passwd;
 			element.disabled = state;
@@ -161,16 +161,16 @@
 
 	var newrow = document.createElement('tr');
 	newrow.className = 'systemsTable';
-	var hcol = document.createElement('td')
+	var hcol = document.createElement('td');
 	hcol.className = 'systemsTable';
-	var pcol = document.createElement('td')
+	var pcol = document.createElement('td');
 	pcol.className = 'systemsTable';
 
-	hcol.appendChild(newsys)
-	pcol.appendChild(newsysp)
-	newrow.appendChild(hcol)
-	newrow.appendChild(pcol)
-	sltab.appendChild(newrow)
+	hcol.appendChild(newsys);
+	pcol.appendChild(newsysp);
+	newrow.appendChild(hcol);
+	newrow.appendChild(pcol);
+	sltab.appendChild(newrow);
 
 	form.numStorage.value = ++num_systems;
 	if (num_systems == 2) {


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