mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 04:40:26 +00:00
Revert [27528] until Flash in Firefox behaves :(
See #27389. git-svn-id: https://develop.svn.wordpress.org/trunk@27530 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -25,8 +25,8 @@ tinymce.PluginManager.add('wpgallery', function( editor ) {
|
||||
}
|
||||
|
||||
function replaceAVShortcodes( content ) {
|
||||
var testRegex = /\[(video-playlist|playlist)[^\]]*\]/,
|
||||
replaceRegex = /\[(video-playlist|playlist)[^\]]*\]([\s\S]*?\[\/\1\])?/;
|
||||
var testRegex = /\[(video-playlist|audio|video|playlist)[^\]]*\]/,
|
||||
replaceRegex = /\[(video-playlist|audio|video|playlist)[^\]]*\]([\s\S]*?\[\/\1\])?/;
|
||||
|
||||
while ( testRegex.test( content ) ) {
|
||||
content = content.replace( replaceRegex, replaceCallback );
|
||||
@@ -92,6 +92,31 @@ tinymce.PluginManager.add('wpgallery', function( editor ) {
|
||||
editor.dom.setAttrib( node, 'data-wp-media', window.encodeURIComponent( shortcode ) );
|
||||
frame.detach();
|
||||
});
|
||||
} else if ( editor.dom.hasClass( node, 'wp-video' ) ) {
|
||||
frame = wp.media.video.edit( data );
|
||||
frame.on( 'close', function () {
|
||||
frame.detach();
|
||||
} );
|
||||
frame.state( 'video-details' ).on(
|
||||
'update replace add-source select-poster-image add-track',
|
||||
function ( selection ) {
|
||||
var shortcode = wp.media.video.shortcode( selection );
|
||||
editor.dom.setAttrib( node, 'data-wp-media', window.encodeURIComponent( shortcode ) );
|
||||
frame.detach();
|
||||
}
|
||||
);
|
||||
frame.open();
|
||||
} else if ( editor.dom.hasClass( node, 'wp-audio' ) ) {
|
||||
frame = wp.media.audio.edit( data );
|
||||
frame.on( 'close', function () {
|
||||
frame.detach();
|
||||
} );
|
||||
frame.state( 'audio-details' ).on( 'update replace add-source', function ( selection ) {
|
||||
var shortcode = wp.media.audio.shortcode( selection );
|
||||
editor.dom.setAttrib( node, 'data-wp-media', window.encodeURIComponent( shortcode ) );
|
||||
frame.detach();
|
||||
} );
|
||||
frame.open();
|
||||
} else {
|
||||
// temp
|
||||
window.console && window.console.log( 'Edit AV shortcode ' + data );
|
||||
|
||||
@@ -237,32 +237,14 @@ img::selection {
|
||||
/**
|
||||
* Gallery preview
|
||||
*/
|
||||
.wpview-type-gallery,
|
||||
.wpview-type-audio,
|
||||
.wpview-type-video {
|
||||
.wpview-type-gallery {
|
||||
position: relative;
|
||||
padding: 0 0 12px;
|
||||
margin-bottom: 16px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.wpview-type-audio {
|
||||
padding: 32px 0 0;
|
||||
}
|
||||
|
||||
.wpview-type-video {
|
||||
padding: 16px 0 0;
|
||||
}
|
||||
|
||||
.wpview-type-audio audio,
|
||||
.wpview-type-video video {
|
||||
display: inline-block;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.wpview-type-gallery:after,
|
||||
.wpview-type-audio:after,
|
||||
.wpview-type-video:after {
|
||||
.wpview-type-gallery:after {
|
||||
content: '';
|
||||
display: block;
|
||||
height: 0;
|
||||
@@ -270,18 +252,11 @@ img::selection {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.wpview-type-gallery.selected {
|
||||
.wpview-type-gallery.selected {
|
||||
background-color: #efefef;
|
||||
}
|
||||
|
||||
.wpview-type-audio,
|
||||
.wpview-type-video {
|
||||
background-color: #efefef;
|
||||
}
|
||||
|
||||
.wpview-type-gallery .toolbar,
|
||||
.wpview-type-audio .toolbar,
|
||||
.wpview-type-video .toolbar {
|
||||
.wpview-type-gallery .toolbar {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
@@ -289,21 +264,13 @@ img::selection {
|
||||
color: white;
|
||||
padding: 4px;
|
||||
display: none;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.wpview-type-audio .toolbar,
|
||||
.wpview-type-video .toolbar {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.wpview-type-gallery.selected .toolbar {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.wpview-type-gallery .toolbar span,
|
||||
.wpview-type-audio .toolbar span
|
||||
.wpview-type-video .toolbar span {
|
||||
.wpview-type-gallery .toolbar span {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user