diff --git a/src/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js b/src/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js index 3ba19b47bc..962360d875 100644 --- a/src/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js +++ b/src/wp-includes/js/tinymce/plugins/wpeditimage/plugin.js @@ -369,7 +369,7 @@ tinymce.PluginManager.add( 'wpeditimage', function( editor ) { dom.setStyles( toolbar, { top: rectangle.y, - left: rectangle.x + rectangle.w - toolbarSize.w + left: rectangle.x }); } diff --git a/src/wp-includes/js/tinymce/skins/wordpress/wp-content.css b/src/wp-includes/js/tinymce/skins/wordpress/wp-content.css index a5fb3e43ca..6b6d4c5c12 100644 --- a/src/wp-includes/js/tinymce/skins/wordpress/wp-content.css +++ b/src/wp-includes/js/tinymce/skins/wordpress/wp-content.css @@ -212,41 +212,37 @@ audio { border: 1px solid transparent; } -.wpview-type-audio { - padding: 24px 0 0; +.wpview-wrap.selected { + background-color: #f2f8ff; /* fallback to old blue */ + background-color: rgba(0,0,0,0.1); + border-color: #777; + border-color: rgba(0,0,0,0.3); } -.wpview-type-video { - padding: 0; +.wpview-overlay { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; } -.wont-play { - padding: 4px 0; -} - -.wont-play p { - font-size: 13px; - line-height: 1.3; - display: block; - width: 70%; - margin: 0 15%; - text-align: center; -} - -.wpview-type-gallery:after { - content: ''; - display: table; - clear: both; +.wpview-wrap.selected .wpview-overlay { + display: none; } .wpview-wrap .toolbar { position: absolute; top: 0; - right: 0; + left: 0; display: none; z-index: 100; } +.wpview-wrap.selected .toolbar { + display: block; +} + #wp-image-toolbar { position: absolute; } @@ -254,7 +250,7 @@ audio { .wpview-wrap .toolbar div, #wp-image-toolbar div { margin-top: 7px; - margin-right: 7px; + margin-left: 7px; padding: 2px; width: 30px; height: 30px; @@ -273,30 +269,26 @@ audio { color: #2ea2cc; } -/* temporary overrides; still pending styling */ -.wpview-type-audio .toolbar div, -.wont-play .toolbar div { - margin: 0; - padding: 3px; - width: 20px; - height: 20px; - box-shadow: none; - font-size: 20px; +/* Audio player is short; therefore let's put the toolbar above */ +.wpview-type-audio .toolbar { + top: -41px; } -.wpview-wrap.selected .toolbar, -.wpview-type-audio .toolbar, -.wpview-type-video .toolbar { +.wpview-type-audio .toolbar div:first-child { + margin-left: 0; +} + +.wont-play { + padding: 4px 0; +} + +.wont-play p { + font-size: 13px; + line-height: 1.3; display: block; -} - -.wpview-type-gallery.selected, -.wpview-type-audio, -.wpview-type-video { - background-color: #f2f8ff; /* fallback to old blue */ - background-color: rgba(0,0,0,0.1); - border-color: #777; - border-color: rgba(0,0,0,0.3); + width: 70%; + margin: 0 15%; + text-align: center; } .wpview-type-video .track-details, @@ -310,6 +302,12 @@ audio { text-overflow: ellipsis; } +.wpview-type-gallery:after { + content: ''; + display: table; + clear: both; +} + .gallery img[data-mce-selected]:focus { outline: none; } diff --git a/src/wp-includes/media-template.php b/src/wp-includes/media-template.php index 8499c76054..31913365ae 100644 --- a/src/wp-includes/media-template.php +++ b/src/wp-includes/media-template.php @@ -997,6 +997,7 @@ function wp_print_media_templates() {
{{{ data.model.caption }}}
<# } #> +
@@ -1027,6 +1029,7 @@ function wp_print_media_templates() {
+