From 4f9682f39e2cce6aa1a443f7f74150ba81849ac4 Mon Sep 17 00:00:00 2001 From: Andrew Ozz <admin@laptoptips.ca> Date: Mon, 1 Jun 2015 18:09:26 +0000 Subject: [PATCH] TinyMCE wpView: preserve HTML wrapped in shortcodes. Fixes #32078. Built from https://develop.svn.wordpress.org/trunk@32678 git-svn-id: http://core.svn.wordpress.org/trunk@32648 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/js/mce-view.js | 13 ++--- wp-includes/js/mce-view.min.js | 2 +- wp-includes/js/media-audiovideo.js | 2 +- wp-includes/js/media-audiovideo.min.js | 2 +- .../js/tinymce/plugins/wpview/plugin.js | 45 +++++++++--------- .../js/tinymce/plugins/wpview/plugin.min.js | 2 +- wp-includes/js/tinymce/wp-tinymce.js.gz | Bin 138335 -> 138323 bytes wp-includes/version.php | 2 +- 8 files changed, 34 insertions(+), 34 deletions(-) diff --git a/wp-includes/js/mce-view.js b/wp-includes/js/mce-view.js index eab4560c82..b28eac4c50 100644 --- a/wp-includes/js/mce-view.js +++ b/wp-includes/js/mce-view.js @@ -93,8 +93,7 @@ window.wp = window.wp || {}; setMarkers: function( content ) { var pieces = [ { content: content } ], self = this, - instance, - current; + instance, current; _.each( views, function( view, type ) { current = pieces.slice(); @@ -102,7 +101,7 @@ window.wp = window.wp || {}; _.each( current, function( piece ) { var remaining = piece.content, - result; + result, text; // Ignore processed pieces, but retain their location. if ( piece.processed ) { @@ -119,10 +118,11 @@ window.wp = window.wp || {}; } instance = self.createInstance( type, result.content, result.options ); + text = instance.loader ? '.' : instance.text; // Add the processed piece for the match. pieces.push( { - content: '<p data-wpview-marker="' + instance.encodedText + '">' + instance.text + '</p>', + content: '<p data-wpview-marker="' + instance.encodedText + '">' + text + '</p>', processed: true } ); @@ -138,7 +138,8 @@ window.wp = window.wp || {}; } ); } ); - return _.pluck( pieces, 'content' ).join( '' ); + content = _.pluck( pieces, 'content' ).join( '' ); + return content.replace( /<p>\s*<p data-wpview-marker=/g, '<p data-wpview-marker=' ).replace( /<\/p>\s*<\/p>/g, '</p>' ); }, /** @@ -416,7 +417,7 @@ window.wp = window.wp || {}; */ replaceMarkers: function() { this.getMarkers( function( editor, node ) { - if ( $( node ).text() !== this.text ) { + if ( ! this.loader && $( node ).text() !== this.text ) { editor.dom.setAttrib( node, 'data-wpview-marker', null ); return; } diff --git a/wp-includes/js/mce-view.min.js b/wp-includes/js/mce-view.min.js index c5de05d05c..5f9eaf16d2 100644 --- a/wp-includes/js/mce-view.min.js +++ b/wp-includes/js/mce-view.min.js @@ -1 +1 @@ -window.wp=window.wp||{},function(a,b,c){"use strict";var d={},e={};b.mce=b.mce||{},b.mce.views={register:function(a,c){d[a]=b.mce.View.extend(_.extend(c,{type:a}))},unregister:function(a){delete d[a]},get:function(a){return d[a]},unbind:function(){_.each(e,function(a){a.unbind()})},setMarkers:function(a){var b,c,e=[{content:a}],f=this;return _.each(d,function(a,d){c=e.slice(),e=[],_.each(c,function(c){var g,h=c.content;if(c.processed)return void e.push(c);for(;h&&(g=a.prototype.match(h));)g.index&&e.push({content:h.substring(0,g.index)}),b=f.createInstance(d,g.content,g.options),e.push({content:'<p data-wpview-marker="'+b.encodedText+'">'+b.text+"</p>",processed:!0}),h=h.slice(g.index+g.content.length);h&&e.push({content:h})})}),_.pluck(e,"content").join("")},createInstance:function(a,b,c){var d,f,g=this.get(a);return b=tinymce.DOM.decode(b),d=encodeURIComponent(b),(f=this.getInstance(d))?f:(c=_.extend(c||{},{text:b,encodedText:d}),e[d]=new g(c))},getInstance:function(a){return"string"==typeof a?e[encodeURIComponent(a)]:e[c(a).attr("data-wpview-text")]},getText:function(a){return decodeURIComponent(c(a).attr("data-wpview-text")||"")},render:function(a){_.each(e,function(b){b.render(a)})},update:function(a,b,c){var d=this.getInstance(c);d&&d.update(a,b,c)},edit:function(a,b){var c=this.getInstance(b);c&&c.edit&&c.edit(c.text,function(d){c.update(d,a,b)})},remove:function(a,b){var c=this.getInstance(b);c&&c.remove(a,b)}},b.mce.View=function(a){_.extend(this,a),this.initialize()},b.mce.View.extend=Backbone.View.extend,_.extend(b.mce.View.prototype,{content:null,loader:!0,initialize:function(){},getContent:function(){return this.content},render:function(a,b){null!=a&&(this.content=a),a=this.getContent(),(this.loader||a)&&(b&&this.unbind(),this.replaceMarkers(),a?this.setContent(a,function(a,b,d){c(b).data("rendered",!0),this.bindNode.call(this,a,b,d)},b?null:!1):this.setLoader())},bindNode:function(){},unbindNode:function(){},unbind:function(){this.getNodes(function(a,b,d){this.unbindNode.call(this,a,b,d),c(b).trigger("wp-mce-view-unbind")},!0)},getEditors:function(a){_.each(tinymce.editors,function(b){b.plugins.wpview&&a.call(this,b)},this)},getNodes:function(a,b){this.getEditors(function(d){var e=this;c(d.getBody()).find('[data-wpview-text="'+e.encodedText+'"]').filter(function(){var a;return null==b?!0:(a=c(this).data("rendered")===!0,b?a:!a)}).each(function(){a.call(e,d,this,c(this).find(".wpview-content").get(0))})})},getMarkers:function(a){this.getEditors(function(b){var d=this;c(b.getBody()).find('[data-wpview-marker="'+this.encodedText+'"]').each(function(){a.call(d,b,this)})})},replaceMarkers:function(){this.getMarkers(function(a,b){return c(b).text()!==this.text?void a.dom.setAttrib(b,"data-wpview-marker",null):void a.dom.replace(a.dom.createFragment('<div class="wpview-wrap" data-wpview-text="'+this.encodedText+'" data-wpview-type="'+this.type+'"><p class="wpview-selection-before"> </p><div class="wpview-body" contenteditable="false"><div class="wpview-content wpview-type-'+this.type+'"></div></div><p class="wpview-selection-after"> </p></div>'),b)})},removeMarkers:function(){this.getMarkers(function(a,b){a.dom.setAttrib(b,"data-wpview-marker",null)})},setContent:function(a,b,c){_.isObject(a)&&-1!==a.body.indexOf("<script")?this.setIframes(a.head||"",a.body,b,c):_.isString(a)&&-1!==a.indexOf("<script")?this.setIframes("",a,b,c):this.getNodes(function(c,d,e){a=a.body||a,-1!==a.indexOf("<iframe")&&(a+='<div class="wpview-overlay"></div>'),e.innerHTML="",e.appendChild(_.isString(a)?c.dom.createFragment(a):a),b&&b.call(this,c,d,e)},c)},setIframes:function(b,d,e,f){var g=a.MutationObserver||a.WebKitMutationObserver||a.MozMutationObserver,h=this;this.getNodes(function(a,f,i){var j=a.dom,k="",l=a.getBody().className||"",m=a.getDoc().getElementsByTagName("head")[0];tinymce.each(j.$('link[rel="stylesheet"]',m),function(a){a.href&&-1===a.href.indexOf("skins/lightgray/content.min.css")&&-1===a.href.indexOf("skins/wordpress/wp-content.css")&&(k+=j.getOuterHTML(a))}),setTimeout(function(){function m(){var b,d;o.contentWindow&&(b=c(o),d=c(p.body).height(),b.height()!==d&&(b.height(d),a.nodeChanged()))}function n(){p.body.className=a.getBody().className}var o,p,q,r;if(i.innerHTML="",o=j.add(i,"iframe",{src:tinymce.Env.ie?'javascript:""':"",frameBorder:"0",allowTransparency:"true",scrolling:"no","class":"wpview-sandbox",style:{width:"100%",display:"block"}}),j.add(i,"div",{"class":"wpview-overlay"}),p=o.contentWindow.document,p.open(),p.write('<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />'+b+k+'<style>html {background: transparent;padding: 0;margin: 0;}body#wpview-iframe-sandbox {background: transparent;padding: 1px 0 !important;margin: -1px 0 0 !important;}body#wpview-iframe-sandbox:before,body#wpview-iframe-sandbox:after {display: none;content: "";}</style></head><body id="wpview-iframe-sandbox" class="'+l+'">'+d+"</body></html>"),p.close(),c(o.contentWindow).on("load",m),g)q=new g(_.debounce(m,100)),q.observe(p.body,{attributes:!0,childList:!0,subtree:!0}),c(f).one("wp-mce-view-unbind",function(){q.disconnect()});else for(r=1;6>r;r++)setTimeout(m,700*r);a.on("wp-body-class-change",n),c(f).one("wp-mce-view-unbind",function(){a.off("wp-body-class-change",n)}),e&&e.call(h,a,f,i)},50)},f)},setLoader:function(){this.setContent('<div class="loading-placeholder"><div class="dashicons dashicons-admin-media"></div><div class="wpview-loading"><ins></ins></div></div>')},setError:function(a,b){this.setContent('<div class="wpview-error"><div class="dashicons dashicons-'+(b||"no")+'"></div><p>'+a+"</p></div>")},match:function(a){var c=b.shortcode.next(this.type,a);return c?{index:c.index,content:c.content,options:{shortcode:c.shortcode}}:void 0},update:function(a,e,f){_.find(d,function(d,g){var h=d.prototype.match(a);return h?(c(f).data("rendered",!1),e.dom.setAttrib(f,"data-wpview-text",encodeURIComponent(a)),b.mce.views.createInstance(g,a,h.options).render(),e.focus(),!0):void 0})},remove:function(a,b){this.unbindNode.call(this,a,b,c(b).find(".wpview-content").get(0)),c(b).trigger("wp-mce-view-unbind"),a.dom.remove(b),a.focus()}})}(window,window.wp,window.jQuery),function(a,b,c){var d,e,f,g,h=c("#post_ID").val()||0;d={state:[],edit:function(a,b){var c=wp.media[this.type],d=c.edit(a);this.pausePlayers&&this.pausePlayers(),_.each(this.state,function(a){d.state(a).on("update",function(a){b(c.shortcode(a).string())})}),d.on("close",function(){d.detach()}),d.open()}},e=_.extend({},d,{state:["gallery-edit"],template:wp.media.template("editor-gallery"),initialize:function(){var a=wp.media.gallery.attachments(this.shortcode,h),b=this.shortcode.attrs.named,c=this;a.more().done(function(){a=a.toJSON(),_.each(a,function(a){a.sizes&&(b.size&&a.sizes[b.size]?a.thumbnail=a.sizes[b.size]:a.sizes.thumbnail?a.thumbnail=a.sizes.thumbnail:a.sizes.full&&(a.thumbnail=a.sizes.full))}),c.render(c.template({attachments:a,columns:b.columns?parseInt(b.columns,10):wp.media.galleryDefaults.columns}))}).fail(function(a,b){c.setError(b)})}}),f=_.extend({},d,{action:"parse-media-shortcode",initialize:function(){var a=this;this.url&&(this.loader=!1,this.shortcode=wp.media.embed.shortcode({url:this.text})),wp.ajax.post(this.action,{post_ID:h,type:this.shortcode.tag,shortcode:this.shortcode.string()}).done(function(b){a.render(b)}).fail(function(b){a.url?a.removeMarkers():a.setError(b.message||b.statusText,"admin-media")}),this.getEditors(function(b){b.on("wpview-selected",function(){a.pausePlayers()})})},pausePlayers:function(){this.getNodes(function(a,b,d){var e=c("iframe.wpview-sandbox",d).get(0);e&&(e=e.contentWindow)&&e.mejs&&_.each(e.mejs.players,function(a){try{a.pause()}catch(b){}})})}}),g=_.extend({},f,{action:"parse-embed",edit:function(a,b){var c=wp.media.embed,d=c.edit(a,this.url),e=this;this.pausePlayers(),d.state("embed").props.on("change:url",function(a,b){b&&a.get("url")&&(d.state("embed").metadata=a.toJSON())}),d.state("embed").on("select",function(){var a=d.state("embed").metadata;b(e.url?a.url:c.shortcode(a).string())}),d.on("close",function(){d.detach()}),d.open()}}),b.register("gallery",_.extend({},e)),b.register("audio",_.extend({},f,{state:["audio-details"]})),b.register("video",_.extend({},f,{state:["video-details"]})),b.register("playlist",_.extend({},f,{state:["playlist-edit","video-playlist-edit"]})),b.register("embed",_.extend({},g)),b.register("embedURL",_.extend({},g,{match:function(a){var b=/(^|<p>)(https?:\/\/[^\s"]+?)(<\/p>\s*|$)/gi,c=b.exec(a);return c?{index:c.index+c[1].length,content:c[2],options:{url:!0}}:void 0}}))}(window,window.wp.mce.views,window.jQuery); \ No newline at end of file +window.wp=window.wp||{},function(a,b,c){"use strict";var d={},e={};b.mce=b.mce||{},b.mce.views={register:function(a,c){d[a]=b.mce.View.extend(_.extend(c,{type:a}))},unregister:function(a){delete d[a]},get:function(a){return d[a]},unbind:function(){_.each(e,function(a){a.unbind()})},setMarkers:function(a){var b,c,e=[{content:a}],f=this;return _.each(d,function(a,d){c=e.slice(),e=[],_.each(c,function(c){var g,h,i=c.content;if(c.processed)return void e.push(c);for(;i&&(g=a.prototype.match(i));)g.index&&e.push({content:i.substring(0,g.index)}),b=f.createInstance(d,g.content,g.options),h=b.loader?".":b.text,e.push({content:'<p data-wpview-marker="'+b.encodedText+'">'+h+"</p>",processed:!0}),i=i.slice(g.index+g.content.length);i&&e.push({content:i})})}),a=_.pluck(e,"content").join(""),a.replace(/<p>\s*<p data-wpview-marker=/g,"<p data-wpview-marker=").replace(/<\/p>\s*<\/p>/g,"</p>")},createInstance:function(a,b,c){var d,f,g=this.get(a);return b=tinymce.DOM.decode(b),d=encodeURIComponent(b),(f=this.getInstance(d))?f:(c=_.extend(c||{},{text:b,encodedText:d}),e[d]=new g(c))},getInstance:function(a){return"string"==typeof a?e[encodeURIComponent(a)]:e[c(a).attr("data-wpview-text")]},getText:function(a){return decodeURIComponent(c(a).attr("data-wpview-text")||"")},render:function(a){_.each(e,function(b){b.render(a)})},update:function(a,b,c){var d=this.getInstance(c);d&&d.update(a,b,c)},edit:function(a,b){var c=this.getInstance(b);c&&c.edit&&c.edit(c.text,function(d){c.update(d,a,b)})},remove:function(a,b){var c=this.getInstance(b);c&&c.remove(a,b)}},b.mce.View=function(a){_.extend(this,a),this.initialize()},b.mce.View.extend=Backbone.View.extend,_.extend(b.mce.View.prototype,{content:null,loader:!0,initialize:function(){},getContent:function(){return this.content},render:function(a,b){null!=a&&(this.content=a),a=this.getContent(),(this.loader||a)&&(b&&this.unbind(),this.replaceMarkers(),a?this.setContent(a,function(a,b,d){c(b).data("rendered",!0),this.bindNode.call(this,a,b,d)},b?null:!1):this.setLoader())},bindNode:function(){},unbindNode:function(){},unbind:function(){this.getNodes(function(a,b,d){this.unbindNode.call(this,a,b,d),c(b).trigger("wp-mce-view-unbind")},!0)},getEditors:function(a){_.each(tinymce.editors,function(b){b.plugins.wpview&&a.call(this,b)},this)},getNodes:function(a,b){this.getEditors(function(d){var e=this;c(d.getBody()).find('[data-wpview-text="'+e.encodedText+'"]').filter(function(){var a;return null==b?!0:(a=c(this).data("rendered")===!0,b?a:!a)}).each(function(){a.call(e,d,this,c(this).find(".wpview-content").get(0))})})},getMarkers:function(a){this.getEditors(function(b){var d=this;c(b.getBody()).find('[data-wpview-marker="'+this.encodedText+'"]').each(function(){a.call(d,b,this)})})},replaceMarkers:function(){this.getMarkers(function(a,b){return this.loader||c(b).text()===this.text?void a.dom.replace(a.dom.createFragment('<div class="wpview-wrap" data-wpview-text="'+this.encodedText+'" data-wpview-type="'+this.type+'"><p class="wpview-selection-before"> </p><div class="wpview-body" contenteditable="false"><div class="wpview-content wpview-type-'+this.type+'"></div></div><p class="wpview-selection-after"> </p></div>'),b):void a.dom.setAttrib(b,"data-wpview-marker",null)})},removeMarkers:function(){this.getMarkers(function(a,b){a.dom.setAttrib(b,"data-wpview-marker",null)})},setContent:function(a,b,c){_.isObject(a)&&-1!==a.body.indexOf("<script")?this.setIframes(a.head||"",a.body,b,c):_.isString(a)&&-1!==a.indexOf("<script")?this.setIframes("",a,b,c):this.getNodes(function(c,d,e){a=a.body||a,-1!==a.indexOf("<iframe")&&(a+='<div class="wpview-overlay"></div>'),e.innerHTML="",e.appendChild(_.isString(a)?c.dom.createFragment(a):a),b&&b.call(this,c,d,e)},c)},setIframes:function(b,d,e,f){var g=a.MutationObserver||a.WebKitMutationObserver||a.MozMutationObserver,h=this;this.getNodes(function(a,f,i){var j=a.dom,k="",l=a.getBody().className||"",m=a.getDoc().getElementsByTagName("head")[0];tinymce.each(j.$('link[rel="stylesheet"]',m),function(a){a.href&&-1===a.href.indexOf("skins/lightgray/content.min.css")&&-1===a.href.indexOf("skins/wordpress/wp-content.css")&&(k+=j.getOuterHTML(a))}),setTimeout(function(){function m(){var b,d;o.contentWindow&&(b=c(o),d=c(p.body).height(),b.height()!==d&&(b.height(d),a.nodeChanged()))}function n(){p.body.className=a.getBody().className}var o,p,q,r;if(i.innerHTML="",o=j.add(i,"iframe",{src:tinymce.Env.ie?'javascript:""':"",frameBorder:"0",allowTransparency:"true",scrolling:"no","class":"wpview-sandbox",style:{width:"100%",display:"block"}}),j.add(i,"div",{"class":"wpview-overlay"}),p=o.contentWindow.document,p.open(),p.write('<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />'+b+k+'<style>html {background: transparent;padding: 0;margin: 0;}body#wpview-iframe-sandbox {background: transparent;padding: 1px 0 !important;margin: -1px 0 0 !important;}body#wpview-iframe-sandbox:before,body#wpview-iframe-sandbox:after {display: none;content: "";}</style></head><body id="wpview-iframe-sandbox" class="'+l+'">'+d+"</body></html>"),p.close(),c(o.contentWindow).on("load",m),g)q=new g(_.debounce(m,100)),q.observe(p.body,{attributes:!0,childList:!0,subtree:!0}),c(f).one("wp-mce-view-unbind",function(){q.disconnect()});else for(r=1;6>r;r++)setTimeout(m,700*r);a.on("wp-body-class-change",n),c(f).one("wp-mce-view-unbind",function(){a.off("wp-body-class-change",n)}),e&&e.call(h,a,f,i)},50)},f)},setLoader:function(){this.setContent('<div class="loading-placeholder"><div class="dashicons dashicons-admin-media"></div><div class="wpview-loading"><ins></ins></div></div>')},setError:function(a,b){this.setContent('<div class="wpview-error"><div class="dashicons dashicons-'+(b||"no")+'"></div><p>'+a+"</p></div>")},match:function(a){var c=b.shortcode.next(this.type,a);return c?{index:c.index,content:c.content,options:{shortcode:c.shortcode}}:void 0},update:function(a,e,f){_.find(d,function(d,g){var h=d.prototype.match(a);return h?(c(f).data("rendered",!1),e.dom.setAttrib(f,"data-wpview-text",encodeURIComponent(a)),b.mce.views.createInstance(g,a,h.options).render(),e.focus(),!0):void 0})},remove:function(a,b){this.unbindNode.call(this,a,b,c(b).find(".wpview-content").get(0)),c(b).trigger("wp-mce-view-unbind"),a.dom.remove(b),a.focus()}})}(window,window.wp,window.jQuery),function(a,b,c){var d,e,f,g,h=c("#post_ID").val()||0;d={state:[],edit:function(a,b){var c=wp.media[this.type],d=c.edit(a);this.pausePlayers&&this.pausePlayers(),_.each(this.state,function(a){d.state(a).on("update",function(a){b(c.shortcode(a).string())})}),d.on("close",function(){d.detach()}),d.open()}},e=_.extend({},d,{state:["gallery-edit"],template:wp.media.template("editor-gallery"),initialize:function(){var a=wp.media.gallery.attachments(this.shortcode,h),b=this.shortcode.attrs.named,c=this;a.more().done(function(){a=a.toJSON(),_.each(a,function(a){a.sizes&&(b.size&&a.sizes[b.size]?a.thumbnail=a.sizes[b.size]:a.sizes.thumbnail?a.thumbnail=a.sizes.thumbnail:a.sizes.full&&(a.thumbnail=a.sizes.full))}),c.render(c.template({attachments:a,columns:b.columns?parseInt(b.columns,10):wp.media.galleryDefaults.columns}))}).fail(function(a,b){c.setError(b)})}}),f=_.extend({},d,{action:"parse-media-shortcode",initialize:function(){var a=this;this.url&&(this.loader=!1,this.shortcode=wp.media.embed.shortcode({url:this.text})),wp.ajax.post(this.action,{post_ID:h,type:this.shortcode.tag,shortcode:this.shortcode.string()}).done(function(b){a.render(b)}).fail(function(b){a.url?a.removeMarkers():a.setError(b.message||b.statusText,"admin-media")}),this.getEditors(function(b){b.on("wpview-selected",function(){a.pausePlayers()})})},pausePlayers:function(){this.getNodes(function(a,b,d){var e=c("iframe.wpview-sandbox",d).get(0);e&&(e=e.contentWindow)&&e.mejs&&_.each(e.mejs.players,function(a){try{a.pause()}catch(b){}})})}}),g=_.extend({},f,{action:"parse-embed",edit:function(a,b){var c=wp.media.embed,d=c.edit(a,this.url),e=this;this.pausePlayers(),d.state("embed").props.on("change:url",function(a,b){b&&a.get("url")&&(d.state("embed").metadata=a.toJSON())}),d.state("embed").on("select",function(){var a=d.state("embed").metadata;b(e.url?a.url:c.shortcode(a).string())}),d.on("close",function(){d.detach()}),d.open()}}),b.register("gallery",_.extend({},e)),b.register("audio",_.extend({},f,{state:["audio-details"]})),b.register("video",_.extend({},f,{state:["video-details"]})),b.register("playlist",_.extend({},f,{state:["playlist-edit","video-playlist-edit"]})),b.register("embed",_.extend({},g)),b.register("embedURL",_.extend({},g,{match:function(a){var b=/(^|<p>)(https?:\/\/[^\s"]+?)(<\/p>\s*|$)/gi,c=b.exec(a);return c?{index:c.index+c[1].length,content:c[2],options:{url:!0}}:void 0}}))}(window,window.wp.mce.views,window.jQuery); \ No newline at end of file diff --git a/wp-includes/js/media-audiovideo.js b/wp-includes/js/media-audiovideo.js index cf9d7550bf..8b598db691 100644 --- a/wp-includes/js/media-audiovideo.js +++ b/wp-includes/js/media-audiovideo.js @@ -704,7 +704,7 @@ VideoDetails = MediaDetails.extend({ if ( -1 === content.indexOf( attachment.get( 'url' ) ) ) { content += [ - '<track srclang="en" label="English"kind="subtitles" src="', + '<track srclang="en" label="English" kind="subtitles" src="', attachment.get( 'url' ), '" />' ].join(''); diff --git a/wp-includes/js/media-audiovideo.min.js b/wp-includes/js/media-audiovideo.min.js index d8b88bb82a..f5aef74082 100644 --- a/wp-includes/js/media-audiovideo.min.js +++ b/wp-includes/js/media-audiovideo.min.js @@ -1 +1 @@ -!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a){var b=wp.media,c=window._wpmejsSettings||{},d=window._wpMediaViewsL10n||{};wp.media.mixin={mejsSettings:c,removeAllPlayers:function(){var a;if(window.mejs&&window.mejs.players)for(a in window.mejs.players)window.mejs.players[a].pause(),this.removePlayer(window.mejs.players[a])},removePlayer:function(a){var b,c;if(a.options){for(b in a.options.features)if(c=a.options.features[b],a["clean"+c])try{a["clean"+c](a)}catch(d){}a.isDynamic||a.$node.remove(),"native"!==a.media.pluginType&&a.$media.remove(),delete window.mejs.players[a.id],a.container.remove(),a.globalUnbind(),delete a.node.player}},unsetPlayers:function(){this.players&&this.players.length&&(_.each(this.players,function(a){a.pause(),wp.media.mixin.removePlayer(a)}),this.players=[])}},wp.media.playlist=new wp.media.collection({tag:"playlist",editTitle:d.editPlaylistTitle,defaults:{id:wp.media.view.settings.post.id,style:"light",tracklist:!0,tracknumbers:!0,images:!0,artists:!0,type:"audio"}}),wp.media.audio={coerce:wp.media.coerce,defaults:{id:wp.media.view.settings.post.id,src:"",loop:!1,autoplay:!1,preload:"none",width:400},edit:function(a){var b,c=wp.shortcode.next("audio",a).shortcode;return b=wp.media({frame:"audio",state:"audio-details",metadata:_.defaults(c.attrs.named,this.defaults)})},shortcode:function(a){var b;return _.each(this.defaults,function(b,c){a[c]=this.coerce(a,c),b===a[c]&&delete a[c]},this),b=a.content,delete a.content,new wp.shortcode({tag:"audio",attrs:a,content:b})}},wp.media.video={coerce:wp.media.coerce,defaults:{id:wp.media.view.settings.post.id,src:"",poster:"",loop:!1,autoplay:!1,preload:"metadata",content:"",width:640,height:360},edit:function(a){var b,c,d=wp.shortcode.next("video",a).shortcode;return c=d.attrs.named,c.content=d.content,b=wp.media({frame:"video",state:"video-details",metadata:_.defaults(c,this.defaults)})},shortcode:function(a){var b;return _.each(this.defaults,function(b,c){a[c]=this.coerce(a,c),b===a[c]&&delete a[c]},this),b=a.content,delete a.content,new wp.shortcode({tag:"video",attrs:a,content:b})}},b.model.PostMedia=a("./models/post-media.js"),b.controller.AudioDetails=a("./controllers/audio-details.js"),b.controller.VideoDetails=a("./controllers/video-details.js"),b.view.MediaFrame.MediaDetails=a("./views/frame/media-details.js"),b.view.MediaFrame.AudioDetails=a("./views/frame/audio-details.js"),b.view.MediaFrame.VideoDetails=a("./views/frame/video-details.js"),b.view.MediaDetails=a("./views/media-details.js"),b.view.AudioDetails=a("./views/audio-details.js"),b.view.VideoDetails=a("./views/video-details.js")},{"./controllers/audio-details.js":2,"./controllers/video-details.js":3,"./models/post-media.js":4,"./views/audio-details.js":5,"./views/frame/audio-details.js":6,"./views/frame/media-details.js":7,"./views/frame/video-details.js":8,"./views/media-details.js":9,"./views/video-details.js":10}],2:[function(a,b){var c,d=wp.media.controller.State,e=wp.media.view.l10n;c=d.extend({defaults:{id:"audio-details",toolbar:"audio-details",title:e.audioDetailsTitle,content:"audio-details",menu:"audio-details",router:!1,priority:60},initialize:function(a){this.media=a.media,d.prototype.initialize.apply(this,arguments)}}),b.exports=c},{}],3:[function(a,b){var c,d=wp.media.controller.State,e=wp.media.view.l10n;c=d.extend({defaults:{id:"video-details",toolbar:"video-details",title:e.videoDetailsTitle,content:"video-details",menu:"video-details",router:!1,priority:60},initialize:function(a){this.media=a.media,d.prototype.initialize.apply(this,arguments)}}),b.exports=c},{}],4:[function(a,b){var c=Backbone.Model.extend({initialize:function(){this.attachment=!1},setSource:function(a){this.attachment=a,this.extension=a.get("filename").split(".").pop(),this.get("src")&&this.extension===this.get("src").split(".").pop()&&this.unset("src"),_.contains(wp.media.view.settings.embedExts,this.extension)?this.set(this.extension,this.attachment.get("url")):this.unset(this.extension)},changeAttachment:function(a){this.setSource(a),this.unset("src"),_.each(_.without(wp.media.view.settings.embedExts,this.extension),function(a){this.unset(a)},this)}});b.exports=c},{}],5:[function(a,b){var c,d=wp.media.view.MediaDetails;c=d.extend({className:"audio-details",template:wp.template("audio-details"),setMedia:function(){var a=this.$(".wp-audio-shortcode");return a.find("source").length?(a.is(":hidden")&&a.show(),this.media=d.prepareSrc(a.get(0))):(a.hide(),this.media=!1),this}}),b.exports=c},{}],6:[function(a,b){var c,d=wp.media.view.MediaFrame.MediaDetails,e=wp.media.controller.MediaLibrary,f=wp.media.view.l10n;c=d.extend({defaults:{id:"audio",url:"",menu:"audio-details",content:"audio-details",toolbar:"audio-details",type:"link",title:f.audioDetailsTitle,priority:120},initialize:function(a){a.DetailsView=wp.media.view.AudioDetails,a.cancelText=f.audioDetailsCancel,a.addText=f.audioAddSourceTitle,d.prototype.initialize.call(this,a)},bindHandlers:function(){d.prototype.bindHandlers.apply(this,arguments),this.on("toolbar:render:replace-audio",this.renderReplaceToolbar,this),this.on("toolbar:render:add-audio-source",this.renderAddSourceToolbar,this)},createStates:function(){this.states.add([new wp.media.controller.AudioDetails({media:this.media}),new e({type:"audio",id:"replace-audio",title:f.audioReplaceTitle,toolbar:"replace-audio",media:this.media,menu:"audio-details"}),new e({type:"audio",id:"add-audio-source",title:f.audioAddSourceTitle,toolbar:"add-audio-source",media:this.media,menu:!1})])}}),b.exports=c},{}],7:[function(a,b){var c,d=wp.media.view.MediaFrame.Select,e=wp.media.view.l10n;c=d.extend({defaults:{id:"media",url:"",menu:"media-details",content:"media-details",toolbar:"media-details",type:"link",priority:120},initialize:function(a){this.DetailsView=a.DetailsView,this.cancelText=a.cancelText,this.addText=a.addText,this.media=new wp.media.model.PostMedia(a.metadata),this.options.selection=new wp.media.model.Selection(this.media.attachment,{multiple:!1}),d.prototype.initialize.apply(this,arguments)},bindHandlers:function(){var a=this.defaults.menu;d.prototype.bindHandlers.apply(this,arguments),this.on("menu:create:"+a,this.createMenu,this),this.on("content:render:"+a,this.renderDetailsContent,this),this.on("menu:render:"+a,this.renderMenu,this),this.on("toolbar:render:"+a,this.renderDetailsToolbar,this)},renderDetailsContent:function(){var a=new this.DetailsView({controller:this,model:this.state().media,attachment:this.state().media.attachment}).render();this.content.set(a)},renderMenu:function(a){var b=this.lastState(),c=b&&b.id,d=this;a.set({cancel:{text:this.cancelText,priority:20,click:function(){c?d.setState(c):d.close()}},separateCancel:new wp.media.View({className:"separator",priority:40})})},setPrimaryButton:function(a,b){this.toolbar.set(new wp.media.view.Toolbar({controller:this,items:{button:{style:"primary",text:a,priority:80,click:function(){var a=this.controller;b.call(this,a,a.state()),a.setState(a.options.state),a.reset()}}}}))},renderDetailsToolbar:function(){this.setPrimaryButton(e.update,function(a,b){a.close(),b.trigger("update",a.media.toJSON())})},renderReplaceToolbar:function(){this.setPrimaryButton(e.replace,function(a,b){var c=b.get("selection").single();a.media.changeAttachment(c),b.trigger("replace",a.media.toJSON())})},renderAddSourceToolbar:function(){this.setPrimaryButton(this.addText,function(a,b){var c=b.get("selection").single();a.media.setSource(c),b.trigger("add-source",a.media.toJSON())})}}),b.exports=c},{}],8:[function(a,b){var c,d=wp.media.view.MediaFrame.MediaDetails,e=wp.media.controller.MediaLibrary,f=wp.media.view.l10n;c=d.extend({defaults:{id:"video",url:"",menu:"video-details",content:"video-details",toolbar:"video-details",type:"link",title:f.videoDetailsTitle,priority:120},initialize:function(a){a.DetailsView=wp.media.view.VideoDetails,a.cancelText=f.videoDetailsCancel,a.addText=f.videoAddSourceTitle,d.prototype.initialize.call(this,a)},bindHandlers:function(){d.prototype.bindHandlers.apply(this,arguments),this.on("toolbar:render:replace-video",this.renderReplaceToolbar,this),this.on("toolbar:render:add-video-source",this.renderAddSourceToolbar,this),this.on("toolbar:render:select-poster-image",this.renderSelectPosterImageToolbar,this),this.on("toolbar:render:add-track",this.renderAddTrackToolbar,this)},createStates:function(){this.states.add([new wp.media.controller.VideoDetails({media:this.media}),new e({type:"video",id:"replace-video",title:f.videoReplaceTitle,toolbar:"replace-video",media:this.media,menu:"video-details"}),new e({type:"video",id:"add-video-source",title:f.videoAddSourceTitle,toolbar:"add-video-source",media:this.media,menu:!1}),new e({type:"image",id:"select-poster-image",title:f.videoSelectPosterImageTitle,toolbar:"select-poster-image",media:this.media,menu:"video-details"}),new e({type:"text",id:"add-track",title:f.videoAddTrackTitle,toolbar:"add-track",media:this.media,menu:"video-details"})])},renderSelectPosterImageToolbar:function(){this.setPrimaryButton(f.videoSelectPosterImageTitle,function(a,b){var c=[],d=b.get("selection").single();a.media.set("poster",d.get("url")),b.trigger("set-poster-image",a.media.toJSON()),_.each(wp.media.view.settings.embedExts,function(b){a.media.get(b)&&c.push(a.media.get(b))}),wp.ajax.send("set-attachment-thumbnail",{data:{urls:c,thumbnail_id:d.get("id")}})})},renderAddTrackToolbar:function(){this.setPrimaryButton(f.videoAddTrackTitle,function(a,b){var c=b.get("selection").single(),d=a.media.get("content");-1===d.indexOf(c.get("url"))&&(d+=['<track srclang="en" label="English"kind="subtitles" src="',c.get("url"),'" />'].join(""),a.media.set("content",d)),b.trigger("add-track",a.media.toJSON())})}}),b.exports=c},{}],9:[function(a,b){var c,d=wp.media.view.Settings.AttachmentDisplay,e=jQuery;c=d.extend({initialize:function(){_.bindAll(this,"success"),this.players=[],this.listenTo(this.controller,"close",wp.media.mixin.unsetPlayers),this.on("ready",this.setPlayer),this.on("media:setting:remove",wp.media.mixin.unsetPlayers,this),this.on("media:setting:remove",this.render),this.on("media:setting:remove",this.setPlayer),this.events=_.extend(this.events,{"click .remove-setting":"removeSetting","change .content-track":"setTracks","click .remove-track":"setTracks","click .add-media-source":"addSource"}),d.prototype.initialize.apply(this,arguments)},prepare:function(){return _.defaults({model:this.model.toJSON()},this.options)},removeSetting:function(a){var b,c=e(a.currentTarget).parent();b=c.find("input").data("setting"),b&&(this.model.unset(b),this.trigger("media:setting:remove",this)),c.remove()},setTracks:function(){var a="";_.each(this.$(".content-track"),function(b){a+=e(b).val()}),this.model.set("content",a),this.trigger("media:setting:remove",this)},addSource:function(a){this.controller.lastMime=e(a.currentTarget).data("mime"),this.controller.setState("add-"+this.controller.defaults.id+"-source")},loadPlayer:function(){this.players.push(new MediaElementPlayer(this.media,this.settings)),this.scriptXhr=!1},setPlayer:function(){var a;this.players.length||!this.media||this.scriptXhr||(this.model.get("src").indexOf("vimeo")>-1&&!("Froogaloop"in window)?(a=wp.media.mixin.mejsSettings,this.scriptXhr=e.getScript(a.pluginPath+"froogaloop.min.js",_.bind(this.loadPlayer,this))):this.loadPlayer())},setMedia:function(){return this},success:function(a){var b=a.attributes.autoplay&&"false"!==a.attributes.autoplay;"flash"===a.pluginType&&b&&a.addEventListener("canplay",function(){a.play()},!1),this.mejs=a},render:function(){return d.prototype.render.apply(this,arguments),setTimeout(_.bind(function(){this.resetFocus()},this),10),this.settings=_.defaults({success:this.success},wp.media.mixin.mejsSettings),this.setMedia()},resetFocus:function(){this.$(".embed-media-settings").scrollTop(0)}},{instances:0,prepareSrc:function(a){var b=c.instances++;return _.each(e(a).find("source"),function(a){a.src=[a.src,a.src.indexOf("?")>-1?"&":"?","_=",b].join("")}),a}}),b.exports=c},{}],10:[function(a,b){var c,d=wp.media.view.MediaDetails;c=d.extend({className:"video-details",template:wp.template("video-details"),setMedia:function(){var a=this.$(".wp-video-shortcode");return a.find("source").length?(a.is(":hidden")&&a.show(),this.media=a.hasClass("youtube-video")||a.hasClass("vimeo-video")?a.get(0):d.prepareSrc(a.get(0))):(a.hide(),this.media=!1),this}}),b.exports=c},{}]},{},[1]); \ No newline at end of file +!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a){var b=wp.media,c=window._wpmejsSettings||{},d=window._wpMediaViewsL10n||{};wp.media.mixin={mejsSettings:c,removeAllPlayers:function(){var a;if(window.mejs&&window.mejs.players)for(a in window.mejs.players)window.mejs.players[a].pause(),this.removePlayer(window.mejs.players[a])},removePlayer:function(a){var b,c;if(a.options){for(b in a.options.features)if(c=a.options.features[b],a["clean"+c])try{a["clean"+c](a)}catch(d){}a.isDynamic||a.$node.remove(),"native"!==a.media.pluginType&&a.$media.remove(),delete window.mejs.players[a.id],a.container.remove(),a.globalUnbind(),delete a.node.player}},unsetPlayers:function(){this.players&&this.players.length&&(_.each(this.players,function(a){a.pause(),wp.media.mixin.removePlayer(a)}),this.players=[])}},wp.media.playlist=new wp.media.collection({tag:"playlist",editTitle:d.editPlaylistTitle,defaults:{id:wp.media.view.settings.post.id,style:"light",tracklist:!0,tracknumbers:!0,images:!0,artists:!0,type:"audio"}}),wp.media.audio={coerce:wp.media.coerce,defaults:{id:wp.media.view.settings.post.id,src:"",loop:!1,autoplay:!1,preload:"none",width:400},edit:function(a){var b,c=wp.shortcode.next("audio",a).shortcode;return b=wp.media({frame:"audio",state:"audio-details",metadata:_.defaults(c.attrs.named,this.defaults)})},shortcode:function(a){var b;return _.each(this.defaults,function(b,c){a[c]=this.coerce(a,c),b===a[c]&&delete a[c]},this),b=a.content,delete a.content,new wp.shortcode({tag:"audio",attrs:a,content:b})}},wp.media.video={coerce:wp.media.coerce,defaults:{id:wp.media.view.settings.post.id,src:"",poster:"",loop:!1,autoplay:!1,preload:"metadata",content:"",width:640,height:360},edit:function(a){var b,c,d=wp.shortcode.next("video",a).shortcode;return c=d.attrs.named,c.content=d.content,b=wp.media({frame:"video",state:"video-details",metadata:_.defaults(c,this.defaults)})},shortcode:function(a){var b;return _.each(this.defaults,function(b,c){a[c]=this.coerce(a,c),b===a[c]&&delete a[c]},this),b=a.content,delete a.content,new wp.shortcode({tag:"video",attrs:a,content:b})}},b.model.PostMedia=a("./models/post-media.js"),b.controller.AudioDetails=a("./controllers/audio-details.js"),b.controller.VideoDetails=a("./controllers/video-details.js"),b.view.MediaFrame.MediaDetails=a("./views/frame/media-details.js"),b.view.MediaFrame.AudioDetails=a("./views/frame/audio-details.js"),b.view.MediaFrame.VideoDetails=a("./views/frame/video-details.js"),b.view.MediaDetails=a("./views/media-details.js"),b.view.AudioDetails=a("./views/audio-details.js"),b.view.VideoDetails=a("./views/video-details.js")},{"./controllers/audio-details.js":2,"./controllers/video-details.js":3,"./models/post-media.js":4,"./views/audio-details.js":5,"./views/frame/audio-details.js":6,"./views/frame/media-details.js":7,"./views/frame/video-details.js":8,"./views/media-details.js":9,"./views/video-details.js":10}],2:[function(a,b){var c,d=wp.media.controller.State,e=wp.media.view.l10n;c=d.extend({defaults:{id:"audio-details",toolbar:"audio-details",title:e.audioDetailsTitle,content:"audio-details",menu:"audio-details",router:!1,priority:60},initialize:function(a){this.media=a.media,d.prototype.initialize.apply(this,arguments)}}),b.exports=c},{}],3:[function(a,b){var c,d=wp.media.controller.State,e=wp.media.view.l10n;c=d.extend({defaults:{id:"video-details",toolbar:"video-details",title:e.videoDetailsTitle,content:"video-details",menu:"video-details",router:!1,priority:60},initialize:function(a){this.media=a.media,d.prototype.initialize.apply(this,arguments)}}),b.exports=c},{}],4:[function(a,b){var c=Backbone.Model.extend({initialize:function(){this.attachment=!1},setSource:function(a){this.attachment=a,this.extension=a.get("filename").split(".").pop(),this.get("src")&&this.extension===this.get("src").split(".").pop()&&this.unset("src"),_.contains(wp.media.view.settings.embedExts,this.extension)?this.set(this.extension,this.attachment.get("url")):this.unset(this.extension)},changeAttachment:function(a){this.setSource(a),this.unset("src"),_.each(_.without(wp.media.view.settings.embedExts,this.extension),function(a){this.unset(a)},this)}});b.exports=c},{}],5:[function(a,b){var c,d=wp.media.view.MediaDetails;c=d.extend({className:"audio-details",template:wp.template("audio-details"),setMedia:function(){var a=this.$(".wp-audio-shortcode");return a.find("source").length?(a.is(":hidden")&&a.show(),this.media=d.prepareSrc(a.get(0))):(a.hide(),this.media=!1),this}}),b.exports=c},{}],6:[function(a,b){var c,d=wp.media.view.MediaFrame.MediaDetails,e=wp.media.controller.MediaLibrary,f=wp.media.view.l10n;c=d.extend({defaults:{id:"audio",url:"",menu:"audio-details",content:"audio-details",toolbar:"audio-details",type:"link",title:f.audioDetailsTitle,priority:120},initialize:function(a){a.DetailsView=wp.media.view.AudioDetails,a.cancelText=f.audioDetailsCancel,a.addText=f.audioAddSourceTitle,d.prototype.initialize.call(this,a)},bindHandlers:function(){d.prototype.bindHandlers.apply(this,arguments),this.on("toolbar:render:replace-audio",this.renderReplaceToolbar,this),this.on("toolbar:render:add-audio-source",this.renderAddSourceToolbar,this)},createStates:function(){this.states.add([new wp.media.controller.AudioDetails({media:this.media}),new e({type:"audio",id:"replace-audio",title:f.audioReplaceTitle,toolbar:"replace-audio",media:this.media,menu:"audio-details"}),new e({type:"audio",id:"add-audio-source",title:f.audioAddSourceTitle,toolbar:"add-audio-source",media:this.media,menu:!1})])}}),b.exports=c},{}],7:[function(a,b){var c,d=wp.media.view.MediaFrame.Select,e=wp.media.view.l10n;c=d.extend({defaults:{id:"media",url:"",menu:"media-details",content:"media-details",toolbar:"media-details",type:"link",priority:120},initialize:function(a){this.DetailsView=a.DetailsView,this.cancelText=a.cancelText,this.addText=a.addText,this.media=new wp.media.model.PostMedia(a.metadata),this.options.selection=new wp.media.model.Selection(this.media.attachment,{multiple:!1}),d.prototype.initialize.apply(this,arguments)},bindHandlers:function(){var a=this.defaults.menu;d.prototype.bindHandlers.apply(this,arguments),this.on("menu:create:"+a,this.createMenu,this),this.on("content:render:"+a,this.renderDetailsContent,this),this.on("menu:render:"+a,this.renderMenu,this),this.on("toolbar:render:"+a,this.renderDetailsToolbar,this)},renderDetailsContent:function(){var a=new this.DetailsView({controller:this,model:this.state().media,attachment:this.state().media.attachment}).render();this.content.set(a)},renderMenu:function(a){var b=this.lastState(),c=b&&b.id,d=this;a.set({cancel:{text:this.cancelText,priority:20,click:function(){c?d.setState(c):d.close()}},separateCancel:new wp.media.View({className:"separator",priority:40})})},setPrimaryButton:function(a,b){this.toolbar.set(new wp.media.view.Toolbar({controller:this,items:{button:{style:"primary",text:a,priority:80,click:function(){var a=this.controller;b.call(this,a,a.state()),a.setState(a.options.state),a.reset()}}}}))},renderDetailsToolbar:function(){this.setPrimaryButton(e.update,function(a,b){a.close(),b.trigger("update",a.media.toJSON())})},renderReplaceToolbar:function(){this.setPrimaryButton(e.replace,function(a,b){var c=b.get("selection").single();a.media.changeAttachment(c),b.trigger("replace",a.media.toJSON())})},renderAddSourceToolbar:function(){this.setPrimaryButton(this.addText,function(a,b){var c=b.get("selection").single();a.media.setSource(c),b.trigger("add-source",a.media.toJSON())})}}),b.exports=c},{}],8:[function(a,b){var c,d=wp.media.view.MediaFrame.MediaDetails,e=wp.media.controller.MediaLibrary,f=wp.media.view.l10n;c=d.extend({defaults:{id:"video",url:"",menu:"video-details",content:"video-details",toolbar:"video-details",type:"link",title:f.videoDetailsTitle,priority:120},initialize:function(a){a.DetailsView=wp.media.view.VideoDetails,a.cancelText=f.videoDetailsCancel,a.addText=f.videoAddSourceTitle,d.prototype.initialize.call(this,a)},bindHandlers:function(){d.prototype.bindHandlers.apply(this,arguments),this.on("toolbar:render:replace-video",this.renderReplaceToolbar,this),this.on("toolbar:render:add-video-source",this.renderAddSourceToolbar,this),this.on("toolbar:render:select-poster-image",this.renderSelectPosterImageToolbar,this),this.on("toolbar:render:add-track",this.renderAddTrackToolbar,this)},createStates:function(){this.states.add([new wp.media.controller.VideoDetails({media:this.media}),new e({type:"video",id:"replace-video",title:f.videoReplaceTitle,toolbar:"replace-video",media:this.media,menu:"video-details"}),new e({type:"video",id:"add-video-source",title:f.videoAddSourceTitle,toolbar:"add-video-source",media:this.media,menu:!1}),new e({type:"image",id:"select-poster-image",title:f.videoSelectPosterImageTitle,toolbar:"select-poster-image",media:this.media,menu:"video-details"}),new e({type:"text",id:"add-track",title:f.videoAddTrackTitle,toolbar:"add-track",media:this.media,menu:"video-details"})])},renderSelectPosterImageToolbar:function(){this.setPrimaryButton(f.videoSelectPosterImageTitle,function(a,b){var c=[],d=b.get("selection").single();a.media.set("poster",d.get("url")),b.trigger("set-poster-image",a.media.toJSON()),_.each(wp.media.view.settings.embedExts,function(b){a.media.get(b)&&c.push(a.media.get(b))}),wp.ajax.send("set-attachment-thumbnail",{data:{urls:c,thumbnail_id:d.get("id")}})})},renderAddTrackToolbar:function(){this.setPrimaryButton(f.videoAddTrackTitle,function(a,b){var c=b.get("selection").single(),d=a.media.get("content");-1===d.indexOf(c.get("url"))&&(d+=['<track srclang="en" label="English" kind="subtitles" src="',c.get("url"),'" />'].join(""),a.media.set("content",d)),b.trigger("add-track",a.media.toJSON())})}}),b.exports=c},{}],9:[function(a,b){var c,d=wp.media.view.Settings.AttachmentDisplay,e=jQuery;c=d.extend({initialize:function(){_.bindAll(this,"success"),this.players=[],this.listenTo(this.controller,"close",wp.media.mixin.unsetPlayers),this.on("ready",this.setPlayer),this.on("media:setting:remove",wp.media.mixin.unsetPlayers,this),this.on("media:setting:remove",this.render),this.on("media:setting:remove",this.setPlayer),this.events=_.extend(this.events,{"click .remove-setting":"removeSetting","change .content-track":"setTracks","click .remove-track":"setTracks","click .add-media-source":"addSource"}),d.prototype.initialize.apply(this,arguments)},prepare:function(){return _.defaults({model:this.model.toJSON()},this.options)},removeSetting:function(a){var b,c=e(a.currentTarget).parent();b=c.find("input").data("setting"),b&&(this.model.unset(b),this.trigger("media:setting:remove",this)),c.remove()},setTracks:function(){var a="";_.each(this.$(".content-track"),function(b){a+=e(b).val()}),this.model.set("content",a),this.trigger("media:setting:remove",this)},addSource:function(a){this.controller.lastMime=e(a.currentTarget).data("mime"),this.controller.setState("add-"+this.controller.defaults.id+"-source")},loadPlayer:function(){this.players.push(new MediaElementPlayer(this.media,this.settings)),this.scriptXhr=!1},setPlayer:function(){var a;this.players.length||!this.media||this.scriptXhr||(this.model.get("src").indexOf("vimeo")>-1&&!("Froogaloop"in window)?(a=wp.media.mixin.mejsSettings,this.scriptXhr=e.getScript(a.pluginPath+"froogaloop.min.js",_.bind(this.loadPlayer,this))):this.loadPlayer())},setMedia:function(){return this},success:function(a){var b=a.attributes.autoplay&&"false"!==a.attributes.autoplay;"flash"===a.pluginType&&b&&a.addEventListener("canplay",function(){a.play()},!1),this.mejs=a},render:function(){return d.prototype.render.apply(this,arguments),setTimeout(_.bind(function(){this.resetFocus()},this),10),this.settings=_.defaults({success:this.success},wp.media.mixin.mejsSettings),this.setMedia()},resetFocus:function(){this.$(".embed-media-settings").scrollTop(0)}},{instances:0,prepareSrc:function(a){var b=c.instances++;return _.each(e(a).find("source"),function(a){a.src=[a.src,a.src.indexOf("?")>-1?"&":"?","_=",b].join("")}),a}}),b.exports=c},{}],10:[function(a,b){var c,d=wp.media.view.MediaDetails;c=d.extend({className:"video-details",template:wp.template("video-details"),setMedia:function(){var a=this.$(".wp-video-shortcode");return a.find("source").length?(a.is(":hidden")&&a.show(),this.media=a.hasClass("youtube-video")||a.hasClass("vimeo-video")?a.get(0):d.prepareSrc(a.get(0))):(a.hide(),this.media=!1),this}}),b.exports=c},{}]},{},[1]); \ No newline at end of file diff --git a/wp-includes/js/tinymce/plugins/wpview/plugin.js b/wp-includes/js/tinymce/plugins/wpview/plugin.js index 3a69af7538..104006a175 100644 --- a/wp-includes/js/tinymce/plugins/wpview/plugin.js +++ b/wp-includes/js/tinymce/plugins/wpview/plugin.js @@ -152,19 +152,20 @@ tinymce.PluginManager.add( 'wpview', function( editor ) { }; } - // Remove the content of view wrappers from HTML string - function emptyViews( content ) { - content = content.replace( /<div[^>]+data-wpview-text="([^"]+)"[^>]*>[\s\S]+?wpview-selection-after[^>]+>[^<>]*<\/p>\s*<\/div>/g, function( all, match ) { - return '<p>' + window.decodeURIComponent( match ) + '</p>'; - }); + function resetViewsCallback( match, viewText ) { + return '<p>' + window.decodeURIComponent( viewText ) + '</p>'; + } - return content.replace( / data-wpview-marker="[^"]+"/g, '' ); + // Replace the view tags with the view string + function resetViews( content ) { + return content.replace( /<div[^>]+data-wpview-text="([^"]+)"[^>]*>(?:[\s\S]+?wpview-selection-after[^>]+>[^<>]*<\/p>\s*|\.)<\/div>/g, resetViewsCallback ) + .replace( /<p [^>]*?data-wpview-marker="([^"]+)"[^>]*>[\s\S]*?<\/p>/g, resetViewsCallback ); } // Prevent adding undo levels on changes inside a view wrapper editor.on( 'BeforeAddUndo', function( event ) { if ( event.level.content ) { - event.level.content = emptyViews( event.level.content ); + event.level.content = resetViews( event.level.content ); } }); @@ -348,31 +349,29 @@ tinymce.PluginManager.add( 'wpview', function( editor ) { } }); - function resetViews( rootNode ) { - // Replace view nodes - $( 'div[data-wpview-text]', rootNode ).each( function( i, node ) { - var $node = $( node ), - text = window.decodeURIComponent( $node.attr( 'data-wpview-text' ) || '' ); - - if ( text && node.parentNode ) { - $node.replaceWith( $( editor.dom.create('p') ).text( text ) ); - } + // Empty the wpview wrap and marker nodes + function emptyViewNodes( rootNode ) { + $( 'div[data-wpview-text], p[data-wpview-marker]', rootNode ).each( function( i, node ) { + node.innerHTML = '.'; }); - - // Remove marker attributes - $( 'p[data-wpview-marker]', rootNode ).attr( 'data-wpview-marker', null ); } + // Run that before the DOM cleanup editor.on( 'PreProcess', function( event ) { - // Replace the view nodes with their text in the DOM clone. - resetViews( event.node ); + emptyViewNodes( event.node ); }, true ); editor.on( 'hide', function() { - // Replace the view nodes with their text directly in the editor body. wp.mce.views.unbind(); deselect(); - resetViews( editor.getBody() ); + emptyViewNodes(); + }); + + editor.on( 'PostProcess', function( event ) { + if ( event.content ) { + event.content = event.content.replace( /<div [^>]*?data-wpview-text="([^"]+)"[^>]*>[\s\S]*?<\/div>/g, resetViewsCallback ) + .replace( /<p [^>]*?data-wpview-marker="([^"]+)"[^>]*>[\s\S]*?<\/p>/g, resetViewsCallback ); + } }); // Excludes arrow keys, delete, backspace, enter, space bar. diff --git a/wp-includes/js/tinymce/plugins/wpview/plugin.min.js b/wp-includes/js/tinymce/plugins/wpview/plugin.min.js index c46f71df69..86a58af7bb 100644 --- a/wp-includes/js/tinymce/plugins/wpview/plugin.min.js +++ b/wp-includes/js/tinymce/plugins/wpview/plugin.min.js @@ -1 +1 @@ -tinymce.PluginManager.add("wpview",function(a){function b(a){return c(a,"wpview-wrap")}function c(a,b){for(;a&&a.parentNode;){if(a.className&&-1!==(" "+a.className+" ").indexOf(" "+b+" "))return a;a=a.parentNode}return!1}function d(a){a.stopPropagation()}function e(b,c){var d=b?"before":"after",e=b?0:1;i(),a.selection.setCursorLocation(a.dom.select(".wpview-selection-"+d,c)[0],e),a.nodeChanged()}function f(b,c,d){var f=a.dom,g=f.create("p");v.ie&&v.ie<11||(g.innerHTML='<br data-mce-bogus="1">'),c?b.parentNode.insertBefore(g,b):f.insertAfter(g,b),i(),c&&d===w.ENTER?e(c,b):a.selection.setCursorLocation(g,0),a.nodeChanged()}function g(b){a.undoManager.transact(function(){f(b),wp.mce.views.remove(a,b)})}function h(b){var c,e=a.dom;b&&(b!==m&&(a.getBody().focus(),i(),m=b,e.setAttrib(b,"data-mce-selected",1),c=e.create("div",{"class":"wpview-clipboard",contenteditable:"true"},wp.mce.views.getText(b)),a.dom.select(".wpview-body",b)[0].appendChild(c),e.bind(c,"beforedeactivate focusin focusout",d),e.bind(m,"beforedeactivate focusin focusout",d),B?a.selection.select(c):a.selection.select(c,!0)),a.nodeChanged(),a.fire("wpview-selected",b))}function i(){var b,c=a.dom;m&&(b=a.dom.select(".wpview-clipboard",m)[0],c.unbind(b),c.remove(b),c.unbind(m,"beforedeactivate focusin focusout click mouseup",d),c.setAttrib(m,"data-mce-selected",null)),m=null}function j(a){return a=a.replace(/<div[^>]+data-wpview-text="([^"]+)"[^>]*>[\s\S]+?wpview-selection-after[^>]+>[^<>]*<\/p>\s*<\/div>/g,function(a,b){return"<p>"+window.decodeURIComponent(b)+"</p>"}),a.replace(/ data-wpview-marker="[^"]+"/g,"")}function k(b){u("div[data-wpview-text]",b).each(function(b,c){var d=u(c),e=window.decodeURIComponent(d.attr("data-wpview-text")||"");e&&c.parentNode&&d.replaceWith(u(a.dom.create("p")).text(e))}),u("p[data-wpview-marker]",b).attr("data-wpview-marker",null)}function l(a){return 47>=a&&a!==w.SPACEBAR&&a!==w.ENTER&&a!==w.DELETE&&a!==w.BACKSPACE&&(37>a||a>40)||a>=224||a>=144&&150>=a||a>=91&&93>=a||a>=112&&135>=a}var m,n,o,p,q,r,s,t,u=a.$,v=tinymce.Env,w=tinymce.util.VK,x=tinymce.dom.TreeWalker,y=!1,z=!0,A=function(){return!1},B=/iPad|iPod|iPhone/.test(navigator.userAgent);return"undefined"!=typeof wp&&wp.mce?(a.on("BeforeAddUndo",function(a){a.level.content&&(a.level.content=j(a.level.content))}),a.on("BeforeSetContent",function(b){var c;if(b.selection||wp.mce.views.unbind(),b.content){if(!b.load&&(m&&g(m),c=a.selection.getNode(),c&&c!==a.getBody()&&/^\s*https?:\/\/\S+\s*$/i.test(b.content))){if(c=a.dom.getParent(c,"p"),!c||!/^[\s\uFEFF\u00A0]*$/.test(u(c).text()||""))return;c.innerHTML=""}b.content=wp.mce.views.setMarkers(b.content)}}),a.on("pastePreProcess",function(a){var b=a.content;b&&(b=tinymce.trim(b.replace(/<[^>]+>/g,"")),/^https?:\/\/\S+$/i.test(b)&&(a.content=b))}),a.on("SetContent",function(){wp.mce.views.render()}),a.on("click",function(c){var d,f,g,h=c.clientX,i=c.clientY,j=a.getBody(),k=j.getBoundingClientRect(),l=j.firstChild,m=j.lastChild;l&&m&&(d=l.getBoundingClientRect(),f=m.getBoundingClientRect(),i<d.top&&(g=b(l))?(e(!0,g),c.preventDefault()):i>f.bottom&&(g=b(m))?(e(!1,g),c.preventDefault()):(h<k.left||h>k.right)&&tinymce.each(a.dom.select(".wpview-wrap"),function(a){var b=a.getBoundingClientRect();return i<b.top?!1:i>=b.top&&i<=b.bottom?(h<k.left?(e(!0,a),c.preventDefault()):h>k.right&&(e(!1,a),c.preventDefault()),!1):void 0}))}),a.on("init",function(){var c=!1,d=a.selection,e=window.MutationObserver||window.WebKitMutationObserver;a.on("BeforeSetContent",function(){var c,e,f=b(d.getNode());f&&(!f.nextSibling||b(f.nextSibling)?(e=a.getDoc().createTextNode(""),a.dom.insertAfter(e,f)):(c=new x(f.nextSibling,f.nextSibling),e=c.next()),d.select(e),d.collapse(!0))}),a.dom.bind(a.getDoc(),"touchmove",function(){c=!0}),a.on("mousedown mouseup click touchend",function(a){var d=b(a.target);return z=!1,d?(a.stopImmediatePropagation(),a.preventDefault(),"touchend"===a.type&&c?c=!1:h(d),!1):(("touchend"===a.type||"mousedown"===a.type)&&i(),void("touchend"===a.type&&c&&(c=!1)))},!0),e&&new e(function(){a.fire("wp-body-class-change")}).observe(a.getBody(),{attributes:!0,attributeFilter:["class"]})}),a.on("PreProcess",function(a){k(a.node)},!0),a.on("hide",function(){wp.mce.views.unbind(),i(),k(a.getBody())}),a.on("keydown",function(c){var d,j,k,n,p,q,r,s=c.keyCode,t=a.dom,u=a.selection;if(m){if((c.metaKey||c.ctrlKey)&&s!==w.BACKSPACE&&86!==s||s>=112&&123>=s)return void((c.metaKey||c.ctrlKey)&&88===s&&(y=m));if(j=b(u.getNode()),j!==m)return void i();s===w.LEFT?(e(!0,j),c.preventDefault()):s===w.UP?(j.previousSibling?b(j.previousSibling)?e(!0,j.previousSibling):(i(),u.select(j.previousSibling,!0),u.collapse()):e(!0,j),c.preventDefault()):s===w.RIGHT?(e(!1,j),c.preventDefault()):s===w.DOWN?(j.nextSibling?b(j.nextSibling)?e(!1,j.nextSibling):(i(),u.setCursorLocation(j.nextSibling,0)):e(!1,j),c.preventDefault()):l(s)||(g(m),(s===w.ENTER||s===w.DELETE||s===w.BACKSPACE)&&c.preventDefault())}else{if(c.metaKey||c.ctrlKey||s>=112&&123>=s)return;if(d=u.getNode(),o=d,j=b(d),u.isCollapsed()||(p=u.getRng(),(j=b(p.endContainer))?(q=p.cloneRange(),u.select(j.previousSibling,!0),u.collapse(),r=u.getRng(),q.setEnd(r.endContainer,r.endOffset),u.setRng(q)):(j=b(p.startContainer))&&(q=p.cloneRange(),q.setStart(j.nextSibling,0),u.setRng(q))),!j)return void(c.keyCode===w.BACKSPACE&&(a.dom.isEmpty(d)?(j=b(d.previousSibling))&&(e(!1,j),a.dom.remove(d),c.preventDefault()):(p=u.getRng())&&0===p.startOffset&&0===p.endOffset&&(j=b(d.previousSibling))&&(e(!1,j),c.preventDefault())));if(!(k=t.hasClass(j,"wpview-selection-before"))&&!(n=t.hasClass(j,"wpview-selection-after")))return;if(l(s))return;n&&s===w.UP||k&&s===w.BACKSPACE?(j.previousSibling?b(j.previousSibling)?e(!1,j.previousSibling):t.isEmpty(j.previousSibling)&&s===w.BACKSPACE?t.remove(j.previousSibling):(u.select(j.previousSibling,!0),u.collapse()):e(!0,j),c.preventDefault()):!n||s!==w.DOWN&&s!==w.RIGHT?!k||s!==w.UP&&s!==w.LEFT?k&&s===w.DOWN?(j.nextSibling?b(j.nextSibling)?e(!0,j.nextSibling):u.setCursorLocation(j.nextSibling,0):e(!1,j),c.preventDefault()):n&&s===w.LEFT||k&&s===w.RIGHT?(h(j),c.preventDefault()):n&&s===w.BACKSPACE?(g(j),c.preventDefault()):n?f(j):k&&f(j,!0,s):(j.previousSibling&&(b(j.previousSibling)?e(s===w.UP,j.previousSibling):(u.select(j.previousSibling,!0),u.collapse())),c.preventDefault()):(j.nextSibling&&(b(j.nextSibling)?e(s===w.RIGHT,j.nextSibling):u.setCursorLocation(j.nextSibling,0)),c.preventDefault()),s===w.ENTER&&c.preventDefault()}}),a.on("keyup",function(){y&&(g(y),y=!1)}),a.on("focus",function(){var c;q=!0,a.dom.addClass(a.getBody(),"has-focus"),z&&(c=b(a.getBody().firstChild))&&e(!0,c),z=!1}),a.on("blur",function(){q=!1,a.dom.removeClass(a.getBody(),"has-focus")}),a.on("NodeChange",function(d){var f=a.dom,g=a.dom.select(".wpview-wrap"),h=d.element.className,j=b(d.element),k=o;if(o=!1,clearInterval(n),tinymce.each(g,function(a){a.className&&(a.className=a.className.replace(/ ?\bwpview-(?:selection-before|selection-after|cursor-hide)\b/g,""))}),q&&j)if("wpview-selection-before"!==h&&"wpview-selection-after"!==h||!a.selection.isCollapsed())c(d.element,"wpview-clipboard")||p||(i(),p++,e(!0,j));else{if(p=0,i(),k===j.previousSibling)return void e(!0,j);if(k===j.nextSibling)return void e(!1,j);f.addClass(j,h),n=setInterval(function(){f.hasClass(j,"wpview-cursor-hide")?f.removeClass(j,"wpview-cursor-hide"):f.addClass(j,"wpview-cursor-hide")},500)}}),a.on("BeforeExecCommand",function(){var c,d=a.selection.getNode();d&&((s="wpview-selection-before"===d.className)||"wpview-selection-after"===d.className)&&(c=b(d))&&(f(c,s),r=c)}),a.on("ExecCommand",function(){var b,c;m&&(b=m,i(),h(b)),r&&(c=r[s?"previousSibling":"nextSibling"],c&&"P"===c.nodeName&&a.dom.isEmpty(c)&&(a.dom.remove(c),e(s,r)),r=!1)}),a.on("ResolveName",function(c){a.dom.hasClass(c.target,"wpview-wrap")?(c.name=a.dom.getAttrib(c.target,"data-wpview-type")||"wpview",c.stopPropagation()):b(c.target)&&(c.preventDefault(),c.stopPropagation())}),a.addButton("wp_view_edit",{tooltip:"Edit ",icon:"dashicon dashicons-edit",onclick:function(){m&&wp.mce.views.edit(a,m)}}),a.addButton("wp_view_remove",{tooltip:"Remove",icon:"dashicon dashicons-no",onclick:function(){m&&g(m)}}),a.once("preinit",function(){t=a.wp._createToolbar(["wp_view_edit","wp_view_remove"])}),a.on("wptoolbar",function(a){m&&(a.element=m,a.toolbar=t)}),a.wp=a.wp||{},a.wp.getView=b,{getView:b}):{getView:A}}); \ No newline at end of file +tinymce.PluginManager.add("wpview",function(a){function b(a){return c(a,"wpview-wrap")}function c(a,b){for(;a&&a.parentNode;){if(a.className&&-1!==(" "+a.className+" ").indexOf(" "+b+" "))return a;a=a.parentNode}return!1}function d(a){a.stopPropagation()}function e(b,c){var d=b?"before":"after",e=b?0:1;i(),a.selection.setCursorLocation(a.dom.select(".wpview-selection-"+d,c)[0],e),a.nodeChanged()}function f(b,c,d){var f=a.dom,g=f.create("p");w.ie&&w.ie<11||(g.innerHTML='<br data-mce-bogus="1">'),c?b.parentNode.insertBefore(g,b):f.insertAfter(g,b),i(),c&&d===x.ENTER?e(c,b):a.selection.setCursorLocation(g,0),a.nodeChanged()}function g(b){a.undoManager.transact(function(){f(b),wp.mce.views.remove(a,b)})}function h(b){var c,e=a.dom;b&&(b!==n&&(a.getBody().focus(),i(),n=b,e.setAttrib(b,"data-mce-selected",1),c=e.create("div",{"class":"wpview-clipboard",contenteditable:"true"},wp.mce.views.getText(b)),a.dom.select(".wpview-body",b)[0].appendChild(c),e.bind(c,"beforedeactivate focusin focusout",d),e.bind(n,"beforedeactivate focusin focusout",d),C?a.selection.select(c):a.selection.select(c,!0)),a.nodeChanged(),a.fire("wpview-selected",b))}function i(){var b,c=a.dom;n&&(b=a.dom.select(".wpview-clipboard",n)[0],c.unbind(b),c.remove(b),c.unbind(n,"beforedeactivate focusin focusout click mouseup",d),c.setAttrib(n,"data-mce-selected",null)),n=null}function j(a,b){return"<p>"+window.decodeURIComponent(b)+"</p>"}function k(a){return a.replace(/<div[^>]+data-wpview-text="([^"]+)"[^>]*>(?:[\s\S]+?wpview-selection-after[^>]+>[^<>]*<\/p>\s*|\.)<\/div>/g,j).replace(/<p [^>]*?data-wpview-marker="([^"]+)"[^>]*>[\s\S]*?<\/p>/g,j)}function l(a){v("div[data-wpview-text], p[data-wpview-marker]",a).each(function(a,b){b.innerHTML="."})}function m(a){return 47>=a&&a!==x.SPACEBAR&&a!==x.ENTER&&a!==x.DELETE&&a!==x.BACKSPACE&&(37>a||a>40)||a>=224||a>=144&&150>=a||a>=91&&93>=a||a>=112&&135>=a}var n,o,p,q,r,s,t,u,v=a.$,w=tinymce.Env,x=tinymce.util.VK,y=tinymce.dom.TreeWalker,z=!1,A=!0,B=function(){return!1},C=/iPad|iPod|iPhone/.test(navigator.userAgent);return"undefined"!=typeof wp&&wp.mce?(a.on("BeforeAddUndo",function(a){a.level.content&&(a.level.content=k(a.level.content))}),a.on("BeforeSetContent",function(b){var c;if(b.selection||wp.mce.views.unbind(),b.content){if(!b.load&&(n&&g(n),c=a.selection.getNode(),c&&c!==a.getBody()&&/^\s*https?:\/\/\S+\s*$/i.test(b.content))){if(c=a.dom.getParent(c,"p"),!c||!/^[\s\uFEFF\u00A0]*$/.test(v(c).text()||""))return;c.innerHTML=""}b.content=wp.mce.views.setMarkers(b.content)}}),a.on("pastePreProcess",function(a){var b=a.content;b&&(b=tinymce.trim(b.replace(/<[^>]+>/g,"")),/^https?:\/\/\S+$/i.test(b)&&(a.content=b))}),a.on("SetContent",function(){wp.mce.views.render()}),a.on("click",function(c){var d,f,g,h=c.clientX,i=c.clientY,j=a.getBody(),k=j.getBoundingClientRect(),l=j.firstChild,m=j.lastChild;l&&m&&(d=l.getBoundingClientRect(),f=m.getBoundingClientRect(),i<d.top&&(g=b(l))?(e(!0,g),c.preventDefault()):i>f.bottom&&(g=b(m))?(e(!1,g),c.preventDefault()):(h<k.left||h>k.right)&&tinymce.each(a.dom.select(".wpview-wrap"),function(a){var b=a.getBoundingClientRect();return i<b.top?!1:i>=b.top&&i<=b.bottom?(h<k.left?(e(!0,a),c.preventDefault()):h>k.right&&(e(!1,a),c.preventDefault()),!1):void 0}))}),a.on("init",function(){var c=!1,d=a.selection,e=window.MutationObserver||window.WebKitMutationObserver;a.on("BeforeSetContent",function(){var c,e,f=b(d.getNode());f&&(!f.nextSibling||b(f.nextSibling)?(e=a.getDoc().createTextNode(""),a.dom.insertAfter(e,f)):(c=new y(f.nextSibling,f.nextSibling),e=c.next()),d.select(e),d.collapse(!0))}),a.dom.bind(a.getDoc(),"touchmove",function(){c=!0}),a.on("mousedown mouseup click touchend",function(a){var d=b(a.target);return A=!1,d?(a.stopImmediatePropagation(),a.preventDefault(),"touchend"===a.type&&c?c=!1:h(d),!1):(("touchend"===a.type||"mousedown"===a.type)&&i(),void("touchend"===a.type&&c&&(c=!1)))},!0),e&&new e(function(){a.fire("wp-body-class-change")}).observe(a.getBody(),{attributes:!0,attributeFilter:["class"]})}),a.on("PreProcess",function(a){l(a.node)},!0),a.on("hide",function(){wp.mce.views.unbind(),i(),l()}),a.on("PostProcess",function(a){a.content&&(a.content=a.content.replace(/<div [^>]*?data-wpview-text="([^"]+)"[^>]*>[\s\S]*?<\/div>/g,j).replace(/<p [^>]*?data-wpview-marker="([^"]+)"[^>]*>[\s\S]*?<\/p>/g,j))}),a.on("keydown",function(c){var d,j,k,l,o,q,r,s=c.keyCode,t=a.dom,u=a.selection;if(n){if((c.metaKey||c.ctrlKey)&&s!==x.BACKSPACE&&86!==s||s>=112&&123>=s)return void((c.metaKey||c.ctrlKey)&&88===s&&(z=n));if(j=b(u.getNode()),j!==n)return void i();s===x.LEFT?(e(!0,j),c.preventDefault()):s===x.UP?(j.previousSibling?b(j.previousSibling)?e(!0,j.previousSibling):(i(),u.select(j.previousSibling,!0),u.collapse()):e(!0,j),c.preventDefault()):s===x.RIGHT?(e(!1,j),c.preventDefault()):s===x.DOWN?(j.nextSibling?b(j.nextSibling)?e(!1,j.nextSibling):(i(),u.setCursorLocation(j.nextSibling,0)):e(!1,j),c.preventDefault()):m(s)||(g(n),(s===x.ENTER||s===x.DELETE||s===x.BACKSPACE)&&c.preventDefault())}else{if(c.metaKey||c.ctrlKey||s>=112&&123>=s)return;if(d=u.getNode(),p=d,j=b(d),u.isCollapsed()||(o=u.getRng(),(j=b(o.endContainer))?(q=o.cloneRange(),u.select(j.previousSibling,!0),u.collapse(),r=u.getRng(),q.setEnd(r.endContainer,r.endOffset),u.setRng(q)):(j=b(o.startContainer))&&(q=o.cloneRange(),q.setStart(j.nextSibling,0),u.setRng(q))),!j)return void(c.keyCode===x.BACKSPACE&&(a.dom.isEmpty(d)?(j=b(d.previousSibling))&&(e(!1,j),a.dom.remove(d),c.preventDefault()):(o=u.getRng())&&0===o.startOffset&&0===o.endOffset&&(j=b(d.previousSibling))&&(e(!1,j),c.preventDefault())));if(!(k=t.hasClass(j,"wpview-selection-before"))&&!(l=t.hasClass(j,"wpview-selection-after")))return;if(m(s))return;l&&s===x.UP||k&&s===x.BACKSPACE?(j.previousSibling?b(j.previousSibling)?e(!1,j.previousSibling):t.isEmpty(j.previousSibling)&&s===x.BACKSPACE?t.remove(j.previousSibling):(u.select(j.previousSibling,!0),u.collapse()):e(!0,j),c.preventDefault()):!l||s!==x.DOWN&&s!==x.RIGHT?!k||s!==x.UP&&s!==x.LEFT?k&&s===x.DOWN?(j.nextSibling?b(j.nextSibling)?e(!0,j.nextSibling):u.setCursorLocation(j.nextSibling,0):e(!1,j),c.preventDefault()):l&&s===x.LEFT||k&&s===x.RIGHT?(h(j),c.preventDefault()):l&&s===x.BACKSPACE?(g(j),c.preventDefault()):l?f(j):k&&f(j,!0,s):(j.previousSibling&&(b(j.previousSibling)?e(s===x.UP,j.previousSibling):(u.select(j.previousSibling,!0),u.collapse())),c.preventDefault()):(j.nextSibling&&(b(j.nextSibling)?e(s===x.RIGHT,j.nextSibling):u.setCursorLocation(j.nextSibling,0)),c.preventDefault()),s===x.ENTER&&c.preventDefault()}}),a.on("keyup",function(){z&&(g(z),z=!1)}),a.on("focus",function(){var c;r=!0,a.dom.addClass(a.getBody(),"has-focus"),A&&(c=b(a.getBody().firstChild))&&e(!0,c),A=!1}),a.on("blur",function(){r=!1,a.dom.removeClass(a.getBody(),"has-focus")}),a.on("NodeChange",function(d){var f=a.dom,g=a.dom.select(".wpview-wrap"),h=d.element.className,j=b(d.element),k=p;if(p=!1,clearInterval(o),tinymce.each(g,function(a){a.className&&(a.className=a.className.replace(/ ?\bwpview-(?:selection-before|selection-after|cursor-hide)\b/g,""))}),r&&j)if("wpview-selection-before"!==h&&"wpview-selection-after"!==h||!a.selection.isCollapsed())c(d.element,"wpview-clipboard")||q||(i(),q++,e(!0,j));else{if(q=0,i(),k===j.previousSibling)return void e(!0,j);if(k===j.nextSibling)return void e(!1,j);f.addClass(j,h),o=setInterval(function(){f.hasClass(j,"wpview-cursor-hide")?f.removeClass(j,"wpview-cursor-hide"):f.addClass(j,"wpview-cursor-hide")},500)}}),a.on("BeforeExecCommand",function(){var c,d=a.selection.getNode();d&&((t="wpview-selection-before"===d.className)||"wpview-selection-after"===d.className)&&(c=b(d))&&(f(c,t),s=c)}),a.on("ExecCommand",function(){var b,c;n&&(b=n,i(),h(b)),s&&(c=s[t?"previousSibling":"nextSibling"],c&&"P"===c.nodeName&&a.dom.isEmpty(c)&&(a.dom.remove(c),e(t,s)),s=!1)}),a.on("ResolveName",function(c){a.dom.hasClass(c.target,"wpview-wrap")?(c.name=a.dom.getAttrib(c.target,"data-wpview-type")||"wpview",c.stopPropagation()):b(c.target)&&(c.preventDefault(),c.stopPropagation())}),a.addButton("wp_view_edit",{tooltip:"Edit ",icon:"dashicon dashicons-edit",onclick:function(){n&&wp.mce.views.edit(a,n)}}),a.addButton("wp_view_remove",{tooltip:"Remove",icon:"dashicon dashicons-no",onclick:function(){n&&g(n)}}),a.once("preinit",function(){u=a.wp._createToolbar(["wp_view_edit","wp_view_remove"])}),a.on("wptoolbar",function(a){n&&(a.element=n,a.toolbar=u)}),a.wp=a.wp||{},a.wp.getView=b,{getView:b}):{getView:B}}); \ No newline at end of file diff --git a/wp-includes/js/tinymce/wp-tinymce.js.gz b/wp-includes/js/tinymce/wp-tinymce.js.gz index 6ba6be48fe73439c13a968267007f825ba7c48ac..423749b2a71279c43ca7598bb8fd04a8241f9b39 100644 GIT binary patch delta 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X78Hy!Y#_V}ByLSvt37{uqS!xoTb5P3kmvQzNUJf>zQoa=Hkm!D<Q^ zo6iRaqX=U@+K4yMl>s4tda3n31%2$dS}CJKB7!tj<cKc|3<I)B^P{6!kwW%^M;>LK zo-x-AOS-vBC0D8*#gXUAax>K`BH23c*(E!|Aj)Y9`^`+1lk3uRYJZ9045Dt&S&1#R z66cHFDmU>%gvz*8<dN}GYKf^s#a>AMV*Yt0=MIacLXkV(DXvviyO=g?2wWskUEs$G zyU(^YH;)TtJeknE4#={!pm#3bExSQ&ii0E&^B8<URV2sB77g$zeR?ZXwgbroD{C1q z@KX+5^Lxb<jjU)g7=2IB1H?L<@&<KXx{A85B-;c)N)GHm2L$m|Gx<h|eVRcw8gjkw zDGv-2e&V0QVVY=lw~~p;tt^WtUIZxm^gjnarPR|mI}m+V?T9{NEb8ss4Z_2wS)F8P m5?iF5RZBbt%-yf>35=vrKM}qzF&7sYMe%<z4}umbS_S}<$0JYx diff --git a/wp-includes/version.php b/wp-includes/version.php index a79f170078..16ccfee92a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.3-alpha-32677'; +$wp_version = '4.3-alpha-32678'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.