Media Grid: Show upload errors above the grid rather than as a popup.

props pento, stephdau, helen. fixes #29141.


git-svn-id: https://develop.svn.wordpress.org/trunk@29612 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Helen Hou-Sandi 2014-08-26 04:17:18 +00:00
parent d49f1405fd
commit 63205d3a43
2 changed files with 25 additions and 13 deletions

View File

@ -456,14 +456,12 @@ border color while dragging a file over the uploader drop area */
} }
.upload-php .mode-grid .media-sidebar { .upload-php .mode-grid .media-sidebar {
z-index: 1900; position: relative;
top: 102px; width: auto;
bottom: auto; margin-bottom: 16px;
background: #fff; padding: 0 16px;
border-left: none; border: 1px solid #c00;
padding: 16px; background-color: #feebe8;
-webkit-box-shadow: -1px 0 1px rgba(0,0,0,.3);
box-shadow: -1px 0 1px rgba(0,0,0,.3);
} }
.upload-php .mode-grid .hide-sidebar .media-sidebar { .upload-php .mode-grid .hide-sidebar .media-sidebar {
@ -473,12 +471,20 @@ border color while dragging a file over the uploader drop area */
.upload-php .mode-grid .media-sidebar .media-uploader-status { .upload-php .mode-grid .media-sidebar .media-uploader-status {
border-bottom: none; border-bottom: none;
padding-bottom: 0; padding-bottom: 0;
max-width: 100%;
}
.upload-php .mode-grid .media-sidebar .upload-error {
margin: 20px 0;
padding: 0;
border: none;
background: none;
} }
.upload-php .mode-grid .media-sidebar .media-uploader-status .upload-dismiss-errors { .upload-php .mode-grid .media-sidebar .media-uploader-status .upload-dismiss-errors {
font-size: 0; font-size: 0;
top: -20px; top: -12px;
right: -14px; right: -10px;
} }
.upload-php .mode-grid .media-sidebar .media-uploader-status .upload-dismiss-errors:before { .upload-php .mode-grid .media-sidebar .media-uploader-status .upload-dismiss-errors:before {
@ -1195,3 +1201,9 @@ audio, video {
width: 100%; width: 100%;
} }
} }
@media only screen and (max-width: 640px), screen and (max-height: 400px) {
.upload-php .mode-grid .media-sidebar{
max-width: 100%;
}
}

View File

@ -5749,12 +5749,12 @@
this.listenTo( this.controller, 'toggle:upload:attachment', _.bind( this.toggleUploader, this ) ); this.listenTo( this.controller, 'toggle:upload:attachment', _.bind( this.toggleUploader, this ) );
this.createToolbar(); this.createToolbar();
this.createUploader();
this.createAttachments();
this.updateContent();
if ( this.options.sidebar ) { if ( this.options.sidebar ) {
this.createSidebar(); this.createSidebar();
} }
this.createUploader();
this.createAttachments();
this.updateContent();
if ( ! this.options.sidebar || 'errors' === this.options.sidebar ) { if ( ! this.options.sidebar || 'errors' === this.options.sidebar ) {
this.$el.addClass( 'hide-sidebar' ); this.$el.addClass( 'hide-sidebar' );