Ticket #30453: 30453.patch
File 30453.patch, 6.3 KB (added by , 10 years ago) |
---|
-
src/wp-admin/css/edit.css
435 435 z-index: 999; 436 436 } 437 437 438 /* TinyMCE native fullscreen mode override */ 439 .mce-fullscreen #wp-content-wrap .mce-menubar, 440 .mce-fullscreen #wp-content-wrap .mce-toolbar-grp, 441 .mce-fullscreen #wp-content-wrap .mce-edit-area, 442 .mce-fullscreen #wp-content-wrap .mce-statusbar { 443 position: static !important; 444 width: auto !important; 445 padding: 0 !important; 446 } 447 448 .mce-fullscreen #wp-content-wrap .mce-statusbar { 449 visibility: visible !important; 450 } 451 452 .post-php.mce-fullscreen #wpadminbar, 453 .mce-fullscreen #wp-content-wrap .mce-wp-dfw { 454 display: none; 455 } 456 /* End TinyMCE native fullscreen mode override */ 457 438 458 #wp-content-editor-tools { 439 459 background-color: #f1f1f1; 440 460 padding-top: 20px; -
src/wp-admin/edit-form-advanced.php
512 512 <div id="postdivrich" class="postarea<?php if ( $_wp_editor_expand ) { echo ' wp-editor-expand'; } ?>"> 513 513 514 514 <?php wp_editor( $post->post_content, 'content', array( 515 '_content_editor_dfw' => true, 515 516 'drag_drop_upload' => true, 516 517 'tabfocus_elements' => 'content-html,save-post', 517 518 'editor_height' => 300, -
src/wp-admin/js/editor-expand.js
242 242 } 243 243 } 244 244 245 function mceFullscreenToggled( event ) { 246 if ( ! event.state ) { 247 adjust(); 248 } 249 } 250 245 251 // Adjust when switching editor modes. 246 252 function mceShow() { 247 253 $window.on( 'scroll.mce-float-panels', hideFloatPanels ); … … 280 286 editor.on( 'wp-toolbar-toggle', toggleAdvanced ); 281 287 // Adjust when the editor resizes. 282 288 editor.on( 'setcontent wp-autoresize wp-toolbar-toggle', adjust ); 283 // Don't hide the caret after undo/redo 289 // Don't hide the caret after undo/redo. 284 290 editor.on( 'undo redo', mceScroll ); 291 // Adjust when exiting TinyMCE's fullscreen mode. 292 editor.on( 'FullscreenStateChanged', mceFullscreenToggled ); 285 293 286 294 $window.off( 'scroll.mce-float-panels' ).on( 'scroll.mce-float-panels', hideFloatPanels ); 287 295 }; … … 293 301 editor.off( 'wp-toolbar-toggle', toggleAdvanced ); 294 302 editor.off( 'setcontent wp-autoresize wp-toolbar-toggle', adjust ); 295 303 editor.off( 'undo redo', mceScroll ); 304 editor.off( 'FullscreenStateChanged', mceFullscreenToggled ); 296 305 297 306 $window.off( 'scroll.mce-float-panels' ); 298 307 }; -
src/wp-includes/class-wp-editor.php
278 278 if ( $set['dfw'] ) 279 279 $qtInit['buttons'] .= ',fullscreen'; 280 280 281 if ( $ editor_id === 'content' && ! wp_is_mobile() )281 if ( $set['_content_editor_dfw'] ) { 282 282 $qtInit['buttons'] .= ',dfw'; 283 } 283 284 284 285 /** 285 286 * Filter the Quicktags settings. … … 549 550 $mce_buttons = apply_filters( 'teeny_mce_buttons', array('bold', 'italic', 'underline', 'blockquote', 'strikethrough', 'bullist', 'numlist', 'alignleft', 'aligncenter', 'alignright', 'undo', 'redo', 'link', 'unlink', 'fullscreen'), $editor_id ); 550 551 $mce_buttons_2 = $mce_buttons_3 = $mce_buttons_4 = array(); 551 552 } else { 552 $mce_buttons = array( 'bold', 'italic', 'strikethrough', 'bullist', 'numlist', 'blockquote', 'hr', 'alignleft', 'aligncenter', 'alignright', 'link', 'unlink', 'wp_more', 'spellchecker' , 'wp_adv');553 $mce_buttons = array( 'bold', 'italic', 'strikethrough', 'bullist', 'numlist', 'blockquote', 'hr', 'alignleft', 'aligncenter', 'alignright', 'link', 'unlink', 'wp_more', 'spellchecker' ); 553 554 554 if ( $ editor_id) {555 if ( $set['_content_editor_dfw'] ) { 555 556 $mce_buttons[] = 'dfw'; 556 557 } else { 557 558 $mce_buttons[] = 'fullscreen'; 558 559 } 559 560 561 $mce_buttons[] = 'wp_adv'; 562 560 563 /** 561 564 * Filter the first-row list of TinyMCE buttons (Visual tab). 562 565 * -
src/wp-includes/css/editor.css
1099 1099 margin: 5px 5px 0 0; 1100 1100 } 1101 1101 1102 .qt-fullscreen { 1103 position: static; 1104 margin: 2px; 1105 } 1106 1102 1107 @media screen and ( max-width: 782px ) { 1103 1108 .mce-toolbar .mce-btn button, 1104 1109 .qt-dfw { -
src/wp-includes/js/quicktags.js
301 301 ed.toolbar.innerHTML = html; 302 302 ed.theButtons = theButtons; 303 303 304 window.jQuery && window.jQuery( document ).trigger( 'quicktags-init', [ ed ] ); 304 if ( typeof jQuery !== 'undefined' ) { 305 jQuery( document ).triggerHandler( 'quicktags-init', [ ed ] ); 306 } 305 307 } 306 308 t.buttonsInitDone = true; 307 309 }; … … 416 418 dfw = ( wp = window.wp ) && wp.editor && wp.editor.dfw; 417 419 418 420 if ( this.id === 'fullscreen' ) { 419 return '<button type="button" id="' + idPrefix + this.id + '" class="ed_button qt-dfw "' + title + '></button>';421 return '<button type="button" id="' + idPrefix + this.id + '" class="ed_button qt-dfw qt-fullscreen"' + title + '></button>'; 420 422 } else if ( this.id === 'dfw' ) { 421 423 active = dfw && dfw.isActive() ? '' : ' disabled="disabled"'; 422 424 on = dfw && dfw.isOn() ? ' active' : ''; -
src/wp-includes/js/tinymce/plugins/wpfullscreen/plugin.js
65 65 tooltip: 'Distraction Free Writing', 66 66 shortcut: 'Alt+Shift+W', 67 67 onclick: toggleFullscreen, 68 classes: 'wp- dfwbtn widget' // This overwrites all classes on the container!68 classes: 'wp-fullscreen btn widget' // This overwrites all classes on the container! 69 69 }); 70 70 71 71 editor.addMenuItem( 'wp_fullscreen', {