1 |
- function removeDomainFromUrl(a){"use strict";return a.replace(/^https?:\/\/[^\/]+/i,"")}function var_dump(a,b){"use strict";var c="";b||(b=0);var e,d="";for(e=0;e<b+1;e+=1)d+=" ";if("object"==typeof a){var f,g;for(f in a)a.hasOwnProperty(f)&&(g=a[f],"object"==typeof g?(c+=d+"'"+f+"' ...\n",c+=var_dump(g,b+1)):c+=d+"'"+f+"' => \""+g+'"\n')}else c="===>"+a+"<===("+typeof a+")";return c}var IMG_PARAM={URL:0,TITLE:1,ALT:2,WIDTH:3,HEIGHT:4},pluginPath='http://lib.amic.ru/js/' /*removeDomainFromUrl(CKEDITOR.plugins.get("slideshow").path)*/,BASE_PATH=removeDomainFromUrl(CKEDITOR.basePath),SCRIPT_JQUERY=pluginPath+"3rdParty/jquery.min.js",SCRIPT_ADDGAL=pluginPath+"3rdParty/ad-gallery/jquery.ad-gallery.min.js",CSS_ADDGAL=pluginPath+"3rdParty/ad-gallery/jquery.ad-gallery.css",SCRIPT_FANCYBOX=pluginPath+"3rdParty/fancybox2/jquery.fancybox.pack.js?v=2.1.5",CSS_FANCYBOX=pluginPath+"3rdParty/fancybox2/jquery.fancybox.css?v=2.1.5",listItem=function(a){"use strict";return a.type==CKEDITOR.NODE_ELEMENT&&a.is("li")},ULItem=function(a){"use strict";return a.type==CKEDITOR.NODE_ELEMENT&&a.is("ul")},iFrameItem=function(a){"use strict";return a.type==CKEDITOR.NODE_ELEMENT&&a.is("iframe")};Array.prototype.pushUnique=function(a){"use strict";var b;for(b=0;b<this.length;b+=1)if(this[b][0]==a[0])return-1;return this.push(a),this.length-1},Array.prototype.updateVal=function(a,b){"use strict";var c;for(c=0;c<this.length;c+=1)if(this[c][0]==a)return this[c]=[a,b],!0;return this[c]=[a,b],!1},Array.prototype.getVal=function(a){"use strict";var b;for(b=0;b<this.length;b+=1)if(this[b][0]==a)return this[b][1];return null},CKEDITOR.dialog.add("slideshowDialog",function(a){"use strict";function c(a,b,c,d,e){a=k(a);var f;return f=d?d.createElement("OPTION"):document.createElement("OPTION"),!(!a||!f||"option"!=f.getName())&&(CKEDITOR.env.ie?(isNaN(parseInt(e,10))?a.$.options.add(f.$):a.$.options.add(f.$,e),f.$.innerHTML=b.length>0?b:"",f.$.value=c):(null!==e&&e<a.getChildCount()?a.getChild(e<0?0:e).insertBeforeMe(f):a.append(f),f.setText(b.length>0?b:""),f.setValue(c)),f)}function e(a,b,c,d){if(a=k(a),b<0)return!1;var e=a.getChild(b);return e.setText(c),e.setValue(d),e}function f(a){for(a=k(a);a.getChild(0)&&a.getChild(0).remove(););}function g(a,b,d,f){a=k(a);var g=h(a);if(g<0)return!1;var j=g+b;if(j=j<0?0:j,j=j>=a.getChildCount()?a.getChildCount()-1:j,g==j)return!1;var l=/(^IMG_\d+)/,m=a.getChild(j),n=m.getText(),o=m.getValue();n=n.replace(l,"IMG_"+g),e(a,j,n,o),m=a.getChild(g),n=m.getText(),o=m.getValue(),m.remove(),n=n.replace(l,"IMG_"+j),m=c(a,n,o,d?d:null,j),i(a,j);var p=f.imagesList[g],q=f.imagesList[j];return f.imagesList[g]=q,f.imagesList[j]=p,m}function h(a){return a=k(a),a?a.$.selectedIndex:-1}function i(a,b){if(a=k(a),b<0)return null;var c=a.getChildren().count();return a.$.selectedIndex=b>=c?c-1:b,a}function k(a){return a&&a.domId&&a.getInputElement().$?a.getInputElement():!(!a||!a.$)&&a}function n(a){if(1!=a.openCloseStep){var b=a.getContentElement("slideshowinfoid","framepreviewid");b.isVisible()?z(a):s(a)}}function o(a){var b=a.getDialog();a=k(a);var d,e,f,c=0;for(d=0;d<a.getChildren().count();d+=1)if(e=a.getChild(d),e.$.selected){f=e,c=d;break}i(a,c),n(b)}function p(a){var b=a.getContentElement("slideshowinfoid","imglistitemsid");return h(b)}function q(a){var b=BASE_PATH+"plugins/slideshow/images/placeholder.png";if(1==a.imagesList.length&&a.imagesList[0][IMG_PARAM.URL]==b){var c=a.getContentElement("slideshowinfoid","imglistitemsid");c=k(c);var d=0;a.imagesList.splice(d,1),c.getChild(d).remove()}}function r(a){q(a);var b=a.previewImage,d=b.$.src,e=b.$.width/b.$.height,f=50,g=50;e>1?g/=e:f*=e;var h,j=a.getContentElement("slideshowinfoid","imglistitemsid"),k=a.imagesList.pushUnique([d,"","",f.toFixed(0),g.toFixed(0)]);k>=0&&(h=c(j,"IMG_"+k+" : "+d.substring(d.lastIndexOf("/")+1),d,a.getParentEditor().document),i(j,k),n(a))}function s(a){var b=a.getContentElement("slideshowinfoid","imglistitemsid"),c=h(b),d=a.imagesList[c];b=a.getContentElement("slideshowinfoid","imgtitleid"),b=k(b),b.setValue(d[1]),b=a.getContentElement("slideshowinfoid","imgdescid"),b=k(b),b.setValue(d[2]),b=a.getContentElement("slideshowinfoid","imgpreviewid"),b=k(b);var e='<div style="text-align:center;"> <img src="'+d[0]+'" title="'+d[1]+'" alt="'+d[2]+'" style=" max-height: 200px; max-width: 350px;"> </div>';b.setHtml(e);var f=a.getContentElement("slideshowinfoid","framepreviewid"),g=a.getContentElement("slideshowinfoid","imgparamsid");f=k(f),f.hide(),g=k(g),g.show()}function t(a){var d=a.getContentElement("slideshowinfoid","imglistitemsid");d=k(d);var f,e=!1;for(f=d.getChildren().count()-1;f>=0;f--)d.getChild(f).$.selected&&(a.imagesList.splice(f,1),d.getChild(f).remove(),e=!0);if(e){if(0==a.imagesList.length){var g=BASE_PATH+"plugins/slideshow/images/placeholder.png";c(d,"IMG_0 : "+g.substring(g.lastIndexOf("/")+1),g,a.getParentEditor().document);a.imagesList.pushUnique([g,b.imgTitle,b.imgDesc,"50","50"])}i(d,0),n(a)}}function u(a,b){var c=a.getContentElement("slideshowinfoid","imglistitemsid");c=k(c);var d=h(c);1!=c.getChildren().count()&&(b==-1&&0==d||1==b&&d==c.getChildren().count()-1||(g(c,b,a.getParentEditor().document,a),B(a)))}function x(a,b){a.imagesList[p(a)][IMG_PARAM.TITLE]=b,s(a)}function y(a,b){a.imagesList[p(a)][IMG_PARAM.ALT]=b,s(a)}function z(a){var b=a.getContentElement("slideshowinfoid","framepreviewid"),c=a.getContentElement("slideshowinfoid","imgparamsid");c=k(c),c.hide(),b=k(b),b.show(),B(a)}function A(a,b){a.open(),a.writeln(b),a.close()}function B(a){var b=436,c=300;if(1==a.params.getVal("showthumbid")?c-=120:1==a.params.getVal("showcontrolid")&&(c-=30),0!=a.imagesList.length){var d=a.getContentElement("slideshowinfoid","imglistitemsid"),e=h(d);e<0&&(e=0),d=a.getContentElement("slideshowinfoid","framepreviewid");var f="",g='<script src="'+SCRIPT_JQUERY+'" type="text/javascript"></script>';f+="<head>",f+=g,f+='<script type="text/javascript" src="'+SCRIPT_ADDGAL+'"></script>',f+='<link rel="stylesheet" type="text/css" href="'+CSS_ADDGAL+'" />',1==a.params.getVal("openOnClickId")&&(f+='<link rel="stylesheet" type="text/css" href="'+CSS_FANCYBOX+'" />',f+='<script type="text/javascript" src="'+SCRIPT_FANCYBOX+'"></script>',f+='<script type="text/javascript">',f+=M(a),f+="</script>"),f+='<script type="text/javascript">',f+=L(a,e,b,c),f+="</script>",f+="</head>",f+="<body>";var i=P(a);f+=i.getOuterHtml(),f+="</body>",f+="",d=k(d);var j=d.getFirst(iFrameItem);j&&j.remove();var l=null,m=b+60,n=c;1==a.params.getVal("showthumbid")?n+=120:1==a.params.getVal("showcontrolid")&&(n+=30);var o=CKEDITOR.dom.element.createFromHtml('<iframe style="width:'+m+"px;height:"+n+'px;background:azure; " class="cke_pasteframe" frameborder="10" allowTransparency="false" role="region" scrolling="no"></iframe>');o.setAttribute("name","totoFrame"),o.setAttribute("id","totoFrame"),o.on("load",function(a){if(null==l){l=this.$;var b;l.contentDocument?b=l.contentDocument:l.contentWindow&&(b=l.contentWindow.document),b?A(b,f):alert("Cannot inject dynamic contents into iframe.")}}),d.append(o)}}function C(a,b){var d,e,f,g,h,j,k,l,m,o=b.$.getElementsByTagName("img"),p=a.getContentElement("slideshowinfoid","imglistitemsid");for(d=0;d<o.length;d+=1){e=o[d],f=e.src,g=e.width,0==g&&(g=e.naturalWidth),0==g?(g=50,h=50):(h=e.height,0==h&&(h=e.naturalHeight),0==h&&(g=50,h=50)),j=g/h,k=50,l=50,j>1?l/=j:k*=j,m=a.imagesList.pushUnique([f,e.title,e.alt,k,l]);var q;m>=0&&(q=c(p,"IMG_"+m+" : "+f.substring(f.lastIndexOf("/")+1),f,a.getParentEditor().document))}i(p,0),n(a)}function D(a){var d=a.getContentElement("slideshowinfoid","imglistitemsid"),e=BASE_PATH+"plugins/slideshow/images/placeholder.png";c(d,"IMG_0 : "+e.substring(e.lastIndexOf("/")+1),e,a.getParentEditor().document);a.imagesList.pushUnique([e,b.imgTitle,b.imgDesc,"50","50"]),i(d,0),n(a)}function F(){var a=this.getDialog();if(a.newSlideShowMode)switch(a.slideshowDOM.setAttribute("data-"+this.id,this.getValue()),this.type){case"checkbox":break;case"text":break;case"select":}else switch(this.type){case"checkbox":this.setValue("true"==a.slideshowDOM.getAttribute("data-"+this.id));break;case"text":this.setValue(a.slideshowDOM.getAttribute("data-"+this.id));break;case"select":this.setValue(a.slideshowDOM.getAttribute("data-"+this.id))}}function G(){var a=this.getDialog();switch(a.params.updateVal(this.id,this.getValue()),this.type){case"checkbox":break;case"text":break;case"select":}n(a)}function H(a){a.previewImage&&(a.previewImage.removeListener("load",v),a.previewImage.removeListener("error",w),a.previewImage.removeListener("abort",w),a.previewImage.remove(),a.previewImage=null),a.imagesList=null,a.params=null,a.slideshowDOM=null;var b=a.getContentElement("slideshowinfoid","imglistitemsid");f(b),a.openCloseStep=!1}function I(a){for(var b="";b.length<a;)b+=Math.random().toString(36).substring(2);return b.substring(0,a)}function K(a,b){var c=b.getElementsByTag("ul");return null==c?null:1==c.count()?c.getItem(0):null}function L(a,c,d,e){var f=a.params.getVal("slideshowid"),g="ad-gallery_"+f,h="(function($) {",i="";h+="$(function() {",0==e&&(e=a.params.getVal("pictheightid")),0==d&&(d="false"),0==a.params.getVal("showtitleid")&&(i=", hooks: { displayDescription: function(image) {}}");var j="loader_image: '"+pluginPath+"3rdParty/ad-gallery/loader.gif', width:"+d+", height:"+e+", start_at_index: "+c+", animation_speed: "+a.params.getVal("animspeedid")+i+", update_window_hash: false, effect: '"+a.params.getVal("transitiontypeid")+"',",k=" slideshow: { enable: true, autostart: "+a.params.getVal("autostartid")+", start_label: '"+b.labelStart+"', stop_label: '"+b.labelStop+"', speed: "+1e3*a.params.getVal("speedid")+"}";return h+=" var galleries = $('#"+g+"').adGallery({"+j+k+"});",h+="});",h+="})(jQuery);"}function M(a){var b=a.params.getVal("slideshowid"),c="ad-gallery_"+b,d="(function($) {";return d+="$(function() {",d+='$("#'+c+'").on("click",".ad-image",function(){',d+='var imgObj =$(this).find("img");',d+='var isrc=imgObj.attr("src");',d+="var ititle=null;",d+="var idesc=null;",d+="var iname=isrc.split('/');",d+="iname=iname[iname.length-1];",d+='var imgdescid=$(this).find(".ad-image-description");',d+="if(imgdescid){",d+='ititle=$(this).find(".ad-description-title");',d+="if(ititle)ititle=ititle.text();",d+="if(ititle!='')ititle='<big>'+ititle+'</big>';",d+='idesc=$(this).find("span");',d+="if(idesc)idesc=idesc.text();",d+="if (idesc.indexOf('IMAGE_LINK_') >= 0) {",d+="idesc = '';",d+="}",d+="if(idesc!=''){",d+="if(ititle!='')ititle=ititle+'<br>';",d+="idesc='<i>'+idesc+'</i>';",d+="}",d+="}",d+="$.fancybox.open({",d+="href:isrc,",d+="beforeLoad:function(){",d+="this.title=ititle+idesc;",d+="},",d+="});",d+="});",d+="});",d+="})(jQuery);"}function N(a){var b=a.params.getVal("slideshowid"),c="ad-gallery_"+b,d="(function($) {";return d+="$(function() {",d+='$("#'+c+'").on("click",".ad-image",function(){',d+='var imgObj =$(this).find("img");',d+='var isrc=imgObj.attr("src");',d+="var ititle=null;",d+="var idesc=null;",d+="var iname=isrc.split('/');",d+="iname=iname[iname.length-1];",d+='var imgdescid=$(this).find(".ad-image-description");',d+="if(imgdescid){",d+='ititle=$(this).find(".ad-description-title");',d+="if(ititle)ititle=ititle.text();",d+='idesc=$(this).find("span");',d+="if(idesc)idesc=idesc.text();",d+="if(idesc!=''){",d+="var url=window.location.href.trim();",d+="if (idesc.indexOf('IMAGE_LINK_TAB:') >= 0) {",d+="\tidesc = idesc.substring(15).trim();",d+=" if (url != idesc) window.open(idesc,'_blank');",d+="} else if (idesc.indexOf('IMAGE_LINK_PAR:') >= 0) {",d+="\tidesc = idesc.substring(15).trim();",d+=" if (url != idesc) window.open(idesc,'_self');",d+="}",d+="}",d+="}",d+="});",d+="});",d+="})(jQuery);"}function O(a,b){var c,d,e,f;for(c=0;c<a.imagesList.length;c+=1)d=b.append("li"),d.setAttribute("contenteditable","false"),e=d.append("a"),e.setAttribute("href",removeDomainFromUrl(a.imagesList[c][IMG_PARAM.URL])),e.setAttribute("contenteditable","false"),f=e.append("img"),f.setAttribute("src",removeDomainFromUrl(a.imagesList[c][IMG_PARAM.URL])),f.setAttribute("title",a.imagesList[c][IMG_PARAM.TITLE]),f.setAttribute("alt",a.imagesList[c][IMG_PARAM.ALT]),f.setAttribute("contenteditable","false"),f.setAttribute("width",a.imagesList[c][IMG_PARAM.WIDTH]),f.setAttribute("height",a.imagesList[c][IMG_PARAM.HEIGHT])}function P(b){var c=b.params.getVal("slideshowid"),d="ad-gallery_"+c,e="display: block;",f="display: block;";0==b.params.getVal("showthumbid")&&(e="display: none;"),0==b.params.getVal("showcontrolid")&&(f="visibility: hidden;");var g=a.document.createElement("div");g.setAttribute("id",c),g.setAttribute("class","slideshowPlugin"),g.setAttribute("contenteditable","false");var h=g.append("div");h.setAttribute("class","ad-gallery"),h.setAttribute("contenteditable","false"),h.setAttribute("id",d);var i=h.append("div");i.setAttribute("class","ad-image-wrapper"),i.setAttribute("contenteditable","false");var j=h.append("div");j.setAttribute("class","ad-controls"),j.setAttribute("contenteditable","false"),j.setAttribute("style",f);var k=h.append("div");k.setAttribute("class","ad-nav"),k.setAttribute("style",e),k.setAttribute("contenteditable","false");var l=k.append("div");l.setAttribute("class","ad-thumbs"),l.setAttribute("contenteditable","false");var m=l.append("ul");return m.setAttribute("class","ad-thumb-list"),m.setAttribute("contenteditable","false"),O(b,m),g}function Q(b){var c={},d={};b.openCloseStep=!0,b.commitContent(b);var f,e=P(b);for(f=0;f<b.params.length;f+=1)e.data(b.params[f][0],b.params[f][1]);if(!a.config.slideshowDoNotLoadJquery||1!=a.config.slideshowDoNotLoadJquery){var g=CKEDITOR.document.createElement("script",{attributes:{type:"text/javascript",src:SCRIPT_JQUERY}});e.append(g)}var h=CKEDITOR.document.createElement("script",{attributes:{type:"text/javascript",src:SCRIPT_ADDGAL}});if(e.append(h),1==b.params.getVal("openOnClickId")){if(!a.config.slideshowDoNotLoadFancyBoxCss||1!=a.config.slideshowDoNotLoadFancyBoxCss){var i=CKEDITOR.document.createElement("script",{attributes:{type:"text/javascript"}});i.setText("(function($) { $('head').append('<link rel=\"stylesheet\" href=\""+CSS_FANCYBOX+'" type="text/css" />\'); })(jQuery);'),e.append(i)}if(!a.config.slideshowDoNotLoadFancyBoxScript||1!=a.config.slideshowDoNotLoadFancyBoxScript){var j=CKEDITOR.document.createElement("script",{attributes:{type:"text/javascript",src:SCRIPT_FANCYBOX}});e.append(j)}var k=CKEDITOR.document.createElement("script",{attributes:{type:"text/javascript"}});k.setText(M(b)),e.append(k)}var l=CKEDITOR.document.createElement("script",{attributes:{type:"text/javascript"}});l.setText(N(b)),e.append(l);var m=CKEDITOR.document.createElement("script",{attributes:{type:"text/javascript"}});m.setText("(function($) { $('head').append('<link rel=\"stylesheet\" href=\""+CSS_ADDGAL+'" type="text/css" />\'); })(jQuery);'),e.append(m);var n=CKEDITOR.document.createElement("script",{attributes:{type:"text/javascript"}});n.setText(L(b,0,0,0)),e.append(n),b.imagesList.length&&(c.backgroundImage='url("'+b.imagesList[0][IMG_PARAM.URL]+'")'),c.backgroundSize="contain",c.backgroundRepeat="no-repeat",c.backgroundPosition="center",c.display="block",c.width="64px",c.height="64px",c.border="1px solid black";var o=a.createFakeElement(e,"cke_slideShow","slideShow",!1);return o.setAttributes(d),o.setStyles(c),b.fakeImage?(o.replace(b.fakeImage),a.getSelection().selectElement(o)):a.insertElement(o),H(b),b.hide(),!0}var b=a.lang.slideshow,v=function(){var a=this.previewImage;a.removeListener("load",v),a.removeListener("error",w),a.removeListener("abort",w),r(this)},w=function(){var a=this.previewImage;a.removeListener("load",v),a.removeListener("error",w),a.removeListener("abort",w)},J=function(a){return"cke_"+I(8)+"_"+a};return{title:b.dialogTitle,width:500,height:600,resizable:CKEDITOR.DIALOG_RESIZE_NONE,buttons:[CKEDITOR.dialog.okButton(a,{label:"OkCK",style:"display:none;"}),CKEDITOR.dialog.cancelButton,{id:"myokbtnid",type:"button",label:"OK",title:b.validModif,accessKey:"C",disabled:!1,onClick:function(){Q(this.getDialog())}}],contents:[{id:"slideshowinfoid",label:"Basic Settings",align:"center",elements:[{type:"text",id:"id",style:"display:none;",onLoad:function(){this.getInputElement().setAttribute("readOnly",!0)}},{type:"text",id:"txturlid",style:"display:none;",label:b.imgList,onChange:function(){var a=this.getDialog(),b=this.getValue();if(b.length>0){var c=a.previewImage;c.on("load",v,a),c.on("error",w,a),c.on("abort",w,a),c.setAttribute("src",b)}}},{type:"button",id:"browse",hidden:"true",style:"display:inline-block;margin-top:0px;",filebrowser:{action:"Browse",target:"slideshowinfoid:txturlid",url:a.config.filebrowserImageBrowseUrl||a.config.filebrowserBrowseUrl},label:b.imgAdd},{type:"vbox",align:"center",children:[{type:"html",align:"center",id:"framepreviewtitleid",style:"font-family: Amaranth; color: #1E66EB;\tfont-size: 20px; font-weight: bold;",html:b.previewMode},{type:"html",id:"framepreviewid",align:"center",style:"width:500px;height:320px",html:""},{type:"hbox",id:"imgparamsid",style:"display:none;width:500px;",height:"325px",children:[{type:"vbox",align:"center",width:"400px",children:[{type:"text",id:"imgtitleid",label:b.imgTitle,onChange:function(){x(this.getDialog(),this.getValue())},onBlur:function(){x(this.getDialog(),this.getValue())}},{type:"text",id:"imgdescid",label:b.imgDesc,onChange:function(){y(this.getDialog(),this.getValue())},onBlur:function(){y(this.getDialog(),this.getValue())}},{type:"html",id:"imgpreviewid",style:"width:400px;height:200px;",html:"<div>xx</div>"}]}]},{type:"hbox",align:"center",height:110,widths:["25%","50%"],children:[{type:"vbox",children:[{type:"checkbox",id:"autostartid",label:b.autoStart,default:"checked",style:"margin-top:15px;",onChange:G,commit:G,setup:F},{type:"checkbox",id:"showtitleid",label:b.showTitle,default:"checked",onChange:G,commit:G,setup:F},{type:"checkbox",id:"showcontrolid",label:b.showControls,default:"checked",onChange:G,commit:G,setup:F},{type:"checkbox",id:"showthumbid",label:b.showThumbs,default:"checked",onChange:G,commit:G,setup:F},{type:"checkbox",id:"openOnClickId",label:b.openOnClick,default:"checked",onChange:G,commit:G,setup:F}]},{type:"select",id:"imglistitemsid",label:b.picturesList,multiple:!1,style:"height:125px;width:250px",items:[],onChange:function(a){o(this)}},{type:"vbox",children:[{type:"button",id:"previewbtn",style:"margin-top:15px;margin-left:25px;",label:b.previewMode,onClick:function(){z(this.getDialog())}},{type:"button",id:"removeselectedbtn",style:"margin-left:25px;",label:b.imgDelete,onClick:function(){t(this.getDialog())}},{type:"button",id:"editselectedbtn",style:"margin-left:25px;",label:b.imgEdit,onClick:function(){s(this.getDialog())}},{type:"hbox",children:[{type:"button",id:"upselectedbtn",style:"width:32px; margin-left:25px;",label:b.arrowUp,onClick:function(){u(this.getDialog(),-1)}},{type:"button",id:"downselectedbtn",style:"width:32px;",label:b.arrowDown,onClick:function(){u(this.getDialog(),1)}}]}]}]},{type:"hbox",children:[{type:"text",id:"pictheightid",label:b.pictHeight,maxLength:3,style:"width:100px;",default:"300",onChange:function(a){var b=/^\d+$/;0==b.test(this.getValue())&&this.setValue(300),this.getDialog().params.updateVal(this.id,this.getValue()),n(this.getDialog())},commit:G,setup:F},{type:"text",id:"speedid",label:b.displayTime,maxLength:3,style:"width:100px;",default:"5",onChange:function(a){var b=/^\d+$/;0==b.test(this.getValue())&&this.setValue(5),this.getDialog().params.updateVal(this.id,this.getValue()),n(this.getDialog())},commit:G,setup:F},{type:"text",id:"animspeedid",label:b.transitionTime,style:"width:100px;",maxLength:4,default:"500",onChange:function(a){var b=/^\d+$/;0==b.test(this.getValue())&&this.setValue(500),this.getDialog().params.updateVal(this.id,this.getValue()),n(this.getDialog())},commit:G,setup:F},{type:"select",id:"transitiontypeid",label:b.transition,items:[[b.tr1,"none"],[b.tr2,"resize"],[b.tr3,"slide-vert"],[b.tr4,"slide-hori"],[b.tr5,"fade"]],default:"resize",style:"width:100px;",commit:G,setup:F,onChange:G}]}]}]}],onLoad:function(){},onShow:function(){this.dialog=this,this.slideshowDOM=null,this.openCloseStep=!0,this.fakeImage=null;var b=null;this.imagesList=[],this.params=[],this.previewImage=a.document.createElement("img"),this.okRefresh=!0;var c=this.getSelectedElement();if(c&&c.data("cke-real-element-type")&&"slideShow"==c.data("cke-real-element-type")&&(this.fakeImage=c,b=a.restoreRealElement(c)),b){this.slideshowDOM=b;var d=K(this,b);if(null==d)return alert("BIG Problem slideShowContainer !!"),!1;var e=b.getAttribute("id");if(null==e)return alert("BIG Problem slideshowid !!"),!1;this.params.push(["slideshowid",e]),C(this,d);var g,f=b.$.dataset;for(g in f)this.params.push([g,f[g]]);this.setupContent(this,!0),this.newSlideShowMode=!1}else this.params.push(["slideshowid",J("slideShow")]),D(this),this.commitContent(this);this.openCloseStep=!1,z(this)},onOk:function(){return!1},onHide:function(){H(this)}}});
|