Ticket #28533: 28533.2.patch
File 28533.2.patch, 5.3 KB (added by , 10 years ago) |
---|
-
src/wp-admin/js/post.js
1080 1080 body = editor.getBody(); 1081 1081 body.className = body.className.replace( /\bpost-format-[^ ]+/, '' ); 1082 1082 editor.dom.addClass( body, format == 'post-format-0' ? 'post-format-standard' : format ); 1083 editor.setUIColor(); 1083 1084 } 1084 1085 } 1085 1086 }); -
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.setUIColor = function( selector, property ) { 11 var dom = this.dom, 12 fn = this.setUIColor, 13 style = ''; 14 15 fn.colors = fn.colors || []; 16 17 if ( selector ) { 18 fn.colors.push( { 19 selector: selector, 20 property: property || 'color' 21 } ); 22 } else { 23 dom.getStyle( this.getBody(), 'color', true ) 24 .replace( /rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi, function( match, r, g, b ) { 25 tinymce.each( fn.colors, function( color ) { 26 style += color.selector + '{' + color.property + ':rgb(' + r + ',' + g + ',' + b + ');}'; 27 } ); 28 } ); 29 30 if ( fn.styleElement ) { 31 dom.setHTML( fn.styleElement, style ); 32 } else { 33 fn.styleElement = dom.create( 'style', { type: 'text/css' }, style ); 34 this.getDoc().head.appendChild( fn.styleElement ); 35 } 36 } 37 }; 38 10 39 function toggleToolbars( state ) { 11 40 var iframe, initial, toolbars, 12 41 pixels = 0; … … 328 357 } 329 358 }); 330 359 } 360 361 setTimeout( editor.setUIColor(), 250 ); 331 362 }); 332 363 333 364 // Word count -
src/wp-includes/js/tinymce/plugins/wpview/plugin.js
8 8 TreeWalker = tinymce.dom.TreeWalker, 9 9 toRemove = false; 10 10 11 editor.setUIColor( '.wpview-wrap[data-mce-selected]:before', 'border-color' ); 12 11 13 function getParentView( node ) { 12 14 while ( node && node.nodeName !== 'BODY' ) { 13 15 if ( isView( node ) ) { -
src/wp-includes/js/tinymce/skins/wordpress/wp-content.css
1 1 /* Additional default styles for the editor */ 2 2 3 html { 4 margin: 0 40px; 5 } 6 3 7 html.ios { 4 8 height: 100%; 5 9 } … … 14 18 font-size: 13px; 15 19 line-height: 19px; 16 20 color: #333; 17 margin: 10px; 21 margin: 9px auto; 22 max-width: 100%; 23 overflow: visible !important; 24 padding-top: 1px 0; /* This ensure margins are contained in the body. */ 25 18 26 } 19 27 20 28 /* DFW mode */ … … 188 196 */ 189 197 190 198 .wpview-wrap { 191 width: 99.99%; /* All IE need hasLayout, incl. 11 (ugh, not again!!) */ 192 position: relative; 199 -webkit-box-sizing: border-box; 200 -moz-box-sizing: border-box; 201 box-sizing: border-box; 193 202 clear: both; 203 margin-bottom: 16px; 204 position: relative; 205 width: 100%; /* All IE need hasLayout, incl. 11 (ugh, not again!!) */ 194 206 } 195 207 196 208 /* delegate the handling of the selection to the wpview tinymce plugin */ … … 225 237 /** 226 238 * Media previews 227 239 */ 228 .wpview-wrap {229 position: relative;230 margin-bottom: 16px;231 border: 1px solid transparent;232 }233 234 .wpview-wrap[data-mce-selected] {235 background-color: rgba(0,0,0,0.1);236 border-color: rgba(0,0,0,0.3);237 }238 240 239 .ie8 .wpview-wrap[data-mce-selected], 240 .ie7 .wpview-wrap[data-mce-selected] { 241 background-color: #e5e5e5; 242 border-color: #777; 241 .wpview-wrap[data-mce-selected]:before { 242 border: 2px dashed #333; 243 content: ''; 244 margin: 0; 245 opacity: 0.5; 246 padding: 0; 247 position: absolute; 248 top: -7px; 249 left: -7px; 250 right: -7px; 251 bottom: -7px; 252 z-index: -1; 243 253 } 244 254 245 255 .wpview-overlay { … … 256 266 257 267 .wpview-wrap .toolbar { 258 268 position: absolute; 259 top: 0;260 left: 0;269 left: -38px; 270 top: -5px; 261 271 display: none; 262 272 z-index: 100; 263 273 } … … 271 281 margin: 0; 272 282 } 273 283 274 .wpview-wrap .toolbar div,275 284 #wp-image-toolbar i { 276 285 margin-top: 7px; 277 286 margin-left: 7px; … … 286 295 font-size: 30px; 287 296 } 288 297 289 .ie8 .wpview-wrap .toolbar div, 290 .ie7 .wpview-wrap .toolbar div, 298 .wpview-wrap .toolbar div { 299 cursor: pointer; 300 display: block; 301 font-size: 30px; 302 opacity: 0.5; 303 width: 30px; 304 height: 30px; 305 -webkit-transition: opacity 0.1s ease-in 0; 306 -moz-transition: opacity 0.1s ease-in 0; 307 transition: opacity 0.1s ease-in 0; 308 } 309 310 .wpview-wrap .toolbar div:hover { 311 opacity: 1; 312 } 313 291 314 .ie8 #wp-image-toolbar i, 292 315 .ie7 #wp-image-toolbar i { 293 316 display: inline; … … 328 351 font-family: 'Open Sans', sans-serif; 329 352 } 330 353 331 .wpview-wrap .toolbar div:hover,332 354 #wp-image-toolbar i:hover { 333 355 box-shadow: 0 1px 3px rgba(0,0,0,0.8); 334 356 background-color: #000; 335 357 color: #2ea2cc; 336 358 } 337 359 338 /* Audio player is short; therefore let's put the toolbar above */339 .wpview-type-audio .toolbar {340 top: auto;341 bottom: -34px;342 }343 344 .wpview-type-audio .toolbar div {345 margin-top: 0;346 }347 348 .wpview-type-audio .toolbar div:first-child {349 margin-left: 0;350 }351 352 360 .wont-play { 353 361 padding: 4px 0; 354 362 }