Ticket #28595: 28595.13.patch
File 28595.13.patch, 2.5 KB (added by , 10 years ago) |
---|
-
src/wp-admin/js/post.js
1081 1081 body = editor.getBody(); 1082 1082 body.className = body.className.replace( /\bpost-format-[^ ]+/, '' ); 1083 1083 editor.dom.addClass( body, format == 'post-format-0' ? 'post-format-standard' : format ); 1084 editor.wp.setUIColor(); 1084 1085 } 1085 1086 } 1086 1087 }); -
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 10 40 function toggleToolbars( state ) { 11 41 var iframe, initial, toolbars, 12 42 pixels = 0; … … 352 382 }); 353 383 }); 354 384 } 385 386 setTimeout( editor.wp.setUIColor(), 500 ); 355 387 }); 356 388 357 389 // Word count -
src/wp-includes/js/tinymce/plugins/wpview/plugin.js
11 11 firstFocus = true, 12 12 cursorInterval, lastKeyDownNode, setViewCursorTries, focus; 13 13 14 editor.on( 'preinit', function() { 15 editor.wp.setUIColor( '.has-focus .wpview-wrap.wpview-selection-before:before, .has-focus .wpview-wrap.wpview-selection-after:before', 'background-color' ); 16 }); 17 14 18 function getView( node ) { 15 19 return editor.dom.getParent( node, function( node ) { 16 20 return editor.dom.hasClass( node, 'wpview-wrap' );