From 29e2d9f66a3dc9947c5c893015822396148051dd Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Sun, 9 Mar 2014 06:23:18 +0000 Subject: [PATCH] Since audio and video shortcodes don't point at actual attachments, don't persist the library's selection. Move the media instructions in the block that scrolls. See #27016. git-svn-id: https://develop.svn.wordpress.org/trunk@27480 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/js/media-views.js | 19 ++----------------- .../js/mediaelement/wp-mediaelement.css | 4 ++-- src/wp-includes/media-template.php | 4 ++-- 3 files changed, 6 insertions(+), 21 deletions(-) diff --git a/src/wp-includes/js/media-views.js b/src/wp-includes/js/media-views.js index 44f1d899a9..1bfe15a305 100644 --- a/src/wp-includes/js/media-views.js +++ b/src/wp-includes/js/media-views.js @@ -1228,20 +1228,6 @@ // Add all items in the selection to the library, so any featured // images that are not initially loaded still appear. library.observe( this.get('selection') ); - }, - - activate: function() { - this.updateSelection(); - media.controller.Library.prototype.activate.apply( this, arguments ); - }, - - updateSelection: function() { - var selection = this.get('selection'), - attachment; - - attachment = this.media.attachment; - - selection.reset( attachment ? [ attachment ] : [] ); } }); @@ -2816,7 +2802,7 @@ selection = state.get( 'selection' ), attachment = selection.single(); - controller.media.changeAttachment( attachment, state.display( attachment ) ); + controller.media.changeAttachment( attachment ); state.trigger( 'replace', controller.media.toJSON() ); @@ -2844,7 +2830,7 @@ selection = state.get( 'selection' ), attachment = selection.single(); - controller.media.setSource( attachment, state.display( attachment ) ); + controller.media.setSource( attachment ); state.trigger( 'add-source', controller.media.toJSON() ); @@ -2915,7 +2901,6 @@ menu: 'audio-details' } ), - new media.controller.MediaLibrary( { type: 'audio', id: 'add-audio-source', diff --git a/src/wp-includes/js/mediaelement/wp-mediaelement.css b/src/wp-includes/js/mediaelement/wp-mediaelement.css index 34750c3f70..6e3bb4b3b2 100644 --- a/src/wp-includes/js/mediaelement/wp-mediaelement.css +++ b/src/wp-includes/js/mediaelement/wp-mediaelement.css @@ -24,7 +24,7 @@ } .media-embed-details .instructions { - padding: 16px; + padding: 16px 0; max-width: 600px; } @@ -37,7 +37,7 @@ } .media-embed-details .embed-media-settings { - top: 70px; + top: 0; } .media-embed-details .embed-media-settings .checkbox-setting { diff --git a/src/wp-includes/media-template.php b/src/wp-includes/media-template.php index 3cd510098b..641be2f679 100644 --- a/src/wp-includes/media-template.php +++ b/src/wp-includes/media-template.php @@ -664,8 +664,8 @@ function wp_print_media_templates() {