r98432 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98431‎ | r98432 | r98433 >
Date:19:04, 29 September 2011
Author:catrope
Status:ok (Comments)
Tags:
Comment:
WikiEditor: Fix bug where ext.wikiEditor would load and wrap the textarea even if the toolbar was disabled. This has been reported to me on IRC but I'm not aware of any bug report in BZ
Modified paths:
  • /trunk/extensions/WikiEditor/WikiEditor.php (modified) (history)
  • /trunk/extensions/WikiEditor/modules/ext.wikiEditor.toolbar.hideSig.js (modified) (history)

Diff [purge]

Index: trunk/extensions/WikiEditor/WikiEditor.php
@@ -504,8 +504,5 @@
505505 ),
506506 'ext.wikiEditor.toolbar.hideSig' => $wikiEditorTpl + array(
507507 'scripts' => 'ext.wikiEditor.toolbar.hideSig.js',
508 - 'dependencies' => array(
509 - 'ext.wikiEditor',
510 - )
511508 ),
512509 );
Index: trunk/extensions/WikiEditor/modules/ext.wikiEditor.toolbar.hideSig.js
@@ -2,7 +2,10 @@
33 * Remove the signature button if the main namespace is edited.
44 */
55 $( document ).ready( function() {
6 - if ( !$.wikiEditor.isSupported( $.wikiEditor.modules.toolbar ) ) {
 6+ // This module is designed not to depend on ext.wikiEditor or jquery.wikiEditor.
 7+ // Removing this dependency fixed various bugs, but it does mean that we have to
 8+ // account for the situation where $.wikiEditor is not present
 9+ if ( !$.wikiEditor || !$.wikiEditor.isSupported( $.wikiEditor.modules.toolbar ) ) {
710 return;
811 }
912 if ( $( 'body' ).hasClass( 'ns-0' ) ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r98753MFT r98432, r98583reedy12:57, 3 October 2011
r102517REL1_18 MFT r98432, r99022reedy14:51, 9 November 2011

Comments

#Comment by NeilK (talk | contribs)   06:54, 8 November 2011

would have been easier to understand as !( a && b ), but marking okay anyway.

Status & tagging log