Index: branches/MwEmbedStandAlone/modules/AddMedia/mw.RemoteSearchDriver.js |
— | — | @@ -2894,24 +2894,21 @@ |
2895 | 2895 | |
2896 | 2896 | // Update cancel button |
2897 | 2897 | $j( buttonPaneSelector ).append( |
2898 | | - $j('<a />') |
2899 | | - .attr('href', "#") |
2900 | | - .addClass( "preview_close" ) |
2901 | | - .text( gM('mwe-do-more-modification' ) ) |
2902 | | - .click( function() { |
2903 | | - $j( '#rsd_preview_display' ).remove(); |
2904 | | - var restoreTitle = gM( 'mwe-add_media_wizard' ) + ': ' + |
2905 | | - gM( 'rsd_resource_edit', resource.title ); |
2906 | | - |
2907 | | - // Restore title: |
2908 | | - $j( _this.target_container ).dialog( 'option', 'title', restoreTitle ); |
2909 | | - |
2910 | | - // Restore buttons (from the clipEdit object::) |
2911 | | - _this.clipEdit.updateInsertControlActions(); |
2912 | | - return false; |
2913 | | - }) |
| 2898 | + $j.btnHtml( gM('mwe-do-more-modification' ), 'preview_close', 'pencil' ) |
2914 | 2899 | ); |
| 2900 | + $j( buttonPaneSelector ).find('.preview_close') |
| 2901 | + .click( function() { |
| 2902 | + $j( '#rsd_preview_display' ).remove(); |
| 2903 | + var restoreTitle = gM( 'mwe-add_media_wizard' ) + ': ' + |
| 2904 | + gM( 'rsd_resource_edit', resource.title ); |
2915 | 2905 | |
| 2906 | + // Restore title: |
| 2907 | + $j( _this.target_container ).dialog( 'option', 'title', restoreTitle ); |
| 2908 | + |
| 2909 | + // Restore buttons (from the clipEdit object::) |
| 2910 | + _this.clipEdit.updateInsertControlActions(); |
| 2911 | + return false; |
| 2912 | + }) |
2916 | 2913 | // Get the preview wikitext |
2917 | 2914 | var embed_code = _this.getEmbedCode( resource ); |
2918 | 2915 | var pos = $j( _this.target_textbox ).textSelection( 'getCaretPosition' ); |