芝麻web文件管理V1.00
编辑当前文件:/home/krishnamexports/www/panel/vendors/tinymce/plugins/media/plugin.min.js
!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i
"}else"application/x-shockwave-flash"===j.source1mime?(i+='
',j.poster&&(i+='
'),i+="
"):j.source1mime.indexOf("audio")!==-1?g.settings.audio_template_callback?i=g.settings.audio_template_callback(j):i+='
'+(j.source2?'\n
\n":"")+"
":"script"===j.type?i+='':i=g.settings.video_template_callback?g.settings.video_template_callback(j):'
\n
\n"+(j.source2?'
\n":"")+"
"}return i};return{dataToHtml:g}}),g("l",["8"],function(a){return a("tinymce.util.Promise")}),g("i",["k","l"],function(a,b){var c=function(a,c,d){var e={};return new b(function(b,f){var g=function(d){return d.html&&(e[a.source1]=d),b({url:a.source1,html:d.html?d.html:c(a)})};e[a.source1]?g(e[a.source1]):d({url:a.source1},g,f)})},d=function(a,c){return new b(function(b){b({html:c(a),url:a.source1})})},e=function(b){return function(c){return a.dataToHtml(b,c)}},f=function(a,b){var f=a.settings.media_url_resolver;return f?c(b,e(a),f):d(b,e(a))};return{getEmbedHtml:f}}),g("j",[],function(){var a=function(a,b){a.state.set("oldVal",a.value()),b.state.set("oldVal",b.value())},b=function(a,b){var c=a.find("#width")[0],d=a.find("#height")[0],e=a.find("#constrain")[0];c&&d&&e&&b(c,d,e.checked())},c=function(b,c,d){var e=b.state.get("oldVal"),f=c.state.get("oldVal"),g=b.value(),h=c.value();d&&e&&f&&g&&h&&(g!==e?(h=Math.round(g/e*h),isNaN(h)||c.value(h)):(g=Math.round(h/f*g),isNaN(g)||b.value(g))),a(b,c)},d=function(c){b(c,a)},e=function(a){b(a,c)},f=function(a){var b=function(){a(function(a){e(a)})};return{type:"container",label:"Dimensions",layout:"flex",align:"center",spacing:5,items:[{name:"width",type:"textbox",maxLength:5,size:5,onchange:b,ariaLabel:"Width"},{type:"label",text:"x"},{name:"height",type:"textbox",maxLength:5,size:5,onchange:b,ariaLabel:"Height"},{name:"constrain",type:"checkbox",checked:!0,text:"Constrain proportions"}]}};return{createUi:f,syncSize:d,updateSize:e}}),g("7",["g","h","6","i","f","3","d","j"],function(a,b,c,d,e,f,g,h){var i=g.ie&&g.ie<=8?"onChange":"onInput",j=function(a){return function(b){var c=b&&b.msg?"Media embed handler error: "+b.msg:"Media embed handler threw unknown error.";a.notificationManager.open({type:"error",text:c})}},k=function(a){var c=a.selection.getNode(),d=c.getAttribute("data-ephox-embed-iri");return d?{source1:d,"data-ephox-embed-iri":d,width:e.getMaxWidth(c),height:e.getMaxHeight(c)}:c.getAttribute("data-mce-object")?b.htmlToData(a.settings.media_scripts,a.serializer.serialize(c,{selection:!0})):{}},l=function(a){var b=a.selection.getNode();if(b.getAttribute("data-mce-object")||b.getAttribute("data-ephox-embed-iri"))return a.selection.getContent()},m=function(a,c){return function(d){var e=d.html,g=a.find("#embed")[0],i=f.extend(b.htmlToData(c.settings.media_scripts,e),{source1:d.url});a.fromJSON(i),g&&(g.value(e),h.updateSize(a))}},n=function(a,b){var c,d,e=a.dom.select("img[data-mce-object]");for(c=0;c
=0;d--)b[c]===e[d]&&e.splice(d,1);a.selection.select(e[0])},o=function(a,b){var c=a.dom.select("img[data-mce-object]");a.insertContent(b),n(a,c),a.nodeChanged()},p=function(a,b){var e=a.toJSON();e.embed=c.updateHtml(e.embed,e),e.embed?o(b,e.embed):d.getEmbedHtml(b,e).then(function(a){o(b,a.html)})["catch"](j(b))},q=function(a,b){f.each(b,function(b,c){a.find("#"+c).value(b)})},r=function(a){var e,g,n=[{name:"source1",type:"filepicker",filetype:"media",size:40,autofocus:!0,label:"Source",onpaste:function(){setTimeout(function(){d.getEmbedHtml(a,e.toJSON()).then(m(e,a))["catch"](j(a))},1)},onchange:function(b){d.getEmbedHtml(a,e.toJSON()).then(m(e,a))["catch"](j(a)),q(e,b.meta)},onbeforecall:function(a){a.meta=e.toJSON()}}],o=[],r=function(a){a(e),g=e.toJSON(),e.find("#embed").value(c.updateHtml(g.embed,g))};if(a.settings.media_alt_source!==!1&&o.push({name:"source2",type:"filepicker",filetype:"media",size:40,label:"Alternative source"}),a.settings.media_poster!==!1&&o.push({name:"poster",type:"filepicker",filetype:"image",size:40,label:"Poster"}),a.settings.media_dimensions!==!1){var s=h.createUi(r);n.push(s)}g=k(a);var t={id:"mcemediasource",type:"textbox",flex:1,name:"embed",value:l(a),multiline:!0,rows:5,label:"Source"},u=function(){g=f.extend({},b.htmlToData(a.settings.media_scripts,this.value())),this.parent().parent().fromJSON(g)};t[i]=u,e=a.windowManager.open({title:"Insert/edit media",data:g,bodyType:"tabpanel",body:[{title:"General",type:"form",items:n},{title:"Embed",type:"container",layout:"flex",direction:"column",align:"stretch",padding:10,spacing:10,items:[{type:"label",text:"Paste your embed code below:",forId:"mcemediasource"},t]},{title:"Advanced",type:"form",items:o}],onSubmit:function(){h.updateSize(e),p(e,a)}}),h.syncSize(e)};return{showDialog:r}}),g("0",["1","2","3","4","5","6","7"],function(a,b,c,d,e,f,g){var h=function(b){b.on("ResolveName",function(a){var b;1===a.target.nodeType&&(b=a.target.getAttribute("data-mce-object"))&&(a.name=b)}),b.on("preInit",function(){var f=b.schema.getSpecialElements();c.each("video audio iframe object".split(" "),function(a){f[a]=new RegExp(""+a+"[^>]*>","gi")});var g=b.schema.getBoolAttrs();c.each("webkitallowfullscreen mozallowfullscreen allowfullscreen".split(" "),function(a){g[a]={}}),b.parser.addNodeFilter("iframe,video,audio,object,embed,script",d.placeHolderConverter(b)),b.serializer.addAttributeFilter("data-mce-object",function(c,d){for(var f,g,h,i,j,k,l,m,n=c.length;n--;)if(f=c[n],f.parent){for(l=f.attr(d),g=new a(l,1),"audio"!==l&&"script"!==l&&(m=f.attr("class"),m&&m.indexOf("mce-preview-object")!==-1?g.attr({width:f.firstChild.attr("width"),height:f.firstChild.attr("height")}):g.attr({width:f.attr("width"),height:f.attr("height")})),g.attr({style:f.attr("style")}),i=f.attributes,h=i.length;h--;){var o=i[h].name;0===o.indexOf("data-mce-p-")&&g.attr(o.substr(11),i[h].value)}"script"===l&&g.attr("type","text/javascript"),j=f.attr("data-mce-html"),j&&(k=new a("#text",3),k.raw=!0,k.value=e.sanitize(b,unescape(j)),g.append(k)),f.replace(g)}})}),b.on("click keyup",function(){var a=b.selection.getNode();a&&b.dom.hasClass(a,"mce-preview-object")&&b.dom.getAttrib(a,"data-mce-selected")&&a.setAttribute("data-mce-selected","2")}),b.on("ObjectSelected",function(a){var b=a.target.getAttribute("data-mce-object");"audio"!==b&&"script"!==b||a.preventDefault()}),b.on("objectResized",function(a){var b,c=a.target;c.getAttribute("data-mce-object")&&(b=c.getAttribute("data-mce-html"),b&&(b=unescape(b),c.setAttribute("data-mce-html",escape(f.updateHtml(b,{width:a.width,height:a.height})))))}),this.showDialog=function(){g.showDialog(b)},b.addButton("media",{tooltip:"Insert/edit media",onclick:this.showDialog,stateSelector:["img[data-mce-object]","span[data-mce-object]","div[data-ephox-embed-iri]"]}),b.addMenuItem("media",{icon:"media",text:"Media",onclick:this.showDialog,context:"insert",prependToContext:!0}),b.on("setContent",function(){b.$("span.mce-preview-object").each(function(a,c){var d=b.$(c);0===d.find("span.mce-shim",c).length&&d.append('
')})}),b.addCommand("mceMedia",this.showDialog)};return b.add("media",h),function(){}}),d("0")()}();