Changeset 30573
- Timestamp:
- 11/26/2014 02:49:41 AM (10 years ago)
- Location:
- trunk/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/css/edit.css
r30002 r30573 435 435 z-index: 999; 436 436 } 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 */ 437 457 438 458 #wp-content-editor-tools { -
trunk/src/wp-admin/edit-form-advanced.php
r30539 r30573 12 12 13 13 wp_enqueue_script('post'); 14 $_wp_editor_expand = false;14 $_wp_editor_expand = $_content_editor_dfw = false; 15 15 16 16 /** … … 26 26 27 27 wp_enqueue_script('editor-expand'); 28 $_content_editor_dfw = true; 28 29 $_wp_editor_expand = ( get_user_setting( 'editor_expand', 'on' ) === 'on' ); 29 30 } … … 513 514 514 515 <?php wp_editor( $post->post_content, 'content', array( 516 '_content_editor_dfw' => $_content_editor_dfw, 515 517 'drag_drop_upload' => true, 516 518 'tabfocus_elements' => 'content-html,save-post', -
trunk/src/wp-admin/js/editor-expand.js
r30338 r30573 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() { … … 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 ); … … 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' ); … … 766 775 $editorIframe = $(), 767 776 _isActive = window.getUserSetting( 'editor_expand', 'on' ) === 'on', 768 _isOn = _isActive ? !! parseInt( window.getUserSetting( 'dfw', '1' ), 10 ): false,777 _isOn = _isActive ? window.getUserSetting( 'post_dfw' ) === 'on' : false, 769 778 traveledX = 0, 770 779 traveledY = 0, … … 826 835 fadeOut(); 827 836 828 window.setUserSetting( ' dfw', '1' );837 window.setUserSetting( 'post_dfw', 'on' ); 829 838 830 839 $document.trigger( 'dfw-on' ); … … 842 851 $editor.off( '.focus' ); 843 852 844 window.setUserSetting( ' dfw', '0' );853 window.setUserSetting( 'post_dfw', 'off' ); 845 854 846 855 $document.trigger( 'dfw-off' ); -
trunk/src/wp-includes/class-wp-editor.php
r30536 r30573 184 184 $wrap_class = 'wp-core-ui wp-editor-wrap ' . $switch_class; 185 185 186 if ( $set[' dfw'] ) {186 if ( $set['_content_editor_dfw'] ) { 187 187 $wrap_class .= ' has-dfw'; 188 188 } … … 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 /** … … 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 554 if ( $ editor_id) {553 $mce_buttons = array( 'bold', 'italic', 'strikethrough', 'bullist', 'numlist', 'blockquote', 'hr', 'alignleft', 'aligncenter', 'alignright', 'link', 'unlink', 'wp_more', 'spellchecker' ); 554 555 if ( $set['_content_editor_dfw'] ) { 555 556 $mce_buttons[] = 'dfw'; 556 557 } else { 557 558 $mce_buttons[] = 'fullscreen'; 558 559 } 560 561 $mce_buttons[] = 'wp_adv'; 559 562 560 563 /** -
trunk/src/wp-includes/css/editor.css
r30550 r30573 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, -
trunk/src/wp-includes/js/quicktags.js
r30338 r30573 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; … … 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"'; -
trunk/src/wp-includes/js/tinymce/plugins/wpfullscreen/plugin.js
r30338 r30573 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
Note: See TracChangeset
for help on using the changeset viewer.