cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] conga/luci/storage storage_probing.js storage_ ...
@ 2007-10-22 19:49 rmccabe
  0 siblings, 0 replies; only message in thread
From: rmccabe @ 2007-10-22 19:49 UTC (permalink / raw)
  To: cluster-devel.redhat.com

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



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-10-22 19:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-22 19:49 [Cluster-devel] conga/luci/storage storage_probing.js storage_ rmccabe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).