(function(){function f(d){var e=this instanceof CKEDITOR.ui.dialog.checkbox;d.hasAttribute(this.id)&&(d=d.getAttribute(this.id),e?this.setValue(a[this.id]["true"]==d.toLowerCase()):this.setValue(d))}function b(e){var i=""===this.getValue(),g=this instanceof CKEDITOR.ui.dialog.checkbox,h=this.getValue();i?e.removeAttribute(this.att||this.id):g?e.setAttribute(this.id,a[this.id][h]):e.setAttribute(this.att||this.id,h)}var a={scrolling:{"true":"yes","false":"no"},frameborder:{"true":"1","false":"0"}};CKEDITOR.dialog.add("iframe",function(c){var g=c.lang.iframe,d=c.lang.common,h=c.plugins.dialogadvtab;return{title:g.title,minWidth:350,minHeight:260,onShow:function(){this.fakeImage=this.iframeNode=null;var e=this.getSelectedElement();e&&e.data("cke-real-element-type")&&"iframe"==e.data("cke-real-element-type")&&(this.fakeImage=e,this.iframeNode=e=c.restoreRealElement(e),this.setupContent(e))},onOk:function(){var e;e=this.fakeImage?this.iframeNode:new CKEDITOR.dom.element("iframe");var j={},i={};this.commitContent(e,j,i);e=c.createFakeElement(e,"cke_iframe","iframe",!0);e.setAttributes(i);e.setStyles(j);this.fakeImage?(e.replace(this.fakeImage),c.getSelection().selectElement(e)):c.insertElement(e)},contents:[{id:"info",label:d.generalTab,accessKey:"I",elements:[{type:"vbox",padding:0,children:[{id:"src",type:"text",label:d.url,required:!0,validate:CKEDITOR.dialog.validate.notEmpty(g.noUrl),setup:f,commit:b}]},{type:"hbox",children:[{id:"width",type:"text",requiredContent:"iframe[width]",style:"width:100%",labelLayout:"vertical",label:d.width,validate:CKEDITOR.dialog.validate.htmlLength(d.invalidHtmlLength.replace("%1",d.width)),setup:f,commit:b},{id:"height",type:"text",requiredContent:"iframe[height]",style:"width:100%",labelLayout:"vertical",label:d.height,validate:CKEDITOR.dialog.validate.htmlLength(d.invalidHtmlLength.replace("%1",d.height)),setup:f,commit:b},{id:"align",type:"select",requiredContent:"iframe[align]","default":"",items:[[d.notSet,""],[d.alignLeft,"left"],[d.alignRight,"right"],[d.alignTop,"top"],[d.alignMiddle,"middle"],[d.alignBottom,"bottom"]],style:"width:100%",labelLayout:"vertical",label:d.align,setup:function(i,e){f.apply(this,arguments);if(e){var j=e.getAttribute("align");this.setValue(j&&j.toLowerCase()||"")}},commit:function(i,e,j){b.apply(this,arguments);this.getValue()&&(j.align=this.getValue())}}]},{type:"hbox",widths:["50%","50%"],children:[{id:"scrolling",type:"checkbox",requiredContent:"iframe[scrolling]",label:g.scrolling,setup:f,commit:b},{id:"frameborder",type:"checkbox",requiredContent:"iframe[frameborder]",label:g.border,setup:f,commit:b}]},{type:"hbox",widths:["50%","50%"],children:[{id:"name",type:"text",requiredContent:"iframe[name]",label:d.name,setup:f,commit:b},{id:"title",type:"text",requiredContent:"iframe[title]",label:d.advisoryTitle,setup:f,commit:b}]},{id:"longdesc",type:"text",requiredContent:"iframe[longdesc]",label:d.longDescr,setup:f,commit:b}]},h&&h.createAdvancedTab(c,{id:1,classes:1,styles:1},"iframe")]}})})();