r112567 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112566‎ | r112567 | r112568 >
Date:02:36, 28 February 2012
Author:catrope
Status:ok
Tags:
Comment:
Fix scoping in r112451: isReady was accidentally used as a global variable
Modified paths:
  • /trunk/phase3/resources/mediawiki.action/mediawiki.action.edit.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/mediawiki.action/mediawiki.action.edit.js
@@ -9,7 +9,7 @@
1010 // If you want to add buttons, use
1111 // mw.toolbar.addButton( imageFile, speedTip, tagOpen, tagClose, sampleText, imageId, selectText );
1212 addButton : function() {
13 - if ( isReady ) {
 13+ if ( this.isReady ) {
1414 this.insertButton.apply( this, arguments );
1515 } else {
1616 this.buttons.push( [].slice.call( arguments ) );
@@ -48,7 +48,7 @@
4949
5050 onReady : function() {
5151 this.$toolbar = $( '#toolbar' );
52 - isReady = true;
 52+ this.isReady = true;
5353 // Legacy
5454 // Merge buttons from mwCustomEditButtons
5555 var buttons = [].concat( this.buttons, window.mwCustomEditButtons );

Follow-up revisions

RevisionCommit summaryAuthorDate
r1125701.19wmf1: MFT r111983, r112384, r112451, r112561, r112562, r112567catrope02:55, 28 February 2012
r112573[mediawiki.action.edit] Clean up and bug fixes...krinkle03:17, 28 February 2012
r112647MFT r112384, r112400, r112408, r112451, r112456, r112474, r112526, r112533, r...reedy21:21, 28 February 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r112451* Fix r111983 (bug 34662): make mw.toolbar.addButton() work even after DOM ready...tstarling22:46, 26 February 2012

Status & tagging log