Ticket #24177: 24177.patch
File 24177.patch, 3.0 KB (added by , 12 years ago) |
---|
-
wp-includes/js/tinymce/plugins/wpgallery/editor_plugin_src.js
23 23 return; 24 24 25 25 // Make sure we've selected a gallery node. 26 if ( el.nodeName != 'IMG' || ed.dom.getAttrib(el, 'class').indexOf('wp Gallery') == -1 )26 if ( el.nodeName != 'IMG' || ed.dom.getAttrib(el, 'class').indexOf('wp-gallery') == -1 ) 27 27 return; 28 28 29 29 frame = gallery.edit( '[' + ed.dom.getAttrib( el, 'title' ) + ']' ); … … 40 40 ed.dom.events.add(ed.getBody(), 'touchstart', function(e){ 41 41 var target = e.target; 42 42 43 if ( target.nodeName == 'IMG' && ed.dom.hasClass(target, 'wp Gallery') ) {43 if ( target.nodeName == 'IMG' && ed.dom.hasClass(target, 'wp-gallery') ) { 44 44 ed.selection.select(target); 45 45 ed.dom.events.cancel(e); 46 46 ed.plugins.wordpress._hideButtons(); … … 51 51 }); 52 52 53 53 ed.onMouseDown.add(function(ed, e) { 54 if ( e.target.nodeName == 'IMG' && ed.dom.hasClass(e.target, 'wp Gallery') ) {54 if ( e.target.nodeName == 'IMG' && ed.dom.hasClass(e.target, 'wp-gallery') ) { 55 55 ed.plugins.wordpress._hideButtons(); 56 56 ed.plugins.wordpress._showButtons(e.target, 'wp_gallerybtns'); 57 57 } … … 69 69 70 70 _do_gallery : function(co) { 71 71 return co.replace(/\[gallery([^\]]*)\]/g, function(a,b){ 72 return '<img src="'+tinymce.baseURL+'/plugins/wpgallery/img/t.gif" class="wp Gallery mceItem" title="gallery'+tinymce.DOM.encode(b)+'" />';72 return '<img src="'+tinymce.baseURL+'/plugins/wpgallery/img/t.gif" class="wp-gallery mceItem" title="gallery'+tinymce.DOM.encode(b)+'" />'; 73 73 }); 74 74 }, 75 75 … … 83 83 return co.replace(/(?:<p[^>]*>)*(<img[^>]+>)(?:<\/p>)*/g, function(a,im) { 84 84 var cls = getAttr(im, 'class'); 85 85 86 if ( cls.indexOf('wp Gallery') != -1 )86 if ( cls.indexOf('wp-gallery') != -1 ) 87 87 return '<p>['+tinymce.trim(getAttr(im, 'title'))+']</p>'; 88 88 89 89 return a; … … 130 130 tinymce.dom.Event.add(dellButton, 'mousedown', function(e) { 131 131 var ed = tinymce.activeEditor, el = ed.selection.getNode(); 132 132 133 if ( el.nodeName == 'IMG' && ed.dom.hasClass(el, 'wp Gallery') ) {133 if ( el.nodeName == 'IMG' && ed.dom.hasClass(el, 'wp-gallery') ) { 134 134 ed.dom.remove(el); 135 135 136 136 ed.execCommand('mceRepaint'); -
wp-includes/js/tinymce/themes/advanced/skins/wp_theme/content.css
127 127 background: transparent url("img/page_bug.gif") no-repeat right top; 128 128 } 129 129 130 img.wp Gallery {130 img.wp-gallery { 131 131 border: 1px dashed #888; 132 132 background: #f2f8ff url("img/gallery.png") no-repeat scroll center center; 133 133 width: 99%;