Changeset 24215
- Timestamp:
- 05/09/2013 12:24:45 AM (12 years ago)
- Location:
- trunk/wp-includes/js/tinymce
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js
r24211 r24215 9 9 init : function(ed, url) { 10 10 var t = this, tbId = ed.getParam('wordpress_adv_toolbar', 'toolbar2'), last = 0, moreHTML, nextpageHTML, closeOnClick, mod_key, style; 11 moreHTML = '<img src="' + url + '/img/trans.gif" class="mce WPmore mceItemNoResize" title="'+ed.getLang('wordpress.wp_more_alt')+'" />';12 nextpageHTML = '<img src="' + url + '/img/trans.gif" class="mce WPnextpage mceItemNoResize" title="'+ed.getLang('wordpress.wp_page_alt')+'" />';11 moreHTML = '<img src="' + url + '/img/trans.gif" class="mce-wp-more mceItemNoResize" title="'+ed.getLang('wordpress.wp_more_alt')+'" />'; 12 nextpageHTML = '<img src="' + url + '/img/trans.gif" class="mce-wp-nextpage mceItemNoResize" title="'+ed.getLang('wordpress.wp_page_alt')+'" />'; 13 13 14 14 if ( getUserSetting('hidetb', '0') == '1' ) … … 384 384 var moreHTML, nextpageHTML; 385 385 386 moreHTML = '<img src="' + url + '/img/trans.gif" alt="$1" class="mce WPmore mceItemNoResize" title="'+ed.getLang('wordpress.wp_more_alt')+'" />';387 nextpageHTML = '<img src="' + url + '/img/trans.gif" class="mce WPnextpage mceItemNoResize" title="'+ed.getLang('wordpress.wp_page_alt')+'" />';386 moreHTML = '<img src="' + url + '/img/trans.gif" alt="$1" class="mce-wp-more mceItemNoResize" title="'+ed.getLang('wordpress.wp_more_alt')+'" />'; 387 nextpageHTML = '<img src="' + url + '/img/trans.gif" class="mce-wp-nextpage mceItemNoResize" title="'+ed.getLang('wordpress.wp_page_alt')+'" />'; 388 388 389 389 // Display morebreak instead if img in element path … … 392 392 ed.theme.onResolveName.add(function(th, o) { 393 393 if (o.node.nodeName == 'IMG') { 394 if ( ed.dom.hasClass(o.node, 'mce WPmore') )394 if ( ed.dom.hasClass(o.node, 'mce-wp-more') ) 395 395 o.name = 'wpmore'; 396 if ( ed.dom.hasClass(o.node, 'mce WPnextpage') )396 if ( ed.dom.hasClass(o.node, 'mce-wp-nextpage') ) 397 397 o.name = 'wppage'; 398 398 } … … 414 414 if (o.get) 415 415 o.content = o.content.replace(/<img[^>]+>/g, function(im) { 416 if (im.indexOf('class="mce WPmore') !== -1) {416 if (im.indexOf('class="mce-wp-more') !== -1) { 417 417 var m, moretext = (m = im.match(/alt="(.*?)"/)) ? m[1] : ''; 418 418 im = '<!--more'+moretext+'-->'; 419 419 } 420 if (im.indexOf('class="mce WPnextpage') !== -1)420 if (im.indexOf('class="mce-wp-nextpage') !== -1) 421 421 im = '<!--nextpage-->'; 422 422 … … 427 427 // Set active buttons if user selected pagebreak or more break 428 428 ed.onNodeChange.add(function(ed, cm, n) { 429 cm.setActive('wp_page', n.nodeName === 'IMG' && ed.dom.hasClass(n, 'mce WPnextpage'));430 cm.setActive('wp_more', n.nodeName === 'IMG' && ed.dom.hasClass(n, 'mce WPmore'));429 cm.setActive('wp_page', n.nodeName === 'IMG' && ed.dom.hasClass(n, 'mce-wp-nextpage')); 430 cm.setActive('wp_more', n.nodeName === 'IMG' && ed.dom.hasClass(n, 'mce-wp-more')); 431 431 }); 432 432 } -
trunk/wp-includes/js/tinymce/plugins/wpgallery/editor_plugin_src.js
r22952 r24215 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 … … 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); … … 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'); … … 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 }, … … 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 … … 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 -
trunk/wp-includes/js/tinymce/themes/advanced/skins/wp_theme/content.css
r24211 r24215 100 100 101 101 /* Styles for the WordPress plugins */ 102 img.mce WPnextpage,103 img.mce WPmore {102 img.mce-wp-nextpage, 103 img.mce-wp-more { 104 104 border: 0; 105 105 border-top: 1px dotted #cccccc; … … 110 110 } 111 111 112 img.mce WPmore {112 img.mce-wp-more { 113 113 background: transparent url("img/more_bug.gif") no-repeat right top; 114 114 } 115 115 116 img.mce WPnextpage {116 img.mce-wp-nextpage { 117 117 background: transparent url("img/page_bug.gif") no-repeat right top; 118 118 } 119 119 120 img.wp Gallery {120 img.wp-gallery { 121 121 border: 1px dashed #888; 122 122 background: #f2f8ff url("img/gallery.png") no-repeat scroll center center;
Note: See TracChangeset
for help on using the changeset viewer.