Index: trunk/phase3/js2/editPage.js |
— | — | @@ -38,14 +38,15 @@ |
39 | 39 | } |
40 | 40 | } |
41 | 41 | ); |
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 ){ |
45 | 46 | $j( '#toolbar' ).append( '<img style="cursor:pointer" id="btn-add-media-wiz" src="' + |
46 | 47 | mv_skin_img_path + 'Button_add_media.png">' ); |
47 | 48 | $j( '#btn-add-media-wiz' ).addMediaWiz( |
48 | 49 | amwConf |
49 | 50 | ); |
50 | 51 | } |
51 | | - } |
| 52 | + },100) |
52 | 53 | }); |