Add upstream

This commit is contained in:
root
2019-10-24 00:12:05 +02:00
parent 85d41e4216
commit ac980f592c
3504 changed files with 1049983 additions and 29971 deletions

View File

@@ -0,0 +1,3 @@
/* Do not modify this file directly. It is compiled from other files. */
/* global tinyMCE, vpEditorView */
!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),i=this.shortcode.attrs.named;for(t in i)switch(t){case"at":parseInt(i[t],10)&&(s+="&"+t+"="+parseInt(i[t],10));break;case"permalink":"false"===i[t]&&(s+="&"+t+"=0");break;case"hd":case"loop":case"autoplay":"true"===i[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!==i.w&&(o=parseInt(i.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),i=s.shortcode.attrs.named,l=tinyMCE.activeEditor,n=this,d=tinyMCE.ui.FormItem.prototype.renderHtml;tinyMCE.ui.TextBox.prototype.renderHtml=function(){var e,t,a=this.settings,o=document.createElement(a.multiline?"textarea":"input"),s=["rows","spellcheck","maxLength","size","readonly","min","max","step","list","pattern","placeholder","required","multiple"];for(e=0;e<s.length;e++)void 0!==a[t=s[e]]&&o.setAttribute(t,a[t]);return a.multiline?o.innerText=this.state.get("value"):(o.setAttribute("type",a.subtype?a.subtype:"text"),o.setAttribute("value",this.state.get("value"))),o.id=this._id,o.className=this.classes,o.setAttribute("hidefocus",1),this.disabled()&&(o.disabled=!0),o.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){i[t]=this.coerce(i,t)},this),l.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:i.w},{type:"textbox",subtype:"number",min:0,name:"at",label:a.modal_labels.at,value:i.at},{type:"checkbox",name:"hd",label:a.modal_labels.hd,checked:i.hd},{type:"checkbox",name:"permalink",label:a.modal_labels.permalink,checked:i.permalink},{type:"checkbox",name:"autoplay",label:a.modal_labels.autoplay,checked:i.autoplay},{type:"checkbox",name:"loop",label:a.modal_labels.loop,checked:i.loop},{type:"checkbox",name:"freedom",label:a.modal_labels.freedom,checked:i.freedom},{type:"checkbox",name:"flashonly",label:a.modal_labels.flashonly,checked:i.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),l.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);

View File

@@ -0,0 +1,2 @@
/* Do not modify this file directly. It is compiled from other files. */
window.wp=window.wp||{},function(e){var o,d;e.mediaWidgets&&(e.mediaWidgets.controlConstructors.media_video.prototype.mapMediaToModelProps=(d=e.mediaWidgets.controlConstructors.media_video.prototype.mapMediaToModelProps,function(e){var o,i,t;return i=d.call(this,e),o=_.extend({},i),e.videopress&&e.videopress.guid&&(t=e.videopress.guid),!t&&e.videopress_guid&&e.videopress_guid.length&&(t=e.videopress_guid[0]),t&&(o=_.extend({},i,{url:"https://videopress.com/v/"+t,attachment_id:0})),o}),e.mediaWidgets.controlConstructors.media_video.prototype.isHostedVideo=(o=e.mediaWidgets.controlConstructors.media_video.prototype.isHostedVideo,function(e){var d=document.createElement("a");return d.href=e,"videopress.com"===d.hostname||o.call(this,e)}))}(window.wp);

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,3 @@
/* Do not modify this file directly. It is compiled from other files. */
/* globals plupload, pluploadL10n, error */
window.wp=window.wp||{},function(e){var i={originalOptions:{},handleStandardResponse:function(e,i){return!_.isObject(e)||_.isUndefined(e.success)?error(pluploadL10n.default_error,null,i):e.success?e:error(e.data&&e.data.message,e.data,i)},handleRestApiResponse:function(e,i){if(1!==e.media.length)return error(pluploadL10n.default_error,null,i);var t=e.media[0],a=t.mime_type.split("/"),o={alt:"",author:t.author_ID||0,authorName:"",caption:"",compat:{item:"",meta:""},date:t.date||"",dateFormatted:t.date||"",description:t.description||"",editLink:"",filename:t.file||"",filesizeHumanReadable:"",filesizeInBytes:"",height:t.height,icon:t.icon||"",id:t.ID||"",link:t.URL||"",menuOrder:0,meta:!1,mime:t.mime_type||"",modified:0,name:"",nonces:{update:"",delete:"",edit:""},orientation:"",sizes:void 0,status:"",subtype:a[1]||"",title:t.title||"",type:a[0]||"",uploadedTo:1,uploadedToLink:"",uploadedToTitle:"",url:t.URL||"",width:t.width,success:"",videopress:{guid:t.videopress_guid||null,processing_done:t.videopress_processing_done||!1}};return e.data=o,e},resetToOriginalOptions:function(e){void 0!==i.originalOptions.url&&(e.setOption("url",i.originalOptions.url),delete i.originalOptions.url),void 0!==i.originalOptions.multipart_params&&(e.setOption("multipart_params",i.originalOptions.multipart_params),delete i.originalOptions.multipart_params),void 0!==i.originalOptions.file_data_name&&(e.setOption("file_data_name",i.originalOptions.file_data_name),delete i.originalOptions.file_data_name)}};if(void 0!==e.Uploader){var t=e.media;plupload.VIDEOPRESS_TOKEN_FAILURE="VP_TOKEN_FAILURE",plupload.addFileFilter("videopress_check_uploads",function(e,i,a){var o=i.type.split("/"),n=this;"video"===o[0]?t.ajax("videopress-get-upload-token",{async:!1,data:{filename:i.name}}).done(function(e){i.videopress=e,a(!0)}).fail(function(e){n.trigger("Error",{code:plupload.VIDEOPRESS_TOKEN_FAILURE,message:plupload.translate("Could not get the VideoPress token needed for uploading"),file:i,response:e}),a(!1)}):void 0!==i.size&&e&&i.size>e?(this.trigger("Error",{code:plupload.FILE_SIZE_ERROR,message:plupload.translate("File size error."),file:i}),a(!1)):a(!0)})}e.VideoPress=i}(window.wp);