1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/webtrees_ynh.git synced 2024-09-03 18:26:37 +02:00
webtrees_ynh/sources/packages/ckeditor-4.5.2-custom/plugins/image/dialogs/image.js

1 line
No EOL
20 KiB
JavaScript

(function(){var a=function(U,P){function j(){var e=arguments,d=this.getContentElement("advanced","txtdlgGenStyle");d&&d.commit.apply(d,e);this.foreach(function(f){f.commit&&"txtdlgGenStyle"!=f.id&&f.commit.apply(f,e)})}function Q(f){if(!i){i=1;var e=this.getDialog(),m=e.imageElement;if(m){this.commit(T,m);f=[].concat(f);for(var k=f.length,l,h=0;h<k;h++){(l=e.getContentElement.apply(e,f[h].split(":")))&&l.setup(T,m)}}i=0}}var T=1,O=/^\s*(\d+)((px)|\%)?\s*$/i,b=/(^\s*(\d+)((px)|\%)?\s*$)|^$/i,I=/^\d+px$/,M=function(){var e=this.getValue(),d=this.getDialog(),f=e.match(O);f&&("%"==f[2]&&N(d,!1),e=f[1]);d.lockRatio&&(f=d.originalElement,"true"==f.getCustomData("isReady")&&("txtHeight"==this.id?(e&&"0"!=e&&(e=Math.round(e/f.$.height*f.$.width)),isNaN(e)||d.setValueOf("info","txtWidth",e)):(e&&"0"!=e&&(e=Math.round(e/f.$.width*f.$.height)),isNaN(e)||d.setValueOf("info","txtHeight",e))));S(d)},S=function(d){if(!d.originalElement||!d.preview){return 1}d.commitContent(4,d.preview);return 0},i,N=function(h,f){if(!h.getContentElement("info","ratioLock")){return null}var n=h.originalElement;if(!n){return null}if("check"==f){if(!h.userlockRatio&&"true"==n.getCustomData("isReady")){var m=h.getValueOf("info","txtWidth"),l=h.getValueOf("info","txtHeight"),n=1000*n.$.width/n.$.height,k=1000*m/l;h.lockRatio=!1;m||l?!isNaN(n)&&!isNaN(k)&&Math.round(n)==Math.round(k)&&(h.lockRatio=!0):h.lockRatio=!0}}else{void 0!==f?h.lockRatio=f:(h.userlockRatio=1,h.lockRatio=!h.lockRatio)}m=CKEDITOR.document.getById(G);h.lockRatio?m.removeClass("cke_btn_unlocked"):m.addClass("cke_btn_unlocked");m.setAttribute("aria-checked",h.lockRatio);CKEDITOR.env.hc&&m.getChild(0).setHtml(h.lockRatio?CKEDITOR.env.ie?"\u25a0":"\u25a3":CKEDITOR.env.ie?"\u25a1":"\u25a2");return h.lockRatio},K=function(h,f){var n=h.originalElement;if("true"==n.getCustomData("isReady")){var m=h.getContentElement("info","txtWidth"),l=h.getContentElement("info","txtHeight"),k;f?n=k=0:(k=n.$.width,n=n.$.height);m&&m.setValue(k);l&&l.setValue(n)}S(h)},H=function(k,e){function q(f,d){var h=f.match(O);return h?("%"==h[2]&&(h[1]+="%",N(p,!1)),h[1]):d}if(k==T){var p=this.getDialog(),n="",m="txtWidth"==this.id?"width":"height",l=e.getAttribute(m);l&&(n=q(l,n));n=q(e.getStyle(m),n);this.setValue(n)}},g,y=function(){var e=this.originalElement,d=CKEDITOR.document.getById(L);e.setCustomData("isReady","true");e.removeListener("load",y);e.removeListener("error",R);e.removeListener("abort",R);d&&d.setStyle("display","none");this.dontResetSize||K(this,!1===U.config.image_prefillDimensions);this.firstLoad&&CKEDITOR.tools.setTimeout(function(){N(this,"check")},0,this);this.dontResetSize=this.firstLoad=!1;S(this)},R=function(){var e=this.originalElement,d=CKEDITOR.document.getById(L);e.removeListener("load",y);e.removeListener("error",R);e.removeListener("abort",R);e=CKEDITOR.getUrl(CKEDITOR.plugins.get("image").path+"images/noimage.png");this.preview&&this.preview.setAttribute("src",e);d&&d.setStyle("display","none");N(this,!1)},J=function(d){return CKEDITOR.tools.getNextId()+"_"+d},G=J("btnLockSizes"),c=J("btnResetSize"),L=J("ImagePreviewLoader"),o=J("previewLink"),F=J("previewImage");return{title:U.lang.image["image"==P?"title":"titleButton"],minWidth:420,minHeight:360,onShow:function(){this.linkEditMode=this.imageEditMode=this.linkElement=this.imageElement=!1;this.lockRatio=!0;this.userlockRatio=0;this.dontResetSize=!1;this.firstLoad=!0;this.addLink=!1;var f=this.getParentEditor(),e=f.getSelection(),k=(e=e&&e.getSelectedElement())&&f.elementPath(e).contains("a",1),h=CKEDITOR.document.getById(L);h&&h.setStyle("display","none");g=new CKEDITOR.dom.element("img",f.document);this.preview=CKEDITOR.document.getById(F);this.originalElement=f.document.createElement("img");this.originalElement.setAttribute("alt","");this.originalElement.setCustomData("isReady","false");k&&(this.linkElement=k,this.addLink=this.linkEditMode=!0,f=k.getChildren(),1==f.count()&&(h=f.getItem(0),h.type==CKEDITOR.NODE_ELEMENT&&(h.is("img")||h.is("input")))&&(this.imageElement=f.getItem(0),this.imageElement.is("img")?this.imageEditMode="img":this.imageElement.is("input")&&(this.imageEditMode="input")),"image"==P&&this.setupContent(2,k));if(this.customImageElement){this.imageEditMode="img",this.imageElement=this.customImageElement,delete this.customImageElement}else{if(e&&"img"==e.getName()&&!e.data("cke-realelement")||e&&"input"==e.getName()&&"image"==e.getAttribute("type")){this.imageEditMode=e.getName(),this.imageElement=e}}this.imageEditMode&&(this.cleanImageElement=this.imageElement,this.imageElement=this.cleanImageElement.clone(!0,!0),this.setupContent(T,this.imageElement));N(this,!0);CKEDITOR.tools.trim(this.getValueOf("info","txtUrl"))||(this.preview.removeAttribute("src"),this.preview.setStyle("display","none"))},onOk:function(){if(this.imageEditMode){var d=this.imageEditMode;"image"==P&&"input"==d&&confirm(U.lang.image.button2Img)?(this.imageElement=U.document.createElement("img"),this.imageElement.setAttribute("alt",""),U.insertElement(this.imageElement)):"image"!=P&&"img"==d&&confirm(U.lang.image.img2Button)?(this.imageElement=U.document.createElement("input"),this.imageElement.setAttributes({type:"image",alt:""}),U.insertElement(this.imageElement)):(this.imageElement=this.cleanImageElement,delete this.cleanImageElement)}else{"image"==P?this.imageElement=U.document.createElement("img"):(this.imageElement=U.document.createElement("input"),this.imageElement.setAttribute("type","image")),this.imageElement.setAttribute("alt","")}this.linkEditMode||(this.linkElement=U.document.createElement("a"));this.commitContent(T,this.imageElement);this.commitContent(2,this.linkElement);this.imageElement.getAttribute("style")||this.imageElement.removeAttribute("style");this.imageEditMode?!this.linkEditMode&&this.addLink?(U.insertElement(this.linkElement),this.imageElement.appendTo(this.linkElement)):this.linkEditMode&&!this.addLink&&(U.getSelection().selectElement(this.linkElement),U.insertElement(this.imageElement)):this.addLink?this.linkEditMode?this.linkElement.equals(U.getSelection().getSelectedElement())?(this.linkElement.setHtml(""),this.linkElement.append(this.imageElement,!1)):U.insertElement(this.imageElement):(U.insertElement(this.linkElement),this.linkElement.append(this.imageElement,!1)):U.insertElement(this.imageElement)},onLoad:function(){"image"!=P&&this.hidePage("Link");var d=this._.element.getDocument();this.getContentElement("info","ratioLock")&&(this.addFocusable(d.getById(c),5),this.addFocusable(d.getById(G),5));this.commitContent=j},onHide:function(){this.preview&&this.commitContent(8,this.preview);this.originalElement&&(this.originalElement.removeListener("load",y),this.originalElement.removeListener("error",R),this.originalElement.removeListener("abort",R),this.originalElement.remove(),this.originalElement=!1);delete this.imageElement},contents:[{id:"info",label:U.lang.image.infoTab,accessKey:"I",elements:[{type:"vbox",padding:0,children:[{type:"hbox",widths:["280px","110px"],align:"right",children:[{id:"txtUrl",type:"text",label:U.lang.common.url,required:!0,onChange:function(){var f=this.getDialog(),e=this.getValue();if(0<e.length){var f=this.getDialog(),k=f.originalElement;f.preview&&f.preview.removeStyle("display");k.setCustomData("isReady","false");var h=CKEDITOR.document.getById(L);h&&h.setStyle("display","");k.on("load",y,f);k.on("error",R,f);k.on("abort",R,f);k.setAttribute("src",e);f.preview&&(g.setAttribute("src",e),f.preview.setAttribute("src",g.$.src),S(f))}else{f.preview&&(f.preview.removeAttribute("src"),f.preview.setStyle("display","none"))}},setup:function(e,d){if(e==T){var f=d.data("cke-saved-src")||d.getAttribute("src");this.getDialog().dontResetSize=!0;this.setValue(f);this.setInitValue()}},commit:function(e,d){e==T&&(this.getValue()||this.isChanged())?(d.data("cke-saved-src",this.getValue()),d.setAttribute("src",this.getValue())):8==e&&(d.setAttribute("src",""),d.removeAttribute("src"))},validate:CKEDITOR.dialog.validate.notEmpty(U.lang.image.urlMissing)},{type:"button",id:"browse",style:"display:inline-block;margin-top:14px;",align:"center",label:U.lang.common.browseServer,hidden:!0,filebrowser:"info:txtUrl"}]}]},{id:"txtAlt",type:"text",label:U.lang.image.alt,accessKey:"T","default":"",onChange:function(){S(this.getDialog())},setup:function(e,d){e==T&&this.setValue(d.getAttribute("alt"))},commit:function(e,d){e==T?(this.getValue()||this.isChanged())&&d.setAttribute("alt",this.getValue()):4==e?d.setAttribute("alt",this.getValue()):8==e&&d.removeAttribute("alt")}},{type:"hbox",children:[{id:"basic",type:"vbox",children:[{type:"hbox",requiredContent:"img{width,height}",widths:["50%","50%"],children:[{type:"vbox",padding:1,children:[{type:"text",width:"45px",id:"txtWidth",label:U.lang.common.width,onKeyUp:M,onChange:function(){Q.call(this,"advanced:txtdlgGenStyle")},validate:function(){var d=this.getValue().match(b);(d=!(!d||0===parseInt(d[1],10)))||alert(U.lang.common.invalidWidth);return d},setup:H,commit:function(e,d){var f=this.getValue();e==T?(f&&U.activeFilter.check("img{width,height}")?d.setStyle("width",CKEDITOR.tools.cssLength(f)):d.removeStyle("width"),d.removeAttribute("width")):4==e?f.match(O)?d.setStyle("width",CKEDITOR.tools.cssLength(f)):(f=this.getDialog().originalElement,"true"==f.getCustomData("isReady")&&d.setStyle("width",f.$.width+"px")):8==e&&(d.removeAttribute("width"),d.removeStyle("width"))}},{type:"text",id:"txtHeight",width:"45px",label:U.lang.common.height,onKeyUp:M,onChange:function(){Q.call(this,"advanced:txtdlgGenStyle")},validate:function(){var d=this.getValue().match(b);(d=!(!d||0===parseInt(d[1],10)))||alert(U.lang.common.invalidHeight);return d},setup:H,commit:function(e,d){var f=this.getValue();e==T?(f&&U.activeFilter.check("img{width,height}")?d.setStyle("height",CKEDITOR.tools.cssLength(f)):d.removeStyle("height"),d.removeAttribute("height")):4==e?f.match(O)?d.setStyle("height",CKEDITOR.tools.cssLength(f)):(f=this.getDialog().originalElement,"true"==f.getCustomData("isReady")&&d.setStyle("height",f.$.height+"px")):8==e&&(d.removeAttribute("height"),d.removeStyle("height"))}}]},{id:"ratioLock",type:"html",style:"margin-top:30px;width:40px;height:40px;",onLoad:function(){var e=CKEDITOR.document.getById(c),d=CKEDITOR.document.getById(G);e&&(e.on("click",function(f){K(this);f.data&&f.data.preventDefault()},this.getDialog()),e.on("mouseover",function(){this.addClass("cke_btn_over")},e),e.on("mouseout",function(){this.removeClass("cke_btn_over")},e));d&&(d.on("click",function(h){N(this);var f=this.originalElement,k=this.getValueOf("info","txtWidth");"true"==f.getCustomData("isReady")&&k&&(f=f.$.height/f.$.width*k,isNaN(f)||(this.setValueOf("info","txtHeight",Math.round(f)),S(this)));h.data&&h.data.preventDefault()},this.getDialog()),d.on("mouseover",function(){this.addClass("cke_btn_over")},d),d.on("mouseout",function(){this.removeClass("cke_btn_over")},d))},html:'<div><a href="javascript:void(0)" tabindex="-1" title="'+U.lang.image.lockRatio+'" class="cke_btn_locked" id="'+G+'" role="checkbox"><span class="cke_icon"></span><span class="cke_label">'+U.lang.image.lockRatio+'</span></a><a href="javascript:void(0)" tabindex="-1" title="'+U.lang.image.resetSize+'" class="cke_btn_reset" id="'+c+'" role="button"><span class="cke_label">'+U.lang.image.resetSize+"</span></a></div>"}]},{type:"vbox",padding:1,children:[{type:"text",id:"txtBorder",requiredContent:"img{border-width}",width:"60px",label:U.lang.image.border,"default":"",onKeyUp:function(){S(this.getDialog())},onChange:function(){Q.call(this,"advanced:txtdlgGenStyle")},validate:CKEDITOR.dialog.validate.integer(U.lang.image.validateBorder),setup:function(e,d){if(e==T){var f;f=(f=(f=d.getStyle("border-width"))&&f.match(/^(\d+px)(?: \1 \1 \1)?$/))&&parseInt(f[1],10);isNaN(parseInt(f,10))&&(f=d.getAttribute("border"));this.setValue(f)}},commit:function(e,d){var f=parseInt(this.getValue(),10);e==T||4==e?(isNaN(f)?!f&&this.isChanged()&&d.removeStyle("border"):(d.setStyle("border-width",CKEDITOR.tools.cssLength(f)),d.setStyle("border-style","solid")),e==T&&d.removeAttribute("border")):8==e&&(d.removeAttribute("border"),d.removeStyle("border-width"),d.removeStyle("border-style"),d.removeStyle("border-color"))}},{type:"text",id:"txtHSpace",requiredContent:"img{margin-left,margin-right}",width:"60px",label:U.lang.image.hSpace,"default":"",onKeyUp:function(){S(this.getDialog())},onChange:function(){Q.call(this,"advanced:txtdlgGenStyle")},validate:CKEDITOR.dialog.validate.integer(U.lang.image.validateHSpace),setup:function(f,e){if(f==T){var k,h;k=e.getStyle("margin-left");h=e.getStyle("margin-right");k=k&&k.match(I);h=h&&h.match(I);k=parseInt(k,10);h=parseInt(h,10);k=k==h&&k;isNaN(parseInt(k,10))&&(k=e.getAttribute("hspace"));this.setValue(k)}},commit:function(e,d){var f=parseInt(this.getValue(),10);e==T||4==e?(isNaN(f)?!f&&this.isChanged()&&(d.removeStyle("margin-left"),d.removeStyle("margin-right")):(d.setStyle("margin-left",CKEDITOR.tools.cssLength(f)),d.setStyle("margin-right",CKEDITOR.tools.cssLength(f))),e==T&&d.removeAttribute("hspace")):8==e&&(d.removeAttribute("hspace"),d.removeStyle("margin-left"),d.removeStyle("margin-right"))}},{type:"text",id:"txtVSpace",requiredContent:"img{margin-top,margin-bottom}",width:"60px",label:U.lang.image.vSpace,"default":"",onKeyUp:function(){S(this.getDialog())},onChange:function(){Q.call(this,"advanced:txtdlgGenStyle")},validate:CKEDITOR.dialog.validate.integer(U.lang.image.validateVSpace),setup:function(f,e){if(f==T){var k,h;k=e.getStyle("margin-top");h=e.getStyle("margin-bottom");k=k&&k.match(I);h=h&&h.match(I);k=parseInt(k,10);h=parseInt(h,10);k=k==h&&k;isNaN(parseInt(k,10))&&(k=e.getAttribute("vspace"));this.setValue(k)}},commit:function(e,d){var f=parseInt(this.getValue(),10);e==T||4==e?(isNaN(f)?!f&&this.isChanged()&&(d.removeStyle("margin-top"),d.removeStyle("margin-bottom")):(d.setStyle("margin-top",CKEDITOR.tools.cssLength(f)),d.setStyle("margin-bottom",CKEDITOR.tools.cssLength(f))),e==T&&d.removeAttribute("vspace")):8==e&&(d.removeAttribute("vspace"),d.removeStyle("margin-top"),d.removeStyle("margin-bottom"))}},{id:"cmbAlign",requiredContent:"img{float}",type:"select",widths:["35%","65%"],style:"width:90px",label:U.lang.common.align,"default":"",items:[[U.lang.common.notSet,""],[U.lang.common.alignLeft,"left"],[U.lang.common.alignRight,"right"]],onChange:function(){S(this.getDialog());Q.call(this,"advanced:txtdlgGenStyle")},setup:function(e,d){if(e==T){var f=d.getStyle("float");switch(f){case"inherit":case"none":f=""}!f&&(f=(d.getAttribute("align")||"").toLowerCase());this.setValue(f)}},commit:function(e,d){var f=this.getValue();if(e==T||4==e){if(f?d.setStyle("float",f):d.removeStyle("float"),e==T){switch(f=(d.getAttribute("align")||"").toLowerCase(),f){case"left":case"right":d.removeAttribute("align")}}}else{8==e&&d.removeStyle("float")}}}]}]},{type:"vbox",height:"250px",children:[{type:"html",id:"htmlPreview",style:"width:95%;",html:"<div>"+CKEDITOR.tools.htmlEncode(U.lang.common.preview)+'<br><div id="'+L+'" class="ImagePreviewLoader" style="display:none"><div class="loading">&nbsp;</div></div><div class="ImagePreviewBox"><table><tr><td><a href="javascript:void(0)" target="_blank" onclick="return false;" id="'+o+'"><img id="'+F+'" alt="" /></a>'+(U.config.image_previewText||"Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas feugiat consequat diam. Maecenas metus. Vivamus diam purus, cursus a, commodo non, facilisis vitae, nulla. Aenean dictum lacinia tortor. Nunc iaculis, nibh non iaculis aliquam, orci felis euismod neque, sed ornare massa mauris sed velit. Nulla pretium mi et risus. Fusce mi pede, tempor id, cursus ac, ullamcorper nec, enim. Sed tortor. Curabitur molestie. Duis velit augue, condimentum at, ultrices a, luctus ut, orci. Donec pellentesque egestas eros. Integer cursus, augue in cursus faucibus, eros pede bibendum sem, in tempus tellus justo quis ligula. Etiam eget tortor. Vestibulum rutrum, est ut placerat elementum, lectus nisl aliquam velit, tempor aliquam eros nunc nonummy metus. In eros metus, gravida a, gravida sed, lobortis id, turpis. Ut ultrices, ipsum at venenatis fringilla, sem nulla lacinia tellus, eget aliquet turpis mauris non enim. Nam turpis. Suspendisse lacinia. Curabitur ac tortor ut ipsum egestas elementum. Nunc imperdiet gravida mauris.")+"</td></tr></table></div></div>"}]}]}]},{id:"Link",requiredContent:"a[href]",label:U.lang.image.linkTab,padding:0,elements:[{id:"txtUrl",type:"text",label:U.lang.common.url,style:"width: 100%","default":"",setup:function(e,d){if(2==e){var f=d.data("cke-saved-href");f||(f=d.getAttribute("href"));this.setValue(f)}},commit:function(e,d){if(2==e&&(this.getValue()||this.isChanged())){var f=this.getValue();d.data("cke-saved-href",f);d.setAttribute("href",f);this.getValue()||!U.config.image_removeLinkByEmptyURL?this.getDialog().addLink=!0:this.getDialog().addLink=!1}}},{type:"button",id:"browse",filebrowser:{action:"Browse",target:"Link:txtUrl",url:U.config.filebrowserImageBrowseLinkUrl},style:"float:right",hidden:!0,label:U.lang.common.browseServer},{id:"cmbTarget",type:"select",requiredContent:"a[target]",label:U.lang.common.target,"default":"",items:[[U.lang.common.notSet,""],[U.lang.common.targetNew,"_blank"],[U.lang.common.targetTop,"_top"],[U.lang.common.targetSelf,"_self"],[U.lang.common.targetParent,"_parent"]],setup:function(e,d){2==e&&this.setValue(d.getAttribute("target")||"")},commit:function(e,d){2==e&&(this.getValue()||this.isChanged())&&d.setAttribute("target",this.getValue())}}]},{id:"Upload",hidden:!0,filebrowser:"uploadButton",label:U.lang.image.upload,elements:[{type:"file",id:"upload",label:U.lang.image.btnUpload,style:"height:40px",size:38},{type:"fileButton",id:"uploadButton",filebrowser:"info:txtUrl",label:U.lang.image.btnUpload,"for":["Upload","upload"]}]},{id:"advanced",label:U.lang.common.advancedTab,elements:[{type:"hbox",widths:["50%","25%","25%"],children:[{type:"text",id:"linkId",requiredContent:"img[id]",label:U.lang.common.id,setup:function(e,d){e==T&&this.setValue(d.getAttribute("id"))},commit:function(e,d){e==T&&(this.getValue()||this.isChanged())&&d.setAttribute("id",this.getValue())}},{id:"cmbLangDir",type:"select",requiredContent:"img[dir]",style:"width : 100px;",label:U.lang.common.langDir,"default":"",items:[[U.lang.common.notSet,""],[U.lang.common.langDirLtr,"ltr"],[U.lang.common.langDirRtl,"rtl"]],setup:function(e,d){e==T&&this.setValue(d.getAttribute("dir"))},commit:function(e,d){e==T&&(this.getValue()||this.isChanged())&&d.setAttribute("dir",this.getValue())}},{type:"text",id:"txtLangCode",requiredContent:"img[lang]",label:U.lang.common.langCode,"default":"",setup:function(e,d){e==T&&this.setValue(d.getAttribute("lang"))},commit:function(e,d){e==T&&(this.getValue()||this.isChanged())&&d.setAttribute("lang",this.getValue())}}]},{type:"text",id:"txtGenLongDescr",requiredContent:"img[longdesc]",label:U.lang.common.longDescr,setup:function(e,d){e==T&&this.setValue(d.getAttribute("longDesc"))},commit:function(e,d){e==T&&(this.getValue()||this.isChanged())&&d.setAttribute("longDesc",this.getValue())}},{type:"hbox",widths:["50%","50%"],children:[{type:"text",id:"txtGenClass",requiredContent:"img(cke-xyz)",label:U.lang.common.cssClass,"default":"",setup:function(e,d){e==T&&this.setValue(d.getAttribute("class"))},commit:function(e,d){e==T&&(this.getValue()||this.isChanged())&&d.setAttribute("class",this.getValue())}},{type:"text",id:"txtGenTitle",requiredContent:"img[title]",label:U.lang.common.advisoryTitle,"default":"",onChange:function(){S(this.getDialog())},setup:function(e,d){e==T&&this.setValue(d.getAttribute("title"))},commit:function(e,d){e==T?(this.getValue()||this.isChanged())&&d.setAttribute("title",this.getValue()):4==e?d.setAttribute("title",this.getValue()):8==e&&d.removeAttribute("title")}}]},{type:"text",id:"txtdlgGenStyle",requiredContent:"img{cke-xyz}",label:U.lang.common.cssStyle,validate:CKEDITOR.dialog.validate.inlineStyle(U.lang.common.invalidInlineStyle),"default":"",setup:function(f,e){if(f==T){var k=e.getAttribute("style");!k&&e.$.style.cssText&&(k=e.$.style.cssText);this.setValue(k);var h=e.$.style.height,k=e.$.style.width,h=(h?h:"").match(O),k=(k?k:"").match(O);this.attributesInStyle={height:!!h,width:!!k}}},onChange:function(){Q.call(this,"info:cmbFloat info:cmbAlign info:txtVSpace info:txtHSpace info:txtBorder info:txtWidth info:txtHeight".split(" "));S(this)},commit:function(e,d){e==T&&(this.getValue()||this.isChanged())&&d.setAttribute("style",this.getValue())}}]}]}};CKEDITOR.dialog.add("image",function(b){return a(b,"image")});CKEDITOR.dialog.add("imagebutton",function(b){return a(b,"imagebutton")})})();