Ticket #28595: 28595.19.patch
File 28595.19.patch, 2.1 KB (added by , 11 years ago) |
---|
-
src/wp-includes/js/tinymce/plugins/wordpress/plugin.js
7 7 var DOM = tinymce.DOM, wpAdvButton, modKey, style, 8 8 last = 0; 9 9 10 editor.wp = editor.wp || {}; 11 12 editor.wp.setUIColor = function( selector, property ) { 13 var dom = editor.dom, 14 fn = this.setUIColor, 15 style = '', 16 bodyColor; 17 18 fn.colors = fn.colors || []; 19 20 if ( selector ) { 21 fn.colors.push({ 22 selector: selector, 23 property: property || 'color' 24 }); 25 } else { 26 bodyColor = dom.getStyle( editor.getBody(), 'color', true ); 27 tinymce.each( fn.colors, function( color ) { 28 style += color.selector + '{' + color.property + ':' + bodyColor + ';}'; 29 }); 30 31 if ( fn.styleElement ) { 32 dom.setHTML( fn.styleElement, style ); 33 } else { 34 fn.styleElement = dom.create( 'style', { type: 'text/css' }, style ); 35 editor.getDoc().head.appendChild( fn.styleElement ); 36 } 37 } 38 }; 39 40 jQuery( document ).on( 'editor-classchange.setUIColor', function() { 41 editor.wp.setUIColor(); 42 }); 43 10 44 function toggleToolbars( state ) { 11 45 var iframe, initial, toolbars, 12 46 pixels = 0; … … 354 388 }); 355 389 }); 356 390 } 391 392 setTimeout( function() { 393 editor.wp.setUIColor(); 394 }, 500 ); 357 395 }); 358 396 359 397 // Word count -
src/wp-includes/js/tinymce/plugins/wpview/plugin.js
13 13 _noop = function() { return false; }, 14 14 cursorInterval, lastKeyDownNode, setViewCursorTries, focus, execCommandView; 15 15 16 editor.on( 'preinit', function() { 17 editor.wp.setUIColor( '.has-focus .wpview-wrap.wpview-selection-before:before, .has-focus .wpview-wrap.wpview-selection-after:before', 'background-color' ); 18 }); 19 16 20 function getView( node ) { 17 21 return getParent( node, 'wpview-wrap' ); 18 22 }