Media Grid: improve the design of upload errors.

Props celloexpressions.
See #29141.

Built from https://develop.svn.wordpress.org/trunk@29526


git-svn-id: http://core.svn.wordpress.org/trunk@29302 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2014-08-18 02:22:17 +00:00
parent 5aee14e9a1
commit 6d342e812f
6 changed files with 76 additions and 4 deletions

View File

@ -254,6 +254,40 @@
display: none;
}
.upload-php .mode-grid .media-sidebar {
background: #fff;
bottom: auto;
border-right: none;
padding: 16px;
box-shadow: -1px 0px 1px rgba(0,0,0,.3);
}
.upload-php .mode-grid .media-sidebar .media-uploader-status {
border-bottom: none;
padding-bottom: 0;
}
.upload-php .mode-grid .media-sidebar .media-uploader-status .upload-dismiss-errors {
font-size: 0;
top: -20px;
left: -14px;
}
.upload-php .mode-grid .media-sidebar .media-uploader-status .upload-dismiss-errors:before {
content: "\f158";
font: normal 20px/1 dashicons;
color: #666;
}
.upload-php .mode-grid .media-sidebar .media-uploader-status .upload-dismiss-errors:focus:before,
.upload-php .mode-grid .media-sidebar .media-uploader-status .upload-dismiss-errors:hover:before {
color: #2ea2cc;
}
.upload-php .mode-grid .media-sidebar .media-uploader-status.errors h3 {
display: none;
}
.hide-toolbar .media-sidebar {
bottom: 0;
}

File diff suppressed because one or more lines are too long

View File

@ -254,6 +254,40 @@
display: none;
}
.upload-php .mode-grid .media-sidebar {
background: #fff;
bottom: auto;
border-left: none;
padding: 16px;
box-shadow: -1px 0px 1px rgba(0,0,0,.3);
}
.upload-php .mode-grid .media-sidebar .media-uploader-status {
border-bottom: none;
padding-bottom: 0;
}
.upload-php .mode-grid .media-sidebar .media-uploader-status .upload-dismiss-errors {
font-size: 0;
top: -20px;
right: -14px;
}
.upload-php .mode-grid .media-sidebar .media-uploader-status .upload-dismiss-errors:before {
content: "\f158";
font: normal 20px/1 dashicons;
color: #666;
}
.upload-php .mode-grid .media-sidebar .media-uploader-status .upload-dismiss-errors:focus:before,
.upload-php .mode-grid .media-sidebar .media-uploader-status .upload-dismiss-errors:hover:before {
color: #2ea2cc;
}
.upload-php .mode-grid .media-sidebar .media-uploader-status.errors h3 {
display: none;
}
.hide-toolbar .media-sidebar {
bottom: 0;
}

File diff suppressed because one or more lines are too long

View File

@ -226,7 +226,11 @@
},
sidebarVisibility: function() {
this.browserView.$( '.media-sidebar' ).toggle( this.errors.length );
if ( this.errors.length ) {
this.browserView.$( '.media-sidebar' ).show();
} else {
this.browserView.$( '.media-sidebar' ).hide();
}
},
bindDeferred: function() {

File diff suppressed because one or more lines are too long