Update plupload to 1.5b and add "drop area" for drag and drop uploading, see #18206
git-svn-id: http://svn.automattic.com/wordpress/trunk@18701 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -137,13 +137,6 @@ abbr.required {
|
||||
border-style: solid;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
height: 0;
|
||||
width: 0;
|
||||
overflow: hidden;
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* Specific to Uploader */
|
||||
|
||||
#media-upload p.ml-submit {
|
||||
@@ -370,3 +363,24 @@ h4.media-sub-title {
|
||||
#sort-buttons span {
|
||||
margin-right: 25px;
|
||||
}
|
||||
|
||||
.drag-drop #drag-drop-area {
|
||||
border: 4px dashed #DDDDDD;
|
||||
height: 300px;
|
||||
}
|
||||
|
||||
.drag-drop .drag-drop-inside {
|
||||
padding-top: 100px;
|
||||
}
|
||||
|
||||
.drag-drop .drag-drop-inside p {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.dragdrop-info {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.drag-drop .dragdrop-info {
|
||||
display: block;
|
||||
}
|
||||
|
||||
@@ -1485,7 +1485,7 @@ $plupload_init = array(
|
||||
'runtimes' => 'html5,silverlight,flash,html4',
|
||||
'browse_button' => 'plupload-browse-button',
|
||||
'container' => 'plupload-upload-ui',
|
||||
'drop_element' => 'wpwrap',
|
||||
'drop_element' => 'drag-drop-area',
|
||||
'file_data_name' => 'async-upload',
|
||||
'multiple_queues' => true,
|
||||
'max_file_size' => round( (int) $max_upload_size / 1024 ) . 'kb',
|
||||
@@ -1508,15 +1508,15 @@ resize_width = <?php echo get_option('large_size_w', 1024); ?>,
|
||||
wpUploaderInit = <?php echo json_encode($plupload_init); ?>;
|
||||
</script>
|
||||
|
||||
<div id="plupload-upload-ui" class="hide-if-no-js">
|
||||
<div id="plupload-upload-ui" class="hide-if-no-js drag-drop">
|
||||
<?php do_action('pre-plupload-upload-ui'); // hook change, old name: 'pre-flash-upload-ui' ?>
|
||||
|
||||
<p>
|
||||
<?php _e( 'Choose files to upload' ); ?>
|
||||
<input id="plupload-browse-button" type="button" value="<?php esc_attr_e('Select Files'); ?>" class="button" />
|
||||
<input id="cancel-upload" disabled="disabled" onclick="cancelUpload()" type="button" value="<?php esc_attr_e('Cancel Upload'); ?>" class="button" />
|
||||
</p>
|
||||
<p class="dragdrop-info"><?php _e('Or you can drop the files into this window.'); ?></p>
|
||||
<div id="drag-drop-area">
|
||||
<div class="drag-drop-inside">
|
||||
<p class="dragdrop-info"><?php _e('Drop files here or'); ?></p>
|
||||
<p><input id="plupload-browse-button" type="button" value="<?php esc_attr_e('Select Files'); ?>" class="button" />
|
||||
<input id="cancel-upload" disabled="true" onclick="cancelUpload()" type="button" value="<?php esc_attr_e('Cancel Upload'); ?>" class="button" /></p>
|
||||
</div>
|
||||
</div>
|
||||
<?php do_action('post-plupload-upload-ui'); // hook change, old name: 'post-flash-upload-ui' ?>
|
||||
</div>
|
||||
|
||||
@@ -1532,8 +1532,8 @@ wpUploaderInit = <?php echo json_encode($plupload_init); ?>;
|
||||
<?php do_action('post-html-upload-ui'); ?>
|
||||
</div>
|
||||
|
||||
<p class="media-upload-size"><?php printf( __( 'Maximum upload file size: %d%s' ), esc_html($upload_size_unit), esc_html($sizes[$u]) ); ?></p>
|
||||
<p class="howto"><?php _e('After a file has been uploaded, you can add titles and descriptions.'); ?></p>
|
||||
<p><?php printf( __( 'Maximum upload file size: %d%s.' ), esc_html($upload_size_unit), esc_html($sizes[$u]) ); ?>
|
||||
<?php _e('After a file has been uploaded, you can add titles and descriptions.'); ?></p>
|
||||
|
||||
<?php
|
||||
do_action('post-upload-ui');
|
||||
|
||||
Reference in New Issue
Block a user