bug/bug/bug.js |   29 ++++++++++++++++++++---------
 1 file changed, 20 insertions(+), 9 deletions(-)

New commits:
commit f88f9168ad9f2add93a473ac7992756275794c14
Author: Rob Snelders <programm...@ertai.nl>
Date:   Wed Aug 15 22:30:39 2012 +0200

    fdo#53082 - BUGZILLAASSISTANT: Improve exception handling for unavailable 
Bugzilla

diff --git a/bug/bug/bug.js b/bug/bug/bug.js
index 4401a50..ef69f8d 100644
--- a/bug/bug/bug.js
+++ b/bug/bug/bug.js
@@ -32,15 +32,25 @@
                } else {
                  message = url + '(' + $.param(args) + ') XHR error. ';
                }
-                if('status' in error) {
-                    message += 'status = ' + error.status + ' ';
-                }
-                if('responseText' in error) {
-                    message += 'responseText = ' + error.responseText + ' ';
-                }
-                if('statusText' in error) {
-                    message += 'statusText = ' + error.statusText + ' ';
-                }
+
+               if (url == "/enter_bug.cgi" && 'status' in error && 
(error.status == 404 || error.status == 0)) {
+                 message = "It seems there is a problem to connect with 
Bugzilla. Please try again later.";
+               }
+               else
+               {
+                    if('status' in error) {
+                       if(error.status == 404 || error.status == 0) {
+                           message += "Cannot find the URL specified.\n\n";
+                       }
+                        message += 'status = ' + error.status + ' ';
+                    }
+                    if('responseText' in error) {
+                        message += 'responseText = ' + error.responseText + ' 
';
+                    }
+                    if('statusText' in error) {
+                        message += 'statusText = ' + error.statusText + ' ';
+                    }
+               }
                 $.bug.error_set(message);
                 window.scrollTo(0,0);
                 throw error;
commit ae34849ece0012560ad087b5003a7adbe36118fa
Author: Rob Snelders <programm...@ertai.nl>
Date:   Wed Aug 15 22:08:00 2012 +0200

    fdo#50851 - BUGZILLAASSISTANT: Error message should be in focus

diff --git a/bug/bug/bug.js b/bug/bug/bug.js
index 9947ff2..4401a50 100644
--- a/bug/bug/bug.js
+++ b/bug/bug/bug.js
@@ -42,6 +42,7 @@
                     message += 'statusText = ' + error.statusText + ' ';
                 }
                 $.bug.error_set(message);
+                window.scrollTo(0,0);
                 throw error;
             });
         },
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to