From 0117e9f48d5753482bde1a254eb6419f1267d044 Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Wed, 28 Jul 2010 01:12:28 +0200 Subject: work on analyzeXorgLog - unsuccessful attempt to change Firefox's cursor - don't do anything when network error happens --- lib/rhbzpage.js | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/lib/rhbzpage.js b/lib/rhbzpage.js index 81c63fe..5f4f12c 100644 --- a/lib/rhbzpage.js +++ b/lib/rhbzpage.js @@ -660,6 +660,8 @@ RHBugzillaPage.prototype.analyzeXorgLog = function analyzeXorgLog(attachID) { "width=640,height=640,status=no,location=no"); var doc = infoWin.document; doc.body.innerHTML = "
";
+    // TODO var oldCursor = doc.body.style.cursor;
+    // doc.body.style.cursor = "wait";
     var preElem = doc.getElementById("textPre");
 
     attURL = "https://bugzilla.redhat.com/attachment.cgi?id=" + attachID;
@@ -667,17 +669,20 @@ RHBugzillaPage.prototype.analyzeXorgLog = function analyzeXorgLog(attachID) {
     Request({
         url: attURL,
         onComplete: function() {
-            var results = this.response.text.split("\n").
-                filter(function(line) {
-                    return (that.RE.soughtLines.test(line));
-                });
-            if (results.length > 0) {
-                results.forEach(function(l) {
-                    preElem.innerHTML += l + "\n";
-                });
-            } else {
-                preElem.innerHTML += "No matching lines found!";
-            }
+           if (this.response.status == 200) {
+                var results = this.response.text.split("\n").
+                    filter(function(line) {
+                        return (that.RE.soughtLines.test(line));
+                    });
+                if (results.length > 0) {
+                    results.forEach(function(l) {
+                        preElem.innerHTML += l + "\n";
+                    });
+                } else {
+                    preElem.innerHTML += "No matching lines found!";
+                }
+           }
+            // doc.body.style.cursor = oldCursor;
         }
     }).get();
 };
-- 
cgit