Merge "mediawiki.page.watch.ajax: Disable watch link while waiting for API response"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 19 May 2014 15:20:26 +0000 (15:20 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 19 May 2014 15:20:26 +0000 (15:20 +0000)
resources/src/mediawiki.page/mediawiki.page.watch.ajax.js
skins/vector/components/watchstar.less

index 3b0aeee..15e9aba 100644 (file)
                        $li.prop( 'id', 'ca-' + action );
                }
 
-               // Special case for vector icon
-               if ( $li.hasClass( 'icon' ) ) {
-                       if ( state === 'loading' ) {
-                               $link.addClass( 'loading' );
-                       } else {
-                               $link.removeClass( 'loading' );
-                       }
+               if ( state === 'loading' ) {
+                       $link.addClass( 'loading' );
+               } else {
+                       $link.removeClass( 'loading' );
                }
        }
 
 
                        $link = $( this );
 
+                       if ( $link.hasClass( 'loading' ) ) {
+                               return;
+                       }
+
                        updateWatchLink( $link, action, 'loading' );
 
                        api = new mw.Api();
index 1a6d1fc..a389ed6 100644 (file)
@@ -36,6 +36,8 @@
        .rotation(700ms);
        /* Suppress the hilarious rotating focus outline on Firefox */
        outline: none;
+       cursor: default;
+       pointer-events: none;
        background-position: 50% 60%;
        -webkit-transform-origin: 50% 57%;
        transform-origin: 50% 57%;