esp-ckeditor 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
@@ -71,8 +71,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
|
|
71
71
|
};
|
72
72
|
if ( mode == 'onResetSize' ) {
|
73
73
|
var link = dialog.getValueOf( 'info', 'txtUrl' );
|
74
|
-
if ( link.search( /\/[0-9]+-[0-9]
|
75
|
-
link = link.replace( /\/[0-9]+-[0-9]
|
74
|
+
if ( link.search( /\/[0-9]+-[0-9]+\// ) != -1 ) {
|
75
|
+
link = link.replace( /\/[0-9]+-[0-9]+\//, '/' );
|
76
76
|
} else {
|
77
77
|
return false;
|
78
78
|
};
|
@@ -1 +1 @@
|
|
1
|
-
(function(){var a=function(f,i){var e=1,n=2,o=4,C=8,r=/^\s*(\d+)((px)|\%)?\s*$/i,B=/(^\s*(\d+)((px)|\%)?\s*$)|^$/i,m=/^\d+px$/;var z=function(){var F=this.getValue(),E=this.getDialog(),D=F.match(r);if(D){if(D[2]=="%"){w(E,false)}F=D[1]}if(E.lockRatio){var G=E.originalElement;if(G.getCustomData("isReady")=="true"){if(this.id=="txtHeight"){if(F&&F!="0"){F=Math.round(G.$.width*(F/G.$.height))}if(!isNaN(F)){E.setValueOf("info","txtWidth",F)}}else{if(F&&F!="0"){F=Math.round(G.$.height*(F/G.$.width))}if(!isNaN(F)){E.setValueOf("info","txtHeight",F)}}}}t(E)};var j=function(I,G){if(G=="onOk"){var E=I.getValueOf("info","txtWidth");var K=I.getValueOf("info","txtHeight");var L="/"+E+"-"+K+"/";var J=I.getValueOf("info","txtUrl");if(J.search(/\/[0-9]+-[0-9]+\//)!=-1){J=J.replace(/\/[0-9]+-[0-9]+\//,L)}else{var F=J.search(/\/[0-9]+\//);var D=J.match(/\/[0-9]+\//);var H=J.substring(F+D[0].length);var J=J.substring(0,F)+D+L.substring(1)+H}}if(G=="onResetSize"){var J=I.getValueOf("info","txtUrl");if(J.search(/\/[0-9]+-[0-9]+/)!=-1){J=J.replace(/\/[0-9]+-[0-9]+/,"")}else{return false}}I.setValueOf("info","txtUrl",J)};var t=function(D){if(!D.originalElement||!D.preview){return 1}D.commitContent(o,D.preview);return 0};function v(){var E=arguments;var D=this.getContentElement("advanced","txtdlgGenStyle");D&&D.commit.apply(D,E);this.foreach(function(F){if(F.commit&&F.id!="txtdlgGenStyle"){F.commit.apply(F,E)}})}var q;function A(D){if(q){return}q=1;var G=this.getDialog(),F=G.imageElement;if(F){this.commit(e,F);D=[].concat(D);var H=D.length,I;for(var E=0;E<H;E++){I=G.getContentElement.apply(G,D[E].split(":"));I&&I.setup(e,F)}}q=0}var w=function(I,K){if(!I.getContentElement("info","ratioLock")){return null}var G=I.originalElement;if(!G){return null}if(K=="check"){if(!I.userlockRatio&&G.getCustomData("isReady")=="true"){var E=I.getValueOf("info","txtWidth"),L=I.getValueOf("info","txtHeight"),H=G.$.width*1000/G.$.height,D=E*1000/L;I.lockRatio=false;if(!E&&!L){I.lockRatio=true}else{if(!isNaN(H)&&!isNaN(D)){if(Math.round(H)==Math.round(D)){I.lockRatio=true}}}}}else{if(K!=undefined){I.lockRatio=K}else{I.userlockRatio=1;I.lockRatio=!I.lockRatio}}var F=CKEDITOR.document.getById(l);if(I.lockRatio){F.removeClass("cke_btn_unlocked")}else{F.addClass("cke_btn_unlocked")}F.setAttribute("aria-checked",I.lockRatio);if(CKEDITOR.env.hc){var J=F.getChild(0);J.setHtml(I.lockRatio?CKEDITOR.env.ie?"\u25A0":"\u25A3":CKEDITOR.env.ie?"\u25A1":"\u25A2")}return I.lockRatio};var k=function(D){j(D,"onResetSize");var G=D.originalElement;if(G.getCustomData("isReady")=="true"){var F=D.getContentElement("info","txtWidth"),E=D.getContentElement("info","txtHeight");F&&F.setValue(G.$.width);E&&E.setValue(G.$.height)}t(D)};var p=function(G,F){if(G!=e){return}function J(M,K){var L=M.match(r);if(L){if(L[2]=="%"){L[1]+="%";w(E,false)}return L[1]}return K}var E=this.getDialog(),H="",I=this.id=="txtWidth"?"width":"height",D=F.getAttribute(I);if(D){H=J(D,H)}H=J(F.getStyle(I),H);this.setValue(H)};var c;var y=function(){var D=this.originalElement;D.setCustomData("isReady","true");D.removeListener("load",y);D.removeListener("error",h);D.removeListener("abort",h);CKEDITOR.document.getById(u).setStyle("display","none");if(!this.dontResetSize){k(this)}if(this.firstLoad){CKEDITOR.tools.setTimeout(function(){w(this,"check")},0,this)}this.firstLoad=false;this.dontResetSize=false};var h=function(){var E=this.originalElement;E.removeListener("load",y);E.removeListener("error",h);E.removeListener("abort",h);var D=CKEDITOR.getUrl(f.skinPath+"images/noimage.png");if(this.preview){this.preview.setAttribute("src",D)}CKEDITOR.document.getById(u).setStyle("display","none");w(this,false)};var x=function(D){return CKEDITOR.tools.getNextId()+"_"+D},l=x("btnLockSizes"),s=x("btnResetSize"),u=x("ImagePreviewLoader"),b=x("ImagePreviewBox"),d=x("previewLink"),g=x("previewImage");return{title:f.lang.image[i=="image"?"title":"titleButton"],minWidth:420,minHeight:360,onShow:function(){this.imageElement=false;this.linkElement=false;this.imageEditMode=false;this.linkEditMode=false;this.lockRatio=true;this.userlockRatio=0;this.dontResetSize=false;this.firstLoad=true;this.addLink=false;var G=this.getParentEditor(),I=this.getParentEditor().getSelection(),F=I.getSelectedElement(),H=F&&F.getAscendant("a");CKEDITOR.document.getById(u).setStyle("display","none");c=new CKEDITOR.dom.element("img",G.document);this.preview=CKEDITOR.document.getById(g);this.originalElement=G.document.createElement("img");this.originalElement.setAttribute("alt","");this.originalElement.setCustomData("isReady","false");if(H){this.linkElement=H;this.linkEditMode=true;var E=H.getChildren();if(E.count()==1){var D=E.getItem(0).getName();if(D=="img"||D=="input"){this.imageElement=E.getItem(0);if(this.imageElement.getName()=="img"){this.imageEditMode="img"}else{if(this.imageElement.getName()=="input"){this.imageEditMode="input"}}}}if(i=="image"){this.setupContent(n,H)}}if(F&&F.getName()=="img"&&!F.data("cke-realelement")||F&&F.getName()=="input"&&F.getAttribute("type")=="image"){this.imageEditMode=F.getName();this.imageElement=F}if(this.imageEditMode){this.cleanImageElement=this.imageElement;this.imageElement=this.cleanImageElement.clone(true,true);this.setupContent(e,this.imageElement)}else{this.imageElement=G.document.createElement("img")}w(this,true);if(!CKEDITOR.tools.trim(this.getValueOf("info","txtUrl"))){this.preview.removeAttribute("src");this.preview.setStyle("display","none")}},onOk:function(){j(this,"onOk");if(this.imageEditMode){var D=this.imageEditMode;if(i=="image"&&D=="input"&&confirm(f.lang.image.button2Img)){D="img";this.imageElement=f.document.createElement("img");this.imageElement.setAttribute("alt","");f.insertElement(this.imageElement)}else{if(i!="image"&&D=="img"&&confirm(f.lang.image.img2Button)){D="input";this.imageElement=f.document.createElement("input");this.imageElement.setAttributes({type:"image",alt:""});f.insertElement(this.imageElement)}else{this.imageElement=this.cleanImageElement;delete this.cleanImageElement}}}else{if(i=="image"){this.imageElement=f.document.createElement("img")}else{this.imageElement=f.document.createElement("input");this.imageElement.setAttribute("type","image")}this.imageElement.setAttribute("alt","")}if(!this.linkEditMode){this.linkElement=f.document.createElement("a")}this.commitContent(e,this.imageElement);this.commitContent(n,this.linkElement);if(!this.imageElement.getAttribute("style")){this.imageElement.removeAttribute("style")}if(!this.imageEditMode){if(this.addLink){if(!this.linkEditMode){f.insertElement(this.linkElement);this.linkElement.append(this.imageElement,false)}else{f.insertElement(this.imageElement)}}else{f.insertElement(this.imageElement)}}else{if(!this.linkEditMode&&this.addLink){f.insertElement(this.linkElement);this.imageElement.appendTo(this.linkElement)}else{if(this.linkEditMode&&!this.addLink){f.getSelection().selectElement(this.linkElement);f.insertElement(this.imageElement)}}}},onLoad:function(){if(i!="image"){this.hidePage("Link")}var D=this._.element.getDocument();if(this.getContentElement("info","ratioLock")){this.addFocusable(D.getById(s),5);this.addFocusable(D.getById(l),5)}this.commitContent=v},onHide:function(){if(this.preview){this.commitContent(C,this.preview)}if(this.originalElement){this.originalElement.removeListener("load",y);this.originalElement.removeListener("error",h);this.originalElement.removeListener("abort",h);this.originalElement.remove();this.originalElement=false}delete this.imageElement},contents:[{id:"info",label:f.lang.image.infoTab,accessKey:"I",elements:[{type:"vbox",padding:0,children:[{type:"hbox",widths:["320px","80px"],align:"right",children:[{id:"txtUrl",type:"text",label:f.lang.common.url,required:true,onLoad:function(){this.getInputElement().setAttribute("readonly","readonly")},onChange:function(){var F=this.getDialog(),G=this.getValue();if(G.length>0){F=this.getDialog();var E=F.originalElement;F.preview.removeStyle("display");E.setCustomData("isReady","false");var D=CKEDITOR.document.getById(u);if(D){D.setStyle("display","")}E.on("load",y,F);E.on("error",h,F);E.on("abort",h,F);E.setAttribute("src",G);c.setAttribute("src",G);F.preview.setAttribute("src",c.$.src);t(F)}else{if(F.preview){F.preview.removeAttribute("src");F.preview.setStyle("display","none")}}},setup:function(F,E){if(F==e){var D=E.data("cke-saved-src")||E.getAttribute("src");var G=this;this.getDialog().dontResetSize=true;G.setValue(D);G.setInitValue()}},commit:function(E,D){if(E==e&&(this.getValue()||this.isChanged())){D.data("cke-saved-src",this.getValue());D.setAttribute("src",this.getValue())}else{if(E==C){D.setAttribute("src","");D.removeAttribute("src")}}},validate:CKEDITOR.dialog.validate.notEmpty(f.lang.image.urlMissing)},{type:"button",id:"browse",style:"display:inline-block;margin-top:10px;",align:"center",label:f.lang.esp_image.browseServer,hidden:true,filebrowser:{action:"Browse",target:"info:txtUrl",url:f.config.filebrowserImageBrowseUrl}}]}]},{id:"txtAlt",type:"text",label:f.lang.image.alt,accessKey:"T","default":"",onChange:function(){t(this.getDialog())},setup:function(E,D){if(E==e){this.setValue(D.getAttribute("alt"))}},commit:function(E,D){if(E==e){if(this.getValue()||this.isChanged()){D.setAttribute("alt",this.getValue())}}else{if(E==o){D.setAttribute("alt",this.getValue())}else{if(E==C){D.removeAttribute("alt")}}}}},{type:"hbox",children:[{id:"basic",type:"vbox",children:[{type:"hbox",widths:["50%","50%"],children:[{type:"vbox",padding:1,children:[{type:"text",width:"40px",id:"txtWidth",label:f.lang.common.width,onKeyUp:z,onChange:function(){A.call(this,"advanced:txtdlgGenStyle")},validate:function(){var D=this.getValue().match(B),E=!!(D&&parseInt(D[1],10)!==0);if(!E){alert(f.lang.common.invalidWidth)}return E},setup:p,commit:function(G,F,E){var H=this.getValue();if(G==e){if(H){F.setStyle("width",CKEDITOR.tools.cssLength(H))}else{F.removeStyle("width")}!E&&F.removeAttribute("width")}else{if(G==o){var D=H.match(r);if(!D){var I=this.getDialog().originalElement;if(I.getCustomData("isReady")=="true"){F.setStyle("width",I.$.width+"px")}}else{F.setStyle("width",CKEDITOR.tools.cssLength(H))}}else{if(G==C){F.removeAttribute("width");F.removeStyle("width")}}}}},{type:"text",id:"txtHeight",width:"40px",label:f.lang.common.height,onKeyUp:z,onChange:function(){A.call(this,"advanced:txtdlgGenStyle")},validate:function(){var D=this.getValue().match(B),E=!!(D&&parseInt(D[1],10)!==0);if(!E){alert(f.lang.common.invalidHeight)}return E},setup:p,commit:function(G,F,E){var H=this.getValue();if(G==e){if(H){F.setStyle("height",CKEDITOR.tools.cssLength(H))}else{F.removeStyle("height")}!E&&F.removeAttribute("height")}else{if(G==o){var D=H.match(r);if(!D){var I=this.getDialog().originalElement;if(I.getCustomData("isReady")=="true"){F.setStyle("height",I.$.height+"px")}}else{F.setStyle("height",CKEDITOR.tools.cssLength(H))}}else{if(G==C){F.removeAttribute("height");F.removeStyle("height")}}}}}]},{id:"ratioLock",type:"html",style:"margin-top:30px;width:40px;height:40px;",onLoad:function(){var D=CKEDITOR.document.getById(s),E=CKEDITOR.document.getById(l);if(D){D.on("click",function(F){k(this);F.data&&F.data.preventDefault()},this.getDialog());D.on("mouseover",function(){this.addClass("cke_btn_over")},D);D.on("mouseout",function(){this.removeClass("cke_btn_over")},D)}if(E){E.on("click",function(G){var H=w(this),J=this.originalElement,I=this.getValueOf("info","txtWidth");if(J.getCustomData("isReady")=="true"&&I){var F=J.$.height/J.$.width*I;if(!isNaN(F)){this.setValueOf("info","txtHeight",Math.round(F));t(this)}}G.data&&G.data.preventDefault()},this.getDialog());E.on("mouseover",function(){this.addClass("cke_btn_over")},E);E.on("mouseout",function(){this.removeClass("cke_btn_over")},E)}},html:'<div><a href="javascript:void(0)" tabindex="-1" title="'+f.lang.image.lockRatio+'" class="cke_btn_locked" id="'+l+'" role="checkbox"><span class="cke_icon"></span><span class="cke_label">'+f.lang.image.lockRatio+'</span></a><a href="javascript:void(0)" tabindex="-1" title="'+f.lang.image.resetSize+'" class="cke_btn_reset" id="'+s+'" role="button"><span class="cke_label">'+f.lang.image.resetSize+"</span></a></div>"}]},{type:"vbox",padding:1,children:[{type:"text",id:"txtBorder",width:"60px",label:f.lang.image.border,"default":"",onKeyUp:function(){t(this.getDialog())},onChange:function(){A.call(this,"advanced:txtdlgGenStyle")},validate:CKEDITOR.dialog.validate.integer(f.lang.image.validateBorder),setup:function(F,E){if(F==e){var G,D=E.getStyle("border-width");D=D&&D.match(/^(\d+px)(?: \1 \1 \1)?$/);G=D&&parseInt(D[1],10);isNaN(parseInt(G,10))&&(G=E.getAttribute("border"));this.setValue(G)}},commit:function(F,E,D){var G=parseInt(this.getValue(),10);if(F==e||F==o){if(!isNaN(G)){E.setStyle("border-width",CKEDITOR.tools.cssLength(G));E.setStyle("border-style","solid")}else{if(!G&&this.isChanged()){E.removeStyle("border-width");E.removeStyle("border-style");E.removeStyle("border-color")}}if(!D&&F==e){E.removeAttribute("border")}}else{if(F==C){E.removeAttribute("border");E.removeStyle("border-width");E.removeStyle("border-style");E.removeStyle("border-color")}}}},{type:"text",id:"txtHSpace",width:"60px",label:f.lang.image.hSpace,"default":"",onKeyUp:function(){t(this.getDialog())},onChange:function(){A.call(this,"advanced:txtdlgGenStyle")},validate:CKEDITOR.dialog.validate.integer(f.lang.image.validateHSpace),setup:function(F,E){if(F==e){var H,G,J,D=E.getStyle("margin-left"),I=E.getStyle("margin-right");D=D&&D.match(m);I=I&&I.match(m);G=parseInt(D,10);J=parseInt(I,10);H=(G==J)&&G;isNaN(parseInt(H,10))&&(H=E.getAttribute("hspace"));this.setValue(H)}},commit:function(F,E,D){var G=parseInt(this.getValue(),10);if(F==e||F==o){if(!isNaN(G)){E.setStyle("margin-left",CKEDITOR.tools.cssLength(G));E.setStyle("margin-right",CKEDITOR.tools.cssLength(G))}else{if(!G&&this.isChanged()){E.removeStyle("margin-left");E.removeStyle("margin-right")}}if(!D&&F==e){E.removeAttribute("hspace")}}else{if(F==C){E.removeAttribute("hspace");E.removeStyle("margin-left");E.removeStyle("margin-right")}}}},{type:"text",id:"txtVSpace",width:"60px",label:f.lang.image.vSpace,"default":"",onKeyUp:function(){t(this.getDialog())},onChange:function(){A.call(this,"advanced:txtdlgGenStyle")},validate:CKEDITOR.dialog.validate.integer(f.lang.image.validateVSpace),setup:function(I,H){if(I==e){var J,D,F,E=H.getStyle("margin-top"),G=H.getStyle("margin-bottom");E=E&&E.match(m);G=G&&G.match(m);D=parseInt(E,10);F=parseInt(G,10);J=(D==F)&&D;isNaN(parseInt(J,10))&&(J=H.getAttribute("vspace"));this.setValue(J)}},commit:function(F,E,D){var G=parseInt(this.getValue(),10);if(F==e||F==o){if(!isNaN(G)){E.setStyle("margin-top",CKEDITOR.tools.cssLength(G));E.setStyle("margin-bottom",CKEDITOR.tools.cssLength(G))}else{if(!G&&this.isChanged()){E.removeStyle("margin-top");E.removeStyle("margin-bottom")}}if(!D&&F==e){E.removeAttribute("vspace")}}else{if(F==C){E.removeAttribute("vspace");E.removeStyle("margin-top");E.removeStyle("margin-bottom")}}}},{id:"cmbAlign",type:"select",widths:["35%","65%"],style:"width:90px",label:f.lang.common.align,"default":"",items:[[f.lang.common.notSet,""],[f.lang.common.alignLeft,"left"],[f.lang.common.alignRight,"right"]],onChange:function(){t(this.getDialog());A.call(this,"advanced:txtdlgGenStyle")},setup:function(E,D){if(E==e){var F=D.getStyle("float");switch(F){case"inherit":case"none":F=""}!F&&(F=(D.getAttribute("align")||"").toLowerCase());this.setValue(F)}},commit:function(F,E,D){var G=this.getValue();if(F==e||F==o){if(G){E.setStyle("float",G)}else{E.removeStyle("float")}if(!D&&F==e){G=(E.getAttribute("align")||"").toLowerCase();switch(G){case"left":case"right":E.removeAttribute("align")}}}else{if(F==C){E.removeStyle("float")}}}}]}]},{type:"vbox",height:"250px",children:[{type:"html",id:"htmlPreview",style:"width:95%;",html:"<div>"+CKEDITOR.tools.htmlEncode(f.lang.common.preview)+'<br><div id="'+u+'" class="ImagePreviewLoader" style="display:none"><div class="loading"> </div></div><div id="'+b+'" class="ImagePreviewBox"><table><tr><td><a href="javascript:void(0)" target="_blank" onclick="return false;" id="'+d+'"><img id="'+g+'" alt="" /></a>'+(f.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",label:f.lang.link.title,padding:0,elements:[{id:"txtUrl",type:"text",label:f.lang.common.url,style:"width: 100%","default":"",setup:function(F,E){if(F==n){var D=E.data("cke-saved-href");if(!D){D=E.getAttribute("href")}this.setValue(D)}},commit:function(F,E){if(F==n){if(this.getValue()||this.isChanged()){var D=decodeURI(this.getValue());E.data("cke-saved-href",D);E.setAttribute("href",D);if(this.getValue()||!f.config.image_removeLinkByEmptyURL){this.getDialog().addLink=true}}}}},{type:"button",id:"browse",filebrowser:{action:"Browse",target:"Link:txtUrl",url:f.config.filebrowserImageBrowseUrl},style:"float:right",hidden:true,label:f.lang.esp_image.browseServer},{id:"cmbTarget",type:"select",label:f.lang.common.target,"default":"",items:[[f.lang.common.notSet,""],[f.lang.common.targetNew,"_blank"],[f.lang.common.targetTop,"_top"],[f.lang.common.targetSelf,"_self"],[f.lang.common.targetParent,"_parent"]],setup:function(E,D){if(E==n){this.setValue(D.getAttribute("target")||"")}},commit:function(E,D){if(E==n){if(this.getValue()||this.isChanged()){D.setAttribute("target",this.getValue())}}}}]},{id:"advanced",label:f.lang.common.advancedTab,elements:[{type:"hbox",widths:["50%","25%","25%"],children:[{type:"text",id:"linkId",label:f.lang.common.id,setup:function(E,D){if(E==e){this.setValue(D.getAttribute("id"))}},commit:function(E,D){if(E==e){if(this.getValue()||this.isChanged()){D.setAttribute("id",this.getValue())}}}},{id:"cmbLangDir",type:"select",style:"width : 100px;",label:f.lang.common.langDir,"default":"",items:[[f.lang.common.notSet,""],[f.lang.common.langDirLtr,"ltr"],[f.lang.common.langDirRtl,"rtl"]],setup:function(E,D){if(E==e){this.setValue(D.getAttribute("dir"))}},commit:function(E,D){if(E==e){if(this.getValue()||this.isChanged()){D.setAttribute("dir",this.getValue())}}}},{type:"text",id:"txtLangCode",label:f.lang.common.langCode,"default":"",setup:function(E,D){if(E==e){this.setValue(D.getAttribute("lang"))}},commit:function(E,D){if(E==e){if(this.getValue()||this.isChanged()){D.setAttribute("lang",this.getValue())}}}}]},{type:"text",id:"txtGenLongDescr",label:f.lang.common.longDescr,setup:function(E,D){if(E==e){this.setValue(D.getAttribute("longDesc"))}},commit:function(E,D){if(E==e){if(this.getValue()||this.isChanged()){D.setAttribute("longDesc",this.getValue())}}}},{type:"hbox",widths:["50%","50%"],children:[{type:"text",id:"txtGenClass",label:f.lang.common.cssClass,"default":"",setup:function(E,D){if(E==e){this.setValue(D.getAttribute("class"))}},commit:function(E,D){if(E==e){if(this.getValue()||this.isChanged()){D.setAttribute("class",this.getValue())}}}},{type:"text",id:"txtGenTitle",label:f.lang.common.advisoryTitle,"default":"",onChange:function(){t(this.getDialog())},setup:function(E,D){if(E==e){this.setValue(D.getAttribute("title"))}},commit:function(E,D){if(E==e){if(this.getValue()||this.isChanged()){D.setAttribute("title",this.getValue())}}else{if(E==o){D.setAttribute("title",this.getValue())}else{if(E==C){D.removeAttribute("title")}}}}}]},{type:"text",id:"txtdlgGenStyle",label:f.lang.common.cssStyle,validate:CKEDITOR.dialog.validate.inlineStyle(f.lang.common.invalidInlineStyle),"default":"",setup:function(H,F){if(H==e){var I=F.getAttribute("style");if(!I&&F.$.style.cssText){I=F.$.style.cssText}this.setValue(I);var D=F.$.style.height,G=F.$.style.width,J=(D?D:"").match(r),E=(G?G:"").match(r);this.attributesInStyle={height:!!J,width:!!E}}},onChange:function(){A.call(this,["info:cmbFloat","info:cmbAlign","info:txtVSpace","info:txtHSpace","info:txtBorder","info:txtWidth","info:txtHeight"]);t(this)},commit:function(E,D){if(E==e&&(this.getValue()||this.isChanged())){D.setAttribute("style",this.getValue())}}}]}]}};CKEDITOR.dialog.add("esp_image",function(b){return a(b,"image")});CKEDITOR.dialog.add("esp_imagebutton",function(b){return a(b,"imagebutton")})})();
|
1
|
+
(function(){var a=function(f,i){var e=1,n=2,o=4,C=8,r=/^\s*(\d+)((px)|\%)?\s*$/i,B=/(^\s*(\d+)((px)|\%)?\s*$)|^$/i,m=/^\d+px$/;var z=function(){var F=this.getValue(),E=this.getDialog(),D=F.match(r);if(D){if(D[2]=="%"){w(E,false)}F=D[1]}if(E.lockRatio){var G=E.originalElement;if(G.getCustomData("isReady")=="true"){if(this.id=="txtHeight"){if(F&&F!="0"){F=Math.round(G.$.width*(F/G.$.height))}if(!isNaN(F)){E.setValueOf("info","txtWidth",F)}}else{if(F&&F!="0"){F=Math.round(G.$.height*(F/G.$.width))}if(!isNaN(F)){E.setValueOf("info","txtHeight",F)}}}}t(E)};var j=function(I,G){if(G=="onOk"){var E=I.getValueOf("info","txtWidth");var K=I.getValueOf("info","txtHeight");var L="/"+E+"-"+K+"/";var J=I.getValueOf("info","txtUrl");if(J.search(/\/[0-9]+-[0-9]+\//)!=-1){J=J.replace(/\/[0-9]+-[0-9]+\//,L)}else{var F=J.search(/\/[0-9]+\//);var D=J.match(/\/[0-9]+\//);var H=J.substring(F+D[0].length);var J=J.substring(0,F)+D+L.substring(1)+H}}if(G=="onResetSize"){var J=I.getValueOf("info","txtUrl");if(J.search(/\/[0-9]+-[0-9]+\//)!=-1){J=J.replace(/\/[0-9]+-[0-9]+\//,"/")}else{return false}}I.setValueOf("info","txtUrl",J)};var t=function(D){if(!D.originalElement||!D.preview){return 1}D.commitContent(o,D.preview);return 0};function v(){var E=arguments;var D=this.getContentElement("advanced","txtdlgGenStyle");D&&D.commit.apply(D,E);this.foreach(function(F){if(F.commit&&F.id!="txtdlgGenStyle"){F.commit.apply(F,E)}})}var q;function A(D){if(q){return}q=1;var G=this.getDialog(),F=G.imageElement;if(F){this.commit(e,F);D=[].concat(D);var H=D.length,I;for(var E=0;E<H;E++){I=G.getContentElement.apply(G,D[E].split(":"));I&&I.setup(e,F)}}q=0}var w=function(I,K){if(!I.getContentElement("info","ratioLock")){return null}var G=I.originalElement;if(!G){return null}if(K=="check"){if(!I.userlockRatio&&G.getCustomData("isReady")=="true"){var E=I.getValueOf("info","txtWidth"),L=I.getValueOf("info","txtHeight"),H=G.$.width*1000/G.$.height,D=E*1000/L;I.lockRatio=false;if(!E&&!L){I.lockRatio=true}else{if(!isNaN(H)&&!isNaN(D)){if(Math.round(H)==Math.round(D)){I.lockRatio=true}}}}}else{if(K!=undefined){I.lockRatio=K}else{I.userlockRatio=1;I.lockRatio=!I.lockRatio}}var F=CKEDITOR.document.getById(l);if(I.lockRatio){F.removeClass("cke_btn_unlocked")}else{F.addClass("cke_btn_unlocked")}F.setAttribute("aria-checked",I.lockRatio);if(CKEDITOR.env.hc){var J=F.getChild(0);J.setHtml(I.lockRatio?CKEDITOR.env.ie?"\u25A0":"\u25A3":CKEDITOR.env.ie?"\u25A1":"\u25A2")}return I.lockRatio};var k=function(D){j(D,"onResetSize");var G=D.originalElement;if(G.getCustomData("isReady")=="true"){var F=D.getContentElement("info","txtWidth"),E=D.getContentElement("info","txtHeight");F&&F.setValue(G.$.width);E&&E.setValue(G.$.height)}t(D)};var p=function(G,F){if(G!=e){return}function J(M,K){var L=M.match(r);if(L){if(L[2]=="%"){L[1]+="%";w(E,false)}return L[1]}return K}var E=this.getDialog(),H="",I=this.id=="txtWidth"?"width":"height",D=F.getAttribute(I);if(D){H=J(D,H)}H=J(F.getStyle(I),H);this.setValue(H)};var c;var y=function(){var D=this.originalElement;D.setCustomData("isReady","true");D.removeListener("load",y);D.removeListener("error",h);D.removeListener("abort",h);CKEDITOR.document.getById(u).setStyle("display","none");if(!this.dontResetSize){k(this)}if(this.firstLoad){CKEDITOR.tools.setTimeout(function(){w(this,"check")},0,this)}this.firstLoad=false;this.dontResetSize=false};var h=function(){var E=this.originalElement;E.removeListener("load",y);E.removeListener("error",h);E.removeListener("abort",h);var D=CKEDITOR.getUrl(f.skinPath+"images/noimage.png");if(this.preview){this.preview.setAttribute("src",D)}CKEDITOR.document.getById(u).setStyle("display","none");w(this,false)};var x=function(D){return CKEDITOR.tools.getNextId()+"_"+D},l=x("btnLockSizes"),s=x("btnResetSize"),u=x("ImagePreviewLoader"),b=x("ImagePreviewBox"),d=x("previewLink"),g=x("previewImage");return{title:f.lang.image[i=="image"?"title":"titleButton"],minWidth:420,minHeight:360,onShow:function(){this.imageElement=false;this.linkElement=false;this.imageEditMode=false;this.linkEditMode=false;this.lockRatio=true;this.userlockRatio=0;this.dontResetSize=false;this.firstLoad=true;this.addLink=false;var G=this.getParentEditor(),I=this.getParentEditor().getSelection(),F=I.getSelectedElement(),H=F&&F.getAscendant("a");CKEDITOR.document.getById(u).setStyle("display","none");c=new CKEDITOR.dom.element("img",G.document);this.preview=CKEDITOR.document.getById(g);this.originalElement=G.document.createElement("img");this.originalElement.setAttribute("alt","");this.originalElement.setCustomData("isReady","false");if(H){this.linkElement=H;this.linkEditMode=true;var E=H.getChildren();if(E.count()==1){var D=E.getItem(0).getName();if(D=="img"||D=="input"){this.imageElement=E.getItem(0);if(this.imageElement.getName()=="img"){this.imageEditMode="img"}else{if(this.imageElement.getName()=="input"){this.imageEditMode="input"}}}}if(i=="image"){this.setupContent(n,H)}}if(F&&F.getName()=="img"&&!F.data("cke-realelement")||F&&F.getName()=="input"&&F.getAttribute("type")=="image"){this.imageEditMode=F.getName();this.imageElement=F}if(this.imageEditMode){this.cleanImageElement=this.imageElement;this.imageElement=this.cleanImageElement.clone(true,true);this.setupContent(e,this.imageElement)}else{this.imageElement=G.document.createElement("img")}w(this,true);if(!CKEDITOR.tools.trim(this.getValueOf("info","txtUrl"))){this.preview.removeAttribute("src");this.preview.setStyle("display","none")}},onOk:function(){j(this,"onOk");if(this.imageEditMode){var D=this.imageEditMode;if(i=="image"&&D=="input"&&confirm(f.lang.image.button2Img)){D="img";this.imageElement=f.document.createElement("img");this.imageElement.setAttribute("alt","");f.insertElement(this.imageElement)}else{if(i!="image"&&D=="img"&&confirm(f.lang.image.img2Button)){D="input";this.imageElement=f.document.createElement("input");this.imageElement.setAttributes({type:"image",alt:""});f.insertElement(this.imageElement)}else{this.imageElement=this.cleanImageElement;delete this.cleanImageElement}}}else{if(i=="image"){this.imageElement=f.document.createElement("img")}else{this.imageElement=f.document.createElement("input");this.imageElement.setAttribute("type","image")}this.imageElement.setAttribute("alt","")}if(!this.linkEditMode){this.linkElement=f.document.createElement("a")}this.commitContent(e,this.imageElement);this.commitContent(n,this.linkElement);if(!this.imageElement.getAttribute("style")){this.imageElement.removeAttribute("style")}if(!this.imageEditMode){if(this.addLink){if(!this.linkEditMode){f.insertElement(this.linkElement);this.linkElement.append(this.imageElement,false)}else{f.insertElement(this.imageElement)}}else{f.insertElement(this.imageElement)}}else{if(!this.linkEditMode&&this.addLink){f.insertElement(this.linkElement);this.imageElement.appendTo(this.linkElement)}else{if(this.linkEditMode&&!this.addLink){f.getSelection().selectElement(this.linkElement);f.insertElement(this.imageElement)}}}},onLoad:function(){if(i!="image"){this.hidePage("Link")}var D=this._.element.getDocument();if(this.getContentElement("info","ratioLock")){this.addFocusable(D.getById(s),5);this.addFocusable(D.getById(l),5)}this.commitContent=v},onHide:function(){if(this.preview){this.commitContent(C,this.preview)}if(this.originalElement){this.originalElement.removeListener("load",y);this.originalElement.removeListener("error",h);this.originalElement.removeListener("abort",h);this.originalElement.remove();this.originalElement=false}delete this.imageElement},contents:[{id:"info",label:f.lang.image.infoTab,accessKey:"I",elements:[{type:"vbox",padding:0,children:[{type:"hbox",widths:["320px","80px"],align:"right",children:[{id:"txtUrl",type:"text",label:f.lang.common.url,required:true,onLoad:function(){this.getInputElement().setAttribute("readonly","readonly")},onChange:function(){var F=this.getDialog(),G=this.getValue();if(G.length>0){F=this.getDialog();var E=F.originalElement;F.preview.removeStyle("display");E.setCustomData("isReady","false");var D=CKEDITOR.document.getById(u);if(D){D.setStyle("display","")}E.on("load",y,F);E.on("error",h,F);E.on("abort",h,F);E.setAttribute("src",G);c.setAttribute("src",G);F.preview.setAttribute("src",c.$.src);t(F)}else{if(F.preview){F.preview.removeAttribute("src");F.preview.setStyle("display","none")}}},setup:function(F,E){if(F==e){var D=E.data("cke-saved-src")||E.getAttribute("src");var G=this;this.getDialog().dontResetSize=true;G.setValue(D);G.setInitValue()}},commit:function(E,D){if(E==e&&(this.getValue()||this.isChanged())){D.data("cke-saved-src",this.getValue());D.setAttribute("src",this.getValue())}else{if(E==C){D.setAttribute("src","");D.removeAttribute("src")}}},validate:CKEDITOR.dialog.validate.notEmpty(f.lang.image.urlMissing)},{type:"button",id:"browse",style:"display:inline-block;margin-top:10px;",align:"center",label:f.lang.esp_image.browseServer,hidden:true,filebrowser:{action:"Browse",target:"info:txtUrl",url:f.config.filebrowserImageBrowseUrl}}]}]},{id:"txtAlt",type:"text",label:f.lang.image.alt,accessKey:"T","default":"",onChange:function(){t(this.getDialog())},setup:function(E,D){if(E==e){this.setValue(D.getAttribute("alt"))}},commit:function(E,D){if(E==e){if(this.getValue()||this.isChanged()){D.setAttribute("alt",this.getValue())}}else{if(E==o){D.setAttribute("alt",this.getValue())}else{if(E==C){D.removeAttribute("alt")}}}}},{type:"hbox",children:[{id:"basic",type:"vbox",children:[{type:"hbox",widths:["50%","50%"],children:[{type:"vbox",padding:1,children:[{type:"text",width:"40px",id:"txtWidth",label:f.lang.common.width,onKeyUp:z,onChange:function(){A.call(this,"advanced:txtdlgGenStyle")},validate:function(){var D=this.getValue().match(B),E=!!(D&&parseInt(D[1],10)!==0);if(!E){alert(f.lang.common.invalidWidth)}return E},setup:p,commit:function(G,F,E){var H=this.getValue();if(G==e){if(H){F.setStyle("width",CKEDITOR.tools.cssLength(H))}else{F.removeStyle("width")}!E&&F.removeAttribute("width")}else{if(G==o){var D=H.match(r);if(!D){var I=this.getDialog().originalElement;if(I.getCustomData("isReady")=="true"){F.setStyle("width",I.$.width+"px")}}else{F.setStyle("width",CKEDITOR.tools.cssLength(H))}}else{if(G==C){F.removeAttribute("width");F.removeStyle("width")}}}}},{type:"text",id:"txtHeight",width:"40px",label:f.lang.common.height,onKeyUp:z,onChange:function(){A.call(this,"advanced:txtdlgGenStyle")},validate:function(){var D=this.getValue().match(B),E=!!(D&&parseInt(D[1],10)!==0);if(!E){alert(f.lang.common.invalidHeight)}return E},setup:p,commit:function(G,F,E){var H=this.getValue();if(G==e){if(H){F.setStyle("height",CKEDITOR.tools.cssLength(H))}else{F.removeStyle("height")}!E&&F.removeAttribute("height")}else{if(G==o){var D=H.match(r);if(!D){var I=this.getDialog().originalElement;if(I.getCustomData("isReady")=="true"){F.setStyle("height",I.$.height+"px")}}else{F.setStyle("height",CKEDITOR.tools.cssLength(H))}}else{if(G==C){F.removeAttribute("height");F.removeStyle("height")}}}}}]},{id:"ratioLock",type:"html",style:"margin-top:30px;width:40px;height:40px;",onLoad:function(){var D=CKEDITOR.document.getById(s),E=CKEDITOR.document.getById(l);if(D){D.on("click",function(F){k(this);F.data&&F.data.preventDefault()},this.getDialog());D.on("mouseover",function(){this.addClass("cke_btn_over")},D);D.on("mouseout",function(){this.removeClass("cke_btn_over")},D)}if(E){E.on("click",function(G){var H=w(this),J=this.originalElement,I=this.getValueOf("info","txtWidth");if(J.getCustomData("isReady")=="true"&&I){var F=J.$.height/J.$.width*I;if(!isNaN(F)){this.setValueOf("info","txtHeight",Math.round(F));t(this)}}G.data&&G.data.preventDefault()},this.getDialog());E.on("mouseover",function(){this.addClass("cke_btn_over")},E);E.on("mouseout",function(){this.removeClass("cke_btn_over")},E)}},html:'<div><a href="javascript:void(0)" tabindex="-1" title="'+f.lang.image.lockRatio+'" class="cke_btn_locked" id="'+l+'" role="checkbox"><span class="cke_icon"></span><span class="cke_label">'+f.lang.image.lockRatio+'</span></a><a href="javascript:void(0)" tabindex="-1" title="'+f.lang.image.resetSize+'" class="cke_btn_reset" id="'+s+'" role="button"><span class="cke_label">'+f.lang.image.resetSize+"</span></a></div>"}]},{type:"vbox",padding:1,children:[{type:"text",id:"txtBorder",width:"60px",label:f.lang.image.border,"default":"",onKeyUp:function(){t(this.getDialog())},onChange:function(){A.call(this,"advanced:txtdlgGenStyle")},validate:CKEDITOR.dialog.validate.integer(f.lang.image.validateBorder),setup:function(F,E){if(F==e){var G,D=E.getStyle("border-width");D=D&&D.match(/^(\d+px)(?: \1 \1 \1)?$/);G=D&&parseInt(D[1],10);isNaN(parseInt(G,10))&&(G=E.getAttribute("border"));this.setValue(G)}},commit:function(F,E,D){var G=parseInt(this.getValue(),10);if(F==e||F==o){if(!isNaN(G)){E.setStyle("border-width",CKEDITOR.tools.cssLength(G));E.setStyle("border-style","solid")}else{if(!G&&this.isChanged()){E.removeStyle("border-width");E.removeStyle("border-style");E.removeStyle("border-color")}}if(!D&&F==e){E.removeAttribute("border")}}else{if(F==C){E.removeAttribute("border");E.removeStyle("border-width");E.removeStyle("border-style");E.removeStyle("border-color")}}}},{type:"text",id:"txtHSpace",width:"60px",label:f.lang.image.hSpace,"default":"",onKeyUp:function(){t(this.getDialog())},onChange:function(){A.call(this,"advanced:txtdlgGenStyle")},validate:CKEDITOR.dialog.validate.integer(f.lang.image.validateHSpace),setup:function(F,E){if(F==e){var H,G,J,D=E.getStyle("margin-left"),I=E.getStyle("margin-right");D=D&&D.match(m);I=I&&I.match(m);G=parseInt(D,10);J=parseInt(I,10);H=(G==J)&&G;isNaN(parseInt(H,10))&&(H=E.getAttribute("hspace"));this.setValue(H)}},commit:function(F,E,D){var G=parseInt(this.getValue(),10);if(F==e||F==o){if(!isNaN(G)){E.setStyle("margin-left",CKEDITOR.tools.cssLength(G));E.setStyle("margin-right",CKEDITOR.tools.cssLength(G))}else{if(!G&&this.isChanged()){E.removeStyle("margin-left");E.removeStyle("margin-right")}}if(!D&&F==e){E.removeAttribute("hspace")}}else{if(F==C){E.removeAttribute("hspace");E.removeStyle("margin-left");E.removeStyle("margin-right")}}}},{type:"text",id:"txtVSpace",width:"60px",label:f.lang.image.vSpace,"default":"",onKeyUp:function(){t(this.getDialog())},onChange:function(){A.call(this,"advanced:txtdlgGenStyle")},validate:CKEDITOR.dialog.validate.integer(f.lang.image.validateVSpace),setup:function(I,H){if(I==e){var J,D,F,E=H.getStyle("margin-top"),G=H.getStyle("margin-bottom");E=E&&E.match(m);G=G&&G.match(m);D=parseInt(E,10);F=parseInt(G,10);J=(D==F)&&D;isNaN(parseInt(J,10))&&(J=H.getAttribute("vspace"));this.setValue(J)}},commit:function(F,E,D){var G=parseInt(this.getValue(),10);if(F==e||F==o){if(!isNaN(G)){E.setStyle("margin-top",CKEDITOR.tools.cssLength(G));E.setStyle("margin-bottom",CKEDITOR.tools.cssLength(G))}else{if(!G&&this.isChanged()){E.removeStyle("margin-top");E.removeStyle("margin-bottom")}}if(!D&&F==e){E.removeAttribute("vspace")}}else{if(F==C){E.removeAttribute("vspace");E.removeStyle("margin-top");E.removeStyle("margin-bottom")}}}},{id:"cmbAlign",type:"select",widths:["35%","65%"],style:"width:90px",label:f.lang.common.align,"default":"",items:[[f.lang.common.notSet,""],[f.lang.common.alignLeft,"left"],[f.lang.common.alignRight,"right"]],onChange:function(){t(this.getDialog());A.call(this,"advanced:txtdlgGenStyle")},setup:function(E,D){if(E==e){var F=D.getStyle("float");switch(F){case"inherit":case"none":F=""}!F&&(F=(D.getAttribute("align")||"").toLowerCase());this.setValue(F)}},commit:function(F,E,D){var G=this.getValue();if(F==e||F==o){if(G){E.setStyle("float",G)}else{E.removeStyle("float")}if(!D&&F==e){G=(E.getAttribute("align")||"").toLowerCase();switch(G){case"left":case"right":E.removeAttribute("align")}}}else{if(F==C){E.removeStyle("float")}}}}]}]},{type:"vbox",height:"250px",children:[{type:"html",id:"htmlPreview",style:"width:95%;",html:"<div>"+CKEDITOR.tools.htmlEncode(f.lang.common.preview)+'<br><div id="'+u+'" class="ImagePreviewLoader" style="display:none"><div class="loading"> </div></div><div id="'+b+'" class="ImagePreviewBox"><table><tr><td><a href="javascript:void(0)" target="_blank" onclick="return false;" id="'+d+'"><img id="'+g+'" alt="" /></a>'+(f.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",label:f.lang.link.title,padding:0,elements:[{id:"txtUrl",type:"text",label:f.lang.common.url,style:"width: 100%","default":"",setup:function(F,E){if(F==n){var D=E.data("cke-saved-href");if(!D){D=E.getAttribute("href")}this.setValue(D)}},commit:function(F,E){if(F==n){if(this.getValue()||this.isChanged()){var D=decodeURI(this.getValue());E.data("cke-saved-href",D);E.setAttribute("href",D);if(this.getValue()||!f.config.image_removeLinkByEmptyURL){this.getDialog().addLink=true}}}}},{type:"button",id:"browse",filebrowser:{action:"Browse",target:"Link:txtUrl",url:f.config.filebrowserImageBrowseUrl},style:"float:right",hidden:true,label:f.lang.esp_image.browseServer},{id:"cmbTarget",type:"select",label:f.lang.common.target,"default":"",items:[[f.lang.common.notSet,""],[f.lang.common.targetNew,"_blank"],[f.lang.common.targetTop,"_top"],[f.lang.common.targetSelf,"_self"],[f.lang.common.targetParent,"_parent"]],setup:function(E,D){if(E==n){this.setValue(D.getAttribute("target")||"")}},commit:function(E,D){if(E==n){if(this.getValue()||this.isChanged()){D.setAttribute("target",this.getValue())}}}}]},{id:"advanced",label:f.lang.common.advancedTab,elements:[{type:"hbox",widths:["50%","25%","25%"],children:[{type:"text",id:"linkId",label:f.lang.common.id,setup:function(E,D){if(E==e){this.setValue(D.getAttribute("id"))}},commit:function(E,D){if(E==e){if(this.getValue()||this.isChanged()){D.setAttribute("id",this.getValue())}}}},{id:"cmbLangDir",type:"select",style:"width : 100px;",label:f.lang.common.langDir,"default":"",items:[[f.lang.common.notSet,""],[f.lang.common.langDirLtr,"ltr"],[f.lang.common.langDirRtl,"rtl"]],setup:function(E,D){if(E==e){this.setValue(D.getAttribute("dir"))}},commit:function(E,D){if(E==e){if(this.getValue()||this.isChanged()){D.setAttribute("dir",this.getValue())}}}},{type:"text",id:"txtLangCode",label:f.lang.common.langCode,"default":"",setup:function(E,D){if(E==e){this.setValue(D.getAttribute("lang"))}},commit:function(E,D){if(E==e){if(this.getValue()||this.isChanged()){D.setAttribute("lang",this.getValue())}}}}]},{type:"text",id:"txtGenLongDescr",label:f.lang.common.longDescr,setup:function(E,D){if(E==e){this.setValue(D.getAttribute("longDesc"))}},commit:function(E,D){if(E==e){if(this.getValue()||this.isChanged()){D.setAttribute("longDesc",this.getValue())}}}},{type:"hbox",widths:["50%","50%"],children:[{type:"text",id:"txtGenClass",label:f.lang.common.cssClass,"default":"",setup:function(E,D){if(E==e){this.setValue(D.getAttribute("class"))}},commit:function(E,D){if(E==e){if(this.getValue()||this.isChanged()){D.setAttribute("class",this.getValue())}}}},{type:"text",id:"txtGenTitle",label:f.lang.common.advisoryTitle,"default":"",onChange:function(){t(this.getDialog())},setup:function(E,D){if(E==e){this.setValue(D.getAttribute("title"))}},commit:function(E,D){if(E==e){if(this.getValue()||this.isChanged()){D.setAttribute("title",this.getValue())}}else{if(E==o){D.setAttribute("title",this.getValue())}else{if(E==C){D.removeAttribute("title")}}}}}]},{type:"text",id:"txtdlgGenStyle",label:f.lang.common.cssStyle,validate:CKEDITOR.dialog.validate.inlineStyle(f.lang.common.invalidInlineStyle),"default":"",setup:function(H,F){if(H==e){var I=F.getAttribute("style");if(!I&&F.$.style.cssText){I=F.$.style.cssText}this.setValue(I);var D=F.$.style.height,G=F.$.style.width,J=(D?D:"").match(r),E=(G?G:"").match(r);this.attributesInStyle={height:!!J,width:!!E}}},onChange:function(){A.call(this,["info:cmbFloat","info:cmbAlign","info:txtVSpace","info:txtHSpace","info:txtBorder","info:txtWidth","info:txtHeight"]);t(this)},commit:function(E,D){if(E==e&&(this.getValue()||this.isChanged())){D.setAttribute("style",this.getValue())}}}]}]}};CKEDITOR.dialog.add("esp_image",function(b){return a(b,"image")});CKEDITOR.dialog.add("esp_imagebutton",function(b){return a(b,"imagebutton")})})();
|
data/lib/esp-ckeditor/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: esp-ckeditor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,52 +9,72 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-12-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
|
16
|
-
requirement: &16170640 !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
18
16
|
requirements:
|
19
17
|
- - ! '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
20
|
+
none: false
|
22
21
|
type: :runtime
|
22
|
+
name: formtastic
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ! '>='
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '0'
|
28
|
+
none: false
|
23
29
|
prerelease: false
|
24
|
-
version_requirements: *16170640
|
25
30
|
- !ruby/object:Gem::Dependency
|
26
|
-
|
27
|
-
requirement: &16169760 !ruby/object:Gem::Requirement
|
28
|
-
none: false
|
31
|
+
requirement: !ruby/object:Gem::Requirement
|
29
32
|
requirements:
|
30
33
|
- - ! '>='
|
31
34
|
- !ruby/object:Gem::Version
|
32
35
|
version: '0'
|
36
|
+
none: false
|
33
37
|
type: :runtime
|
38
|
+
name: rails
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
44
|
+
none: false
|
34
45
|
prerelease: false
|
35
|
-
version_requirements: *16169760
|
36
46
|
- !ruby/object:Gem::Dependency
|
37
|
-
|
38
|
-
requirement: &16168960 !ruby/object:Gem::Requirement
|
39
|
-
none: false
|
47
|
+
requirement: !ruby/object:Gem::Requirement
|
40
48
|
requirements:
|
41
49
|
- - ! '>='
|
42
50
|
- !ruby/object:Gem::Version
|
43
51
|
version: '0'
|
52
|
+
none: false
|
44
53
|
type: :development
|
54
|
+
name: juicer
|
55
|
+
version_requirements: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - ! '>='
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '0'
|
60
|
+
none: false
|
45
61
|
prerelease: false
|
46
|
-
version_requirements: *16168960
|
47
62
|
- !ruby/object:Gem::Dependency
|
48
|
-
|
49
|
-
requirement: &16168060 !ruby/object:Gem::Requirement
|
50
|
-
none: false
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
51
64
|
requirements:
|
52
65
|
- - ! '>='
|
53
66
|
- !ruby/object:Gem::Version
|
54
67
|
version: '0'
|
68
|
+
none: false
|
55
69
|
type: :development
|
70
|
+
name: sass-rails
|
71
|
+
version_requirements: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ! '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
none: false
|
56
77
|
prerelease: false
|
57
|
-
version_requirements: *16168060
|
58
78
|
description: EspCkeditor.
|
59
79
|
email:
|
60
80
|
- mail@openteam.ru
|
@@ -414,26 +434,26 @@ rdoc_options: []
|
|
414
434
|
require_paths:
|
415
435
|
- lib
|
416
436
|
required_ruby_version: !ruby/object:Gem::Requirement
|
417
|
-
none: false
|
418
437
|
requirements:
|
419
438
|
- - ! '>='
|
420
439
|
- !ruby/object:Gem::Version
|
440
|
+
hash: -3908795102373641060
|
421
441
|
version: '0'
|
422
442
|
segments:
|
423
443
|
- 0
|
424
|
-
hash: 1713675996699259440
|
425
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
426
444
|
none: false
|
445
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
427
446
|
requirements:
|
428
447
|
- - ! '>='
|
429
448
|
- !ruby/object:Gem::Version
|
449
|
+
hash: -3908795102373641060
|
430
450
|
version: '0'
|
431
451
|
segments:
|
432
452
|
- 0
|
433
|
-
|
453
|
+
none: false
|
434
454
|
requirements: []
|
435
455
|
rubyforge_project:
|
436
|
-
rubygems_version: 1.8.
|
456
|
+
rubygems_version: 1.8.24
|
437
457
|
signing_key:
|
438
458
|
specification_version: 3
|
439
459
|
summary: EspCkeditor.
|