Bmansurov has uploaded a new change for review. https://gerrit.wikimedia.org/r/172817
Change subject: Fix WikiGrokDialogB button spinner ...................................................................... Fix WikiGrokDialogB button spinner Bug: 73249 Change-Id: I019c19bd6d5ecc00a233d3a0697eba115e0b771f --- M javascripts/modules/wikigrok/WikiGrokDialogB.js M templates/modules/wikigrok/WikiGrokDialogB.hogan 2 files changed, 5 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/17/172817/1 diff --git a/javascripts/modules/wikigrok/WikiGrokDialogB.js b/javascripts/modules/wikigrok/WikiGrokDialogB.js index cabae47..b54b054 100644 --- a/javascripts/modules/wikigrok/WikiGrokDialogB.js +++ b/javascripts/modules/wikigrok/WikiGrokDialogB.js @@ -96,7 +96,6 @@ // only show the panel when we have created at least one button if ( self.$( '.ui-tag-button' ).length ) { - self.$( '.spinner' ).hide(); self.show(); } } ).fail( function () { @@ -124,6 +123,9 @@ this.$save = this.$( '.mw-ui-constructive' ); this.$save.on( 'click', function () { var answers = []; + + self.$save.attr( 'disabled', true ); + self.$( '.tags .ui-tag-button' ).each( function () { var $this = $( this ); answers.push( { @@ -135,7 +137,7 @@ } ); } ); - self.$( '.spinner' ).show(); + self.$( '.tags' ).html( '<div class="spinner loading"></div>' ); self.apiWikiGrokResponse.recordClaims( answers ).done( function () { self.$( '.tags, .footer' ).hide(); self.$( '.wg-content' ).text( 'You just made Wikipedia a little better, thanks!' ); @@ -156,7 +158,7 @@ postRender: function ( options ) { var self = this; - self.$( '.tags, .wg-link, .footer, .spinner' ).hide(); + self.$( '.tags, .wg-link, .footer' ).hide(); // show the welcome screen once if ( !options.beginQuestions ) { diff --git a/templates/modules/wikigrok/WikiGrokDialogB.hogan b/templates/modules/wikigrok/WikiGrokDialogB.hogan index e5a6b51..324c52a 100644 --- a/templates/modules/wikigrok/WikiGrokDialogB.hogan +++ b/templates/modules/wikigrok/WikiGrokDialogB.hogan @@ -21,6 +21,5 @@ <div class="footer"> <span class="license">All submissions are <a href="#/wikigrok/about">released freely</a>.</span> <button class="mw-ui-button mw-ui-constructive save">Next</button> - <div class="spinner loading"></div> </div> </div> -- To view, visit https://gerrit.wikimedia.org/r/172817 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I019c19bd6d5ecc00a233d3a0697eba115e0b771f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Bmansurov <bmansu...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits