Changeset 27901
- Timestamp:
- 04/02/2014 02:41:24 AM (11 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/edit-form-advanced.php
r27864 r27901 480 480 <?php wp_editor( $post->post_content, 'content', array( 481 481 'dfw' => true, 482 'drag_drop_upload' => true, 482 483 'tabfocus_elements' => 'insert-media-button,save-post', 483 484 'editor_height' => 360, -
trunk/src/wp-includes/class-wp-editor.php
r27897 r27901 25 25 private static $has_medialib = false; 26 26 private static $editor_buttons_css = true; 27 private static $drag_drop_upload = false; 27 28 28 29 private function __construct() {} … … 39 40 * @type string $default_editor When both TinyMCE and Quicktags are used, set which 40 41 * editor is shown on page load. Default empty. 42 * @type bool $drag_drop_upload Whether to enable drag & drop on the editor uploading. Default false. 43 * Requires the media modal. 41 44 * @type string $textarea_name Give the textarea a unique name here. Square brackets 42 45 * can be used here. Default $editor_id. … … 64 67 'media_buttons' => true, 65 68 'default_editor' => '', 69 'drag_drop_upload' => false, 66 70 'textarea_name' => $editor_id, 67 71 'textarea_rows' => 20, … … 124 128 $switch_class = 'html-active'; 125 129 $toolbar = $buttons = $autocomplete = ''; 130 131 if ( $set['drag_drop_upload'] ) { 132 self::$drag_drop_upload = true; 133 } 126 134 127 135 if ( ! empty( $set['editor_height'] ) ) … … 981 989 baseURL: "<?php echo self::$baseurl; ?>", 982 990 suffix: "<?php echo $suffix; ?>", 991 <?php 992 993 if ( self::$drag_drop_upload ) { 994 echo 'dragDropUpload: true,'; 995 } 996 997 ?> 983 998 mceInit: <?php echo $mceInit; ?>, 984 999 qtInit: <?php echo $qtInit; ?>, -
trunk/src/wp-includes/js/media-views.js
r27898 r27901 3132 3132 this.initialized = false; 3133 3133 3134 // Bail if UA does not support drag'n'drop or File API.3135 if ( ! this.browserSupport() ) {3134 // Bail if not enabled or UA does not support drag'n'drop or File API. 3135 if ( ! window.tinyMCEPreInit || ! window.tinyMCEPreInit.dragDropUpload || ! this.browserSupport() ) { 3136 3136 return this; 3137 3137 } -
trunk/src/wp-includes/js/tinymce/plugins/wordpress/plugin.js
r27857 r27901 312 312 } 313 313 314 dom.bind( doc, 'dragstart dragend dragover drop', function( event ) { 315 if ( typeof window.jQuery !== 'undefined' ) { 316 // Trigger the jQuery handlers. 317 window.jQuery( document ).triggerHandler( event.type ); 318 } 319 }); 314 if ( window.tinyMCEPreInit && window.tinyMCEPreInit.dragDropUpload ) { 315 dom.bind( doc, 'dragstart dragend dragover drop', function( event ) { 316 if ( typeof window.jQuery !== 'undefined' ) { 317 // Trigger the jQuery handlers. 318 window.jQuery( document ).triggerHandler( event.type ); 319 } 320 }); 321 } 320 322 }); 321 323
Note: See TracChangeset
for help on using the changeset viewer.