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