diff --git a/wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.min.js b/wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.min.js deleted file mode 100644 index 43bb7131a9..0000000000 --- a/wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.min.js +++ /dev/null @@ -1 +0,0 @@ -var tinymce=null,tinyMCEPopup,tinyMCE,wpImage;tinyMCEPopup={init:function(){var a,b=this;a=b.getWin(),tinymce=a.tinymce,tinyMCE=a.tinyMCE,b.editor=tinymce.EditorManager.activeEditor,b.params=b.editor.windowManager.params,b.features=b.editor.windowManager.features,b.dom=b.editor.windowManager.createInstance("tinymce.dom.DOMUtils",document),b.editor.windowManager.onOpen.dispatch(b.editor.windowManager,window)},getWin:function(){return!window.frameElement&&window.dialogArguments||opener||parent||top},getParam:function(a,b){return this.editor.getParam(a,b)},close:function(){function a(){b.editor.windowManager.close(window),tinymce=tinyMCE=b.editor=b.params=b.dom=b.dom.doc=null}var b=this;tinymce.isOpera?b.getWin().setTimeout(a,0):a()},execCommand:function(a,b,c,d){return d=d||{},d.skip_focus=1,this.restoreSelection(),this.editor.execCommand(a,b,c,d)},storeSelection:function(){this.editor.windowManager.bookmark=tinyMCEPopup.editor.selection.getBookmark(1)},restoreSelection:function(){var a=tinyMCEPopup;tinymce.isIE&&a.editor.selection.moveToBookmark(a.editor.windowManager.bookmark)}},tinyMCEPopup.init(),wpImage={preInit:function(){var a,b,c=tinyMCEPopup.editor,d=tinyMCEPopup.getWin(),e=d.document.styleSheets;for(b=0;bparseInt(d.preloadImg.width)&&(a=d.I("s130"),b=d.I("s120"),c=d.I("s110"),a.onclick=b.onclick=c.onclick=null,a.onmouseover=b.onmouseover=c.onmouseover=null,a.style.color=b.style.color=c.style.color="#aaa")},showSizeRem:function(){var a=this,b=a.I("img_demo"),c=document.forms[0];return b.width=Math.round(.5*c.width.value),b.height=Math.round(.5*c.height.value),a.showSizeClear(),a.I(a.current_size_sel).style.borderColor="#A3A3A3",a.I(a.current_size_sel).style.backgroundColor="#E5E5E5",!1},showSizeClear:function(){var a,b=this.I("img_size").getElementsByTagName("div");for(a=0;a/,"").replace(/<\/p>$/,""))),j.img_cap_text.value=n,j.img_title.value=k.dom.getAttrib(b,"title"),j.img_alt.value=k.dom.getAttrib(b,"alt"),j.border.value=k.dom.getAttrib(b,"border"),j.vspace.value=k.dom.getAttrib(b,"vspace"),j.hspace.value=k.dom.getAttrib(b,"hspace"),j.align.value=k.dom.getAttrib(b,"align"),j.width.value=i.width=k.dom.getAttrib(b,"width"),j.height.value=i.height=k.dom.getAttrib(b,"height"),j.img_classes.value=a,j.img_style.value=k.dom.getAttrib(b,"style"),m.getAttrib(b,"hspace")&&i.updateStyle("hspace"),m.getAttrib(b,"border")&&i.updateStyle("border"),m.getAttrib(b,"vspace")&&i.updateStyle("vspace"),(h=k.dom.getParent(b,"A"))&&(j.link_href.value=i.current=k.dom.getAttrib(h,"href"),j.link_title.value=k.dom.getAttrib(h,"title"),j.link_rel.value=i.link_rel=k.dom.getAttrib(h,"rel"),j.link_style.value=k.dom.getAttrib(h,"style"),i.target_value=k.dom.getAttrib(h,"target"),j.link_classes.value=k.dom.getAttrib(h,"class")),j.link_target.checked=i.target_value&&"_blank"==i.target_value?"checked":"",d=c.substring(c.lastIndexOf("/")),d=d.replace(/-[0-9]{2,4}x[0-9]{2,4}/,""),i.link=c.substring(0,c.lastIndexOf("/"))+d,-1!=a.indexOf("alignleft")?(i.I("alignleft").checked="checked",l.className=i.align="alignleft"):-1!=a.indexOf("aligncenter")?(i.I("aligncenter").checked="checked",l.className=i.align="aligncenter"):-1!=a.indexOf("alignright")?(i.I("alignright").checked="checked",l.className=i.align="alignright"):-1!=a.indexOf("alignnone")&&(i.I("alignnone").checked="checked",l.className=i.align="alignnone"),i.width&&i.preloadImg.width&&i.showSizeSet(),document.body.style.display="")},remove:function(){var a,b,c=tinyMCEPopup.editor;tinyMCEPopup.restoreSelection(),b=c.selection.getNode(),"IMG"==b.nodeName&&((a=c.dom.getParent(b,"div"))&&c.dom.hasClass(a,"mceTemp")?c.dom.remove(a):(a=c.dom.getParent(b,"A"))&&1==a.childNodes.length?c.dom.remove(a):c.dom.remove(b),c.execCommand("mceRepaint"),tinyMCEPopup.close())},update:function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q=this,r=document.forms[0],s=tinyMCEPopup.editor,t=null,u=r.img_classes.value,v="",w="";if(tinyMCEPopup.restoreSelection(),a=s.selection.getNode(),"IMG"==a.nodeName){if(""===r.img_src.value)return q.remove(),void 0;""!=r.img_cap_text.value&&""!=r.width.value&&(t=1,u=u.replace(/align[^ "']+\s?/gi,"")),e=s.dom.getParent(a,"a"),d=s.dom.getParent(a,"p"),c=s.dom.getParent(a,"dl"),f=s.dom.getParent(a,"div"),tinyMCEPopup.execCommand("mceBeginUndoLevel"),(r.width.value!=a.width||r.height.value!=a.height)&&(u=u.replace(/size-[^ "']+/,"")),s.dom.setAttribs(a,{src:r.img_src.value,title:r.img_title.value,alt:r.img_alt.value,width:r.width.value,height:r.height.value,style:r.img_style.value,"class":u}),r.link_href.value&&(null==e?(r.link_href.value.match(/https?:\/\//i)||(r.link_href.value=tinyMCEPopup.editor.documentBaseURI.toAbsolute(r.link_href.value)),s.getDoc().execCommand("unlink",!1,null),tinyMCEPopup.execCommand("mceInsertLink",!1,"#mce_temp_url#",{skip_undo:1}),tinymce.each(s.dom.select("a"),function(a){"#mce_temp_url#"==s.dom.getAttrib(a,"href")&&s.dom.setAttribs(a,{href:r.link_href.value,title:r.link_title.value,rel:r.link_rel.value,target:1==r.link_target.checked?"_blank":"","class":r.link_classes.value,style:r.link_style.value})})):s.dom.setAttribs(e,{href:r.link_href.value,title:r.link_title.value,rel:r.link_rel.value,target:1==r.link_target.checked?"_blank":"","class":r.link_classes.value,style:r.link_style.value})),t?(l=10+parseInt(r.width.value),m="aligncenter"==q.align?"mceTemp mceIEcenter":"mceTemp",p=r.img_cap_text.value,p=p.replace(/\r\n|\r/g,"\n").replace(/<[a-zA-Z0-9]+( [^<>]+)?>/g,function(a){return a.replace(/[\r\n\t]+/," ")}),p=p.replace(/\s*\n\s*/g,"
"),c?(s.dom.setAttribs(c,{"class":"wp-caption "+q.align,style:"width: "+l+"px;"}),f&&s.dom.setAttrib(f,"class",m),(j=s.dom.getParent(a,"dt"))&&(k=j.nextSibling)&&s.dom.hasClass(k,"wp-caption-dd")&&s.dom.setHTML(k,p)):((h=r.img_classes.value.match(/wp-image-([0-9]{1,6})/))&&h[1]&&(v="attachment_"+h[1]),r.link_href.value&&(w=s.dom.getParent(a,"a"))?1==w.childNodes.length?g=s.dom.getOuterHTML(w):(g=s.dom.getOuterHTML(w),g=g.match(/]+>/i),g=g+s.dom.getOuterHTML(a)+""):g=s.dom.getOuterHTML(a),g='
'+g+'
'+p+"
",i=s.dom.create("div",{"class":m},g),d?(d.parentNode.insertBefore(i,d),1==d.childNodes.length?s.dom.remove(d):w&&1==w.childNodes.length?s.dom.remove(w):s.dom.remove(a)):(n=s.dom.getParent(a,"TD,TH,LI"))&&(n.appendChild(i),w&&1==w.childNodes.length?s.dom.remove(w):s.dom.remove(a)))):c&&f&&(g=r.link_href.value&&(o=s.dom.getParent(a,"a"))?s.dom.getOuterHTML(o):s.dom.getOuterHTML(a),d=s.dom.create("p",{},g),f.parentNode.insertBefore(d,f),s.dom.remove(f)),-1!=r.img_classes.value.indexOf("aligncenter")?!d||d.style&&"center"==d.style.textAlign||s.dom.setStyle(d,"textAlign","center"):d&&d.style&&"center"==d.style.textAlign&&s.dom.setStyle(d,"textAlign",""),!r.link_href.value&&e&&(b=s.selection.getBookmark(),s.dom.remove(e,1),s.selection.moveToBookmark(b)),tinyMCEPopup.execCommand("mceEndUndoLevel"),s.execCommand("mceRepaint"),tinyMCEPopup.close()}},updateStyle:function(a){var b,c=tinyMCEPopup.dom,d=document.forms[0],e=c.create("img",{style:d.img_style.value});tinyMCEPopup.editor.settings.inline_styles&&("align"==a&&(c.setStyle(e,"float",""),c.setStyle(e,"vertical-align",""),b=d.align.value,b&&("left"==b||"right"==b?c.setStyle(e,"float",b):e.style.verticalAlign=b)),"border"==a&&(c.setStyle(e,"border",""),b=d.border.value,(b||"0"==b)&&(e.style.border="0"==b?"0":b+"px solid black")),"hspace"==a&&(c.setStyle(e,"marginLeft",""),c.setStyle(e,"marginRight",""),b=d.hspace.value,b&&(e.style.marginLeft=b+"px",e.style.marginRight=b+"px")),"vspace"==a&&(c.setStyle(e,"marginTop",""),c.setStyle(e,"marginBottom",""),b=d.vspace.value,b&&(e.style.marginTop=b+"px",e.style.marginBottom=b+"px")),d.img_style.value=c.serializeStyle(c.parseStyle(e.style.cssText)),this.demoSetStyle())},checkVal:function(a){""==a.value&&"img_src"==a.id&&(a.value=this.I("img_demo").src||this.preloadImg.src)},resetImageData:function(){var a=document.forms[0];a.width.value=a.height.value=""},updateImageData:function(){var a=document.forms[0],b=wpImage,c=a.width.value,d=a.height.value;!c&&d?c=a.width.value=b.width=Math.round(b.preloadImg.width/(b.preloadImg.height/d)):c&&!d&&(d=a.height.value=b.height=Math.round(b.preloadImg.height/(b.preloadImg.width/c))),c||(a.width.value=b.width=b.preloadImg.width),d||(a.height.value=b.height=b.preloadImg.height),b.showSizeSet(),b.demoSetSize(),a.img_style.value&&b.demoSetStyle()},getImageData:function(){var a=wpImage,b=document.forms[0];a.preloadImg=new Image,a.preloadImg.onload=a.updateImageData,a.preloadImg.onerror=a.resetImageData,a.preloadImg.src=tinyMCEPopup.editor.documentBaseURI.toAbsolute(b.img_src.value)}},window.onload=function(){wpImage.init()},wpImage.preInit(); \ 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 600163f068..483bf0ab0d 100644 Binary files a/wp-includes/js/tinymce/wp-tinymce.js.gz and b/wp-includes/js/tinymce/wp-tinymce.js.gz differ