r57863 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r57862‎ | r57863 | r57864 >
Date:20:22, 17 October 2009
Author:dale
Status:deferred
Tags:
Comment:
* fixes old toolbar usage where $j.wikiEditor is defined
Modified paths:
  • /trunk/phase3/js2/editPage.js (modified) (history)

Diff [purge]

Index: trunk/phase3/js2/editPage.js
@@ -38,14 +38,15 @@
3939 }
4040 }
4141 );
42 - }else{
43 - //add to the old-toolbar
44 - if( $j('#btn-add-media-wiz').length == 0 ){
 42+ }
 43+ //add to old toolbar if wikiEditor did not remove '#toolbar' from the page:
 44+ setTimeout(function(){
 45+ if( $j('#btn-add-media-wiz').length == 0 && $j( '#toolbar' ).length != 0 ){
4546 $j( '#toolbar' ).append( '<img style="cursor:pointer" id="btn-add-media-wiz" src="' +
4647 mv_skin_img_path + 'Button_add_media.png">' );
4748 $j( '#btn-add-media-wiz' ).addMediaWiz(
4849 amwConf
4950 );
5051 }
51 - }
 52+ },100)
5253 });

Status & tagging log