(function(){function f(d,c){var b;try{b=d.getSelection().getRanges()[0]}catch(a){return null}b.shrink(CKEDITOR.SHRINK_TEXT);return b.getCommonAncestor().getAscendant(c,1)}var e=function(a){return a.type==CKEDITOR.NODE_ELEMENT&&a.is("li")},h={a:"lower-alpha",A:"upper-alpha",i:"lower-roman",I:"upper-roman",1:"decimal",disc:"disc",circle:"circle",square:"square"};function g(d,c){var b=d.lang.list;if(c=="bulletedListStyle"){return{title:b.bulletedTitle,minWidth:300,minHeight:50,contents:[{id:"info",accessKey:"I",elements:[{type:"select",label:b.type,id:"type",align:"center",style:"width:150px",items:[[b.notset,""],[b.circle,"circle"],[b.disc,"disc"],[b.square,"square"]],setup:function(l){var k=l.getStyle("list-style-type")||h[l.getAttribute("type")]||l.getAttribute("type")||"";this.setValue(k)},commit:function(l){var k=this.getValue();if(k){l.setStyle("list-style-type",k)}else{l.removeStyle("list-style-type")}}}]}],onShow:function(){var l=this.getParentEditor(),k=f(l,"ul");k&&this.setupContent(k)},onOk:function(){var l=this.getParentEditor(),k=f(l,"ul");k&&this.commitContent(k)}}}else{if(c=="numberedListStyle"){var a=[[b.notset,""],[b.lowerRoman,"lower-roman"],[b.upperRoman,"upper-roman"],[b.lowerAlpha,"lower-alpha"],[b.upperAlpha,"upper-alpha"],[b.decimal,"decimal"]];if(!CKEDITOR.env.ie||CKEDITOR.env.version>7){a.concat([[b.armenian,"armenian"],[b.decimalLeadingZero,"decimal-leading-zero"],[b.georgian,"georgian"],[b.lowerGreek,"lower-greek"]])}return{title:b.numberedTitle,minWidth:300,minHeight:50,contents:[{id:"info",accessKey:"I",elements:[{type:"hbox",widths:["25%","75%"],children:[{label:b.start,type:"text",id:"start",validate:CKEDITOR.dialog.validate.integer(b.validateStartNumber),setup:function(l){var k=l.getFirst(e).getAttribute("value")||l.getAttribute("start")||1;k&&this.setValue(k)},commit:function(t){var s=t.getFirst(e),r=s.getAttribute("value")||t.getAttribute("start")||1;t.getFirst(e).removeAttribute("value");var q=parseInt(this.getValue(),10);if(isNaN(q)){t.removeAttribute("start")}else{t.setAttribute("start",q)}var p=s,v=r,u=isNaN(q)?1:q;while((p=p.getNext(e))&&v++){if(p.getAttribute("value")==v){p.setAttribute("value",u+v-r)}}}},{type:"select",label:b.type,id:"type",style:"width: 100%;",items:a,setup:function(l){var k=l.getStyle("list-style-type")||h[l.getAttribute("type")]||l.getAttribute("type")||"";this.setValue(k)},commit:function(l){var k=this.getValue();if(k){l.setStyle("list-style-type",k)}else{l.removeStyle("list-style-type")}}}]}]}],onShow:function(){var l=this.getParentEditor(),k=f(l,"ol");k&&this.setupContent(k)},onOk:function(){var l=this.getParentEditor(),k=f(l,"ol");k&&this.commitContent(k)}}}}}CKEDITOR.dialog.add("numberedListStyle",function(a){return g(a,"numberedListStyle")});CKEDITOR.dialog.add("bulletedListStyle",function(a){return g(a,"bulletedListStyle")})})();