r113461 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113460‎ | r113461 | r113462 >
Date:09:33, 9 March 2012
Author:zaran
Status:reverted (Comments)
Tags:gerritmigration 
Comment:
Bug 34737 - Patch from ThomasPT (Tpt)
Modified paths:
  • /trunk/extensions/ProofreadPage/proofread.js (modified) (history)

Diff [purge]

Index: trunk/extensions/ProofreadPage/proofread.js
@@ -843,18 +843,18 @@
844844 };
845845
846846 var $edit = $( '#wpTextbox1' );
847 - if( typeof $edit.wikiEditor == 'function' ) {
848 - setTimeout(function() {
849 - $edit.wikiEditor( 'addToToolbar', {
850 - 'sections': {
851 - 'proofreadpage-tools': {
852 - 'type': 'toolbar',
853 - 'label': mw.msg( 'proofreadpage-section-tools' )
 847+ if( mw.user.options.get('usebetatoolbar') ) {
 848+ mw.loader.using('ext.wikiEditor.toolbar', function() {
 849+ $edit.wikiEditor( 'addToToolbar', {
 850+ 'sections': {
 851+ 'proofreadpage-tools': {
 852+ 'type': 'toolbar',
 853+ 'label': mw.msg( 'proofreadpage-section-tools' )
 854+ }
854855 }
855 - }
856 - } )
857 - .wikiEditor( 'addToToolbar', tools);
858 - }, 500);
 856+ } )
 857+ .wikiEditor( 'addToToolbar', tools);
 858+ } );
859859 } else {
860860 var toolbar = document.getElementById( 'toolbar' );
861861
@@ -896,18 +896,9 @@
897897 return;
898898 }
899899
900 - if( document.URL.indexOf( 'action=protect' ) > 0 || document.URL.indexOf( 'action=unprotect' ) > 0 ) {
 900+ if( $.inArray( mw.config.get( 'wgAction' ), ['protect', 'unprotect', 'delete', 'undelete', 'watch', 'unwatch', 'history'] ) !== -1 ) {
901901 return;
902902 }
903 - if( document.URL.indexOf( 'action=delete' ) > 0 || document.URL.indexOf( 'action=undelete' ) > 0 ) {
904 - return;
905 - }
906 - if( document.URL.indexOf( 'action=watch' ) > 0 || document.URL.indexOf( 'action=unwatch' ) > 0 ) {
907 - return;
908 - }
909 - if( document.URL.indexOf( 'action=history' ) > 0 ) {
910 - return;
911 - }
912903
913904 /* check if external URL is provided */
914905 if( !self.proofreadPageThumbURL ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r114398Revert r113358, r113461, r114004, r114122. Unreviewed revs in ProofreadPage....catrope19:44, 21 March 2012

Comments

#Comment by Raymond (talk | contribs)   09:37, 9 March 2012

Hi Zaran, please mention the bug summary too in your commit message: "Zoom buttons appear sometimes on the image, sometimes in the toolbar after update to MW 1.19" Makes life easier. Thanks :-)

Status & tagging log