]> source.dussan.org Git - sonarqube.git/commitdiff
Error handling in ajax filters
authorStas Vilchik <vilchiks@gmail.com>
Mon, 19 May 2014 14:54:39 +0000 (16:54 +0200)
committerStas Vilchik <vilchiks@gmail.com>
Mon, 19 May 2014 14:54:45 +0000 (16:54 +0200)
sonar-server/src/main/js/navigator/filters/ajax-select-filters.js
sonar-server/src/main/less/navigator/filters.less

index 06f5c13e7a9f038871f70862b9fffa994d0d75b3..3c7f200120559ac6db11fafd27a45d96056ee967 100644 (file)
@@ -144,6 +144,11 @@ define([
             });
             that.updateLists();
             that.$el.removeClass('fetching');
+            that.$('.navigator-filter-search').removeClass('fetching-error');
+          },
+          error: function() {
+            console.log(arguments);
+            that.showSearchError();
           }
         });
       } else {
@@ -153,6 +158,12 @@ define([
     },
 
 
+    showSearchError: function() {
+      this.$el.removeClass('fetching');
+      this.$('.navigator-filter-search').addClass('fetching-error');
+    },
+
+
     scroll: function() {
       var that = this,
           el = this.$('.choices'),
index 95419fb428dda7ec975a01ff08faba207831e9df..e049c8ad87eb76b38e6ef73cf074359993e05ae5 100644 (file)
     .square(16px);
     background: #fff url(../images/loading.gif) no-repeat center center;
   }
+
+  &.fetching-error {
+
+    input { border: 2px solid @red; }
+  }
 }
 
 .navigator-filter-load-more {