mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Media Grid: display upload errors in a dismissable sidebar.
See #29037. Built from https://develop.svn.wordpress.org/trunk@29415 git-svn-id: http://core.svn.wordpress.org/trunk@29193 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
fd93879c86
commit
a58a4da852
@ -257,6 +257,11 @@
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
.upload-php .mode-grid .hide-sidebar .media-sidebar {
|
||||
top: 102px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.hide-toolbar .media-sidebar {
|
||||
bottom: 0;
|
||||
}
|
||||
|
2
wp-includes/css/media-views-rtl.min.css
vendored
2
wp-includes/css/media-views-rtl.min.css
vendored
File diff suppressed because one or more lines are too long
@ -257,6 +257,11 @@
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
.upload-php .mode-grid .hide-sidebar .media-sidebar {
|
||||
top: 102px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.hide-toolbar .media-sidebar {
|
||||
bottom: 0;
|
||||
}
|
||||
|
2
wp-includes/css/media-views.min.css
vendored
2
wp-includes/css/media-views.min.css
vendored
File diff suppressed because one or more lines are too long
@ -191,7 +191,7 @@
|
||||
var state = this.state();
|
||||
|
||||
// Browse our library of attachments.
|
||||
contentRegion.view = new media.view.AttachmentsBrowser({
|
||||
this.browserView = contentRegion.view = new media.view.AttachmentsBrowser({
|
||||
controller: this,
|
||||
collection: state.get('library'),
|
||||
selection: state.get('selection'),
|
||||
@ -201,7 +201,7 @@
|
||||
filters: state.get('filterable'),
|
||||
display: state.get('displaySettings'),
|
||||
dragInfo: state.get('dragInfo'),
|
||||
sidebar: false,
|
||||
sidebar: 'errors',
|
||||
|
||||
suggestedWidth: state.get('suggestedWidth'),
|
||||
suggestedHeight: state.get('suggestedHeight'),
|
||||
@ -210,6 +210,13 @@
|
||||
|
||||
scrollElement: document
|
||||
});
|
||||
|
||||
this.errors = wp.Uploader.errors;
|
||||
this.errors.on( 'add remove reset', this.sidebarVisibility, this );
|
||||
},
|
||||
|
||||
sidebarVisibility: function() {
|
||||
this.browserView.$( '.media-sidebar' ).toggle( this.errors.length );
|
||||
}
|
||||
});
|
||||
|
||||
|
2
wp-includes/js/media-grid.min.js
vendored
2
wp-includes/js/media-grid.min.js
vendored
File diff suppressed because one or more lines are too long
@ -5702,7 +5702,9 @@
|
||||
this.updateContent();
|
||||
if ( this.options.sidebar ) {
|
||||
this.createSidebar();
|
||||
} else {
|
||||
}
|
||||
|
||||
if ( ! this.options.sidebar || 'errors' === this.options.sidebar ) {
|
||||
this.$el.addClass( 'hide-sidebar' );
|
||||
}
|
||||
|
||||
|
2
wp-includes/js/media-views.min.js
vendored
2
wp-includes/js/media-views.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user