Changeset 19977
- Timestamp:
- 02/22/2012 03:05:25 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin_src.js
r19945 r19977 11 11 // Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('...'); 12 12 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');13 var el = ed.selection.getNode(), vp, H, W, cls = ed.dom.getAttrib(el, 'class'); 14 14 15 15 if ( cls.indexOf('mceItem') != -1 || cls.indexOf('wpGallery') != -1 || el.nodeName != 'IMG' ) 16 16 return; 17 17 18 tb_show('', url + '/editimage.html?ver=321&TB_iframe=true'); 19 tinymce.DOM.setStyles('TB_window', { 20 'width':( W - 50 )+'px', 21 'height':( H - 45 )+'px', 22 'margin-left':'-'+parseInt((( W - 50 ) / 2),10) + 'px' 18 vp = tinymce.DOM.getViewPort(); 19 H = 680 < (vp.h - 70) ? 680 : vp.h - 70; 20 W = 650 < vp.w ? 650 : vp.w; 21 22 ed.windowManager.open({ 23 file: url + '/editimage.html', 24 width: W+'px', 25 height: H+'px', 26 inline: true 23 27 }); 24 25 if ( ! tinymce.isIE6 ) {26 tinymce.DOM.setStyles('TB_window', {27 'top':'20px',28 'marginTop':'0'29 });30 }31 32 tinymce.DOM.setStyles('TB_iframeContent', {33 'width':( W - 50 )+'px',34 'height':( H - 75 )+'px'35 });36 tinymce.DOM.setStyle( ['TB_overlay','TB_window','TB_load'], 'z-index', '999999' );37 28 }); 38 29
Note: See TracChangeset
for help on using the changeset viewer.