Make WordPress Core

Ticket #20094: 20094.diff

File 20094.diff, 1.3 KB (added by mdawaffe, 15 years ago)
  • wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin_src.js

     
    1 
    21(function() {
    32        tinymce.create('tinymce.plugins.wpEditImage', {
    43
    … …  
    109
    1110                        // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('...');
    1211                        ed.addCommand('WP_EditImage', function() {
    13                                 var el = ed.selection.getNode(), vp = tinymce.DOM.getViewPort(), H = vp.h, W = ( 720 < vp.w ) ? 720 : vp.w, cls = ed.dom.getAttrib(el, 'class');
     12                                var el = ed.selection.getNode(), vp = tinymce.DOM.getViewPort(), H = vp.h, W = ( 720 < vp.w ) ? 720 : vp.w, cls = ed.dom.getAttrib(el, 'class'), iframeURL;
    1413
    1514                                if ( cls.indexOf('mceItem') != -1 || cls.indexOf('wpGallery') != -1 || el.nodeName != 'IMG' )
    1615                                        return;
    1716
    18                                 tb_show('', url + '/editimage.html?ver=321&TB_iframe=true');
     17                                iframeURL = url.replace( /^https?:\/\/[^\/]+/i, document.location.protocol + '//' + document.location.host );
     18                                tb_show( '', tinymce._addVer( iframeURL + '/editimage.html' ) + '&TB_iframe=true' );
    1919                                tinymce.DOM.setStyles('TB_window', {
    2020                                        'width':( W - 50 )+'px',
    2121                                        'height':( H - 45 )+'px',