File Editor
Directories:
.. (Back)
Files:
editor-view.min.asset.php
editor-view.min.js
gutenberg-video-upload.min.asset.php
gutenberg-video-upload.min.js
media-video-widget-extensions.min.asset.php
media-video-widget-extensions.min.js
videopress-add-resumable-upload-support.min.asset.php
videopress-add-resumable-upload-support.min.js
videopress-plupload.min.asset.php
videopress-plupload.min.js
videopress-uploader.min.asset.php
videopress-uploader.min.js
Create New File
Create
Edit File: editor-view.min.js
!function(e,t,a){t.mce=t.mce||{},void 0!==t.mce.views&&(t.mce.videopress_wp_view_renderer={shortcode_string:"videopress",shortcode_data:{},defaults:{w:"",at:"",permalink:!0,hd:!1,loop:!1,freedom:!1,autoplay:!1,flashonly:!1},coerce:t.media.coerce,template:t.template("videopress_iframe_vnext"),getContent:function(){var e,t,o,s="for="+encodeURIComponent(a.home_url_host),l=this.shortcode.attrs.named;for(t in l)switch(t){case"at":parseInt(l[t],10)&&(s+="&"+t+"="+parseInt(l[t],10));break;case"permalink":"false"===l[t]&&(s+="&"+t+"=0");break;case"hd":case"loop":case"autoplay":"true"===l[t]&&(s+="&"+t+"=1")}return e={width:a.content_width,height:.5625*a.content_width,guid:this.shortcode.attrs.numeric[0],urlargs:s},void 0!==l.w&&(o=parseInt(l.w,10))>=a.min_content_width&&o<a.content_width&&(e.width=o,e.height=parseInt(.5625*o,10)),e.ratio=e.height/e.width*100,this.template(e)},edit:function(o){var s=t.shortcode.next(this.shortcode_string,o),l=s.shortcode.attrs.named,i=tinyMCE.activeEditor,n=this,d=tinyMCE.ui.FormItem.prototype.renderHtml;tinyMCE.ui.TextBox.prototype.renderHtml=function(){var e,t,a=this,o=a.settings,s=document.createElement(o.multiline?"textarea":"input"),l=["rows","spellcheck","maxLength","size","readonly","min","max","step","list","pattern","placeholder","required","multiple"];for(e=0;e<l.length;e++)void 0!==o[t=l[e]]&&s.setAttribute(t,o[t]);return o.multiline?s.innerText=a.state.get("value"):(s.setAttribute("type",o.subtype?o.subtype:"text"),s.setAttribute("value",a.state.get("value"))),s.id=a._id,s.className=a.classes,s.setAttribute("hidefocus",1),a.disabled()&&(s.disabled=!0),s.outerHTML},tinyMCE.ui.FormItem.prototype.renderHtml=function(){return _.each(a.modal_labels,(function(e,t){e===this.settings.items.text&&this.classes.add("videopress-field-"+t)}),this),_.contains([a.modal_labels.hd,a.modal_labels.permalink,a.modal_labels.autoplay,a.modal_labels.loop,a.modal_labels.freedom,a.modal_labels.flashonly],this.settings.items.text)&&this.classes.add("videopress-checkbox"),d.call(this)},_.each(this.defaults,(function(e,t){l[t]=this.coerce(l,t)}),this),i.windowManager.open({title:a.modal_labels.title,id:"videopress-shortcode-settings-modal",width:520,height:240,body:[{type:"textbox",disabled:!0,name:"guid",label:a.modal_labels.guid,value:s.shortcode.attrs.numeric[0]},{type:"textbox",subtype:"number",min:a.min_content_width,name:"w",label:a.modal_labels.w,value:l.w},{type:"textbox",subtype:"number",min:0,name:"at",label:a.modal_labels.at,value:l.at},{type:"checkbox",name:"hd",label:a.modal_labels.hd,checked:l.hd},{type:"checkbox",name:"permalink",label:a.modal_labels.permalink,checked:l.permalink},{type:"checkbox",name:"autoplay",label:a.modal_labels.autoplay,checked:l.autoplay},{type:"checkbox",name:"loop",label:a.modal_labels.loop,checked:l.loop},{type:"checkbox",name:"freedom",label:a.modal_labels.freedom,checked:l.freedom},{type:"checkbox",name:"flashonly",label:a.modal_labels.flashonly,checked:l.flashonly}],onsubmit:function(e){var a={tag:n.shortcode_string,type:"single",attrs:{named:_.pick(e.data,_.keys(n.defaults)),numeric:[e.data.guid]}};"0"===a.attrs.named.at&&(a.attrs.named.at=""),_.each(n.defaults,(function(e,t){a.attrs.named[t]=this.coerce(a.attrs.named,t),e===a.attrs.named[t]&&delete a.attrs.named[t]}),n),i.insertContent(t.shortcode.string(a))},onopen:function(t){var o="mce-videopress-field-";_.each(["w","at"],(function(e){t.target.$el.find("."+o+e+" .mce-container-body").append('<span class="'+o+"unit "+o+"unit-"+e+'">'+a.modal_labels[e+"_unit"])})),e("body").addClass("modal-open")},onclose:function(){e("body").removeClass("modal-open")}}),tinyMCE.ui.FormItem.prototype.renderHtml=d}},t.mce.views.register("videopress",t.mce.videopress_wp_view_renderer),t.mce.wpvideo_wp_view_renderer=_.extend({},t.mce.videopress_wp_view_renderer,{shortcode_string:"wpvideo"}),t.mce.views.register("wpvideo",t.mce.wpvideo_wp_view_renderer))}(jQuery,wp,vpEditorView);
Save Changes
Rename File
Rename