[Cluster-devel] conga/luci/storage storage_probing.js storage_ ...

rmccabe at sourceware.org rmccabe at sourceware.org
Mon Oct 22 19:49:06 UTC 2007


CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	rmccabe at sourceware.org	2007-10-22 19:49:06

Modified files:
	luci/storage   : storage_probing.js storage_utils.js 
	                 storage_validation.js 

Log message:
	Fix browser issues with FF2 and IE on Windows

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/storage_probing.js.diff?cvsroot=cluster&r1=1.2&r2=1.3
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/storage_utils.js.diff?cvsroot=cluster&r1=1.3&r2=1.4
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/storage_validation.js.diff?cvsroot=cluster&r1=1.2&r2=1.3

--- conga/luci/storage/storage_probing.js	2007/09/25 22:47:05	1.2
+++ conga/luci/storage/storage_probing.js	2007/10/22 19:49:06	1.3
@@ -8,15 +8,7 @@
 */
 
 function strip_left(txt) {
-	for (var i = 0 ; i < txt.length ; i++) {
-		if (txt[i] == ' ' || txt[i] == '\n' ||
-			txt[i] == '\r' || txt[i] == '\t')
-		{
-			continue;
-		}
-		return txt.substr(i);
-	}
-	return txt;
+	return(res_txt.replace(/^\s+/g, ""));
 }
 
 function cache_report_callback() {
@@ -25,10 +17,10 @@
 		var list_URL = (window.location + '').substr(0, i);
 
 		if (xmlHttp_object.status == 200) {
-			res = xmlHttp_object.responseText;
+			var res = xmlHttp_object.responseText;
 			res = strip_left(res);
 			if (res.substr(0, 2) == "OK") {
-				window.location.reload();
+				window.location = window.location;
 			} else {
 				alert('An error has occured while probing storage:\n\n' + res);
 				window.location = list_URL;
--- conga/luci/storage/storage_utils.js	2007/09/26 21:36:08	1.3
+++ conga/luci/storage/storage_utils.js	2007/10/22 19:49:06	1.4
@@ -8,15 +8,7 @@
 */
 
 function strip_left(txt) {
-	for (var i = 0 ; i < txt.length ; i++) {
-		if (txt[i] == ' ' || txt[i] == '\n' ||
-			txt[i] == '\r' || txt[i] == '\t')
-		{
-			continue;
-		}
-		return txt.substr(i);
-	}
-	return txt;
+	return(res_txt.replace(/^\s+/g, ""));
 }
 
 function check_batch_callback() {
--- conga/luci/storage/storage_validation.js	2007/09/25 22:47:05	1.2
+++ conga/luci/storage/storage_validation.js	2007/10/22 19:49:06	1.3
@@ -304,15 +304,7 @@
 }
 
 function strip_left(txt) {
-	for (var i = 0 ; i < txt.length ; i++) {
-		if (txt[i] == ' ' || txt[i] == '\n' ||
-			txt[i] == '\r' || txt[i] == '\t')
-		{
-			continue;
-		}
-		return txt.substr(i);
-	}
-	return txt;
+	return(res_txt.replace(/^\s+/g, ""));
 }
 
 // Apply is a button, other ones are submits




More information about the Cluster-devel mailing list