]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-4981 List Component: show a spinner in the place of the checkbox while the...
authorStas Vilchik <vilchiks@gmail.com>
Mon, 3 Feb 2014 12:22:14 +0000 (18:22 +0600)
committerStas Vilchik <vilchiks@gmail.com>
Mon, 3 Feb 2014 12:22:22 +0000 (18:22 +0600)
sonar-server/src/main/webapp/javascripts/select-list.js
sonar-server/src/main/webapp/stylesheets/select-list.css

index 48a2657b021bd846e5039869832e2f5953e99c00..05ae748a4382b3f0a94d7d3f259412a251e96d46 100644 (file)
@@ -99,6 +99,7 @@
 
       data[this.settings.selectParameter] = this.model.get(this.settings.selectParameterValue);
 
+      that.$el.addClass('progress');
       $.ajax({
           url: url,
           type: 'POST',
           .done(function() {
             that.model.set('selected', !selected);
           })
-          .fail(showError);
+          .fail(showError)
+          .always(function() {
+            that.$el.removeClass('progress');
+          });
     }
   });
 
index 76bb94650c7a384dc20db0b8452be8403315102e..19b2b8c8263404cf4027a0a8c8db722e8f445a19 100644 (file)
@@ -31,7 +31,9 @@
     padding: 5px 10px;
     border-top: 1px solid #e0e0e0;
     color: #404040;
-    transition: all 0.3s ease;
+    transition: -webkit-transform 0.3s ease;
+    transition: -ms-transform 0.3s ease;
+    transition: transform 0.3s ease;
   }
 
   .select-list-list > li.removed {
             transform: translateX(100%);
   }
 
-.select-list-list > li.added {
-  -webkit-transform: translateX(-100%);
-     -moz-transform: translateX(-100%);
-      -ms-transform: translateX(-100%);
-       -o-transform: translateX(-100%);
-          transform: translateX(-100%);
-}
+  .select-list-list > li.added {
+    -webkit-transform: translateX(-100%);
+       -moz-transform: translateX(-100%);
+        -ms-transform: translateX(-100%);
+         -o-transform: translateX(-100%);
+            transform: translateX(-100%);
+  }
+
+  .select-list-list > li.progress {
+    background: url(../images/loading.gif) no-repeat 10px 5px;
+  }
+
+  .select-list-list > li.progress .select-list-list-checkbox {
+    visibility: hidden;
+  }
+
 
 .select-list-list-checkbox {
   display: inline-block;