JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.4.2
[ckeditor.git] / plugins / liststyle / dialogs / liststyle.js
index 3a099e8..4829b7e 100644 (file)
@@ -3,5 +3,4 @@ Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license\r
 */\r
 \r
-(function(){function a(d,e){var f;try{f=d.getSelection().getRanges()[0];}catch(g){return null;}f.shrink(CKEDITOR.SHRINK_TEXT);return f.getCommonAncestor().getAscendant(e,true);};var b={a:'lower-alpha',A:'upper-alpha',i:'lower-roman',I:'upper-roman',1:'decimal',disc:'disc',circle:'circle',square:'square'};function c(d,e){if(e=='bulletedListStyle')return{title:d.lang.list.bulletedTitle,minWidth:300,minHeight:50,contents:[{id:'info',accessKey:'I',elements:[{type:'select',label:d.lang.list.type,id:'type',style:'width: 150px; margin: auto;',items:[[d.lang.list.notset,''],[d.lang.list.circle,'circle'],[d.lang.list.disc,'disc'],[d.lang.list.square,'square']],setup:function(g){var h=g.getStyle('list-style-type')||b[g.getAttribute('type')]||g.getAttribute('type')||'';this.setValue(h);},commit:function(g){var h=this.getValue();if(h)g.setStyle('list-style-type',h);else g.removeStyle('list-style-type');}}]}],onShow:function(){var g=this.getParentEditor(),h=a(g,'ul');h&&this.setupContent(h);},onOk:function(){var g=this.getParentEditor(),h=a(g,'ul');h&&this.commitContent(h);}};else if(e=='numberedListStyle'){var f=[[d.lang.list.notset,''],[d.lang.list.lowerRoman,'lower-roman'],[d.lang.list.upperRoman,'upper-roman'],[d.lang.list.lowerAlpha,'lower-alpha'],[d.lang.list.upperAlpha,'upper-alpha'],[d.lang.list.decimal,'decimal']];if(!CKEDITOR.env.ie||CKEDITOR.env.version>7)f.concat([[d.lang.list.armenian,'armenian'],[d.lang.list.decimalLeadingZero,'decimal-leading-zero'],[d.lang.list.georgian,'georgian'],[d.lang.list.lowerGreek,'lower-greek']]);return{title:d.lang.list.numberedTitle,minWidth:300,minHeight:50,contents:[{id:'info',accessKey:'I',elements:[{type:'hbox',widths:['25%','75%'],children:[{label:d.lang.list.start,type:'text',id:'start',validate:CKEDITOR.dialog.validate.integer(d.lang.list.validateStartNumber),setup:function(g){var h=g.getAttribute('start')||1;h&&this.setValue(h);},commit:function(g){g.setAttribute('start',this.getValue());}},{type:'select',label:d.lang.list.type,id:'type',style:'width: 100%;',items:f,setup:function(g){var h=g.getStyle('list-style-type')||b[g.getAttribute('type')]||g.getAttribute('type')||'';this.setValue(h);},commit:function(g){var h=this.getValue();if(h)g.setStyle('list-style-type',h);else g.removeStyle('list-style-type');}}]}]}],onShow:function(){var g=this.getParentEditor(),h=a(g,'ol');h&&this.setupContent(h);},onOk:function(){var g=this.getParentEditor(),h=a(g,'ol');h&&this.commitContent(h);}};}};CKEDITOR.dialog.add('numberedListStyle',function(d){return c(d,'numberedListStyle');\r
-});CKEDITOR.dialog.add('bulletedListStyle',function(d){return c(d,'bulletedListStyle');});})();\r
+(function(){function a(d,e){var f;try{f=d.getSelection().getRanges()[0];}catch(g){return null;}f.shrink(CKEDITOR.SHRINK_TEXT);return f.getCommonAncestor().getAscendant(e,1);};var b={a:'lower-alpha',A:'upper-alpha',i:'lower-roman',I:'upper-roman',1:'decimal',disc:'disc',circle:'circle',square:'square'};function c(d,e){var f=d.lang.list;if(e=='bulletedListStyle')return{title:f.bulletedTitle,minWidth:300,minHeight:50,contents:[{id:'info',accessKey:'I',elements:[{type:'select',label:f.type,id:'type',style:'width: 150px; margin: auto;',items:[[f.notset,''],[f.circle,'circle'],[f.disc,'disc'],[f.square,'square']],setup:function(h){var i=h.getStyle('list-style-type')||b[h.getAttribute('type')]||h.getAttribute('type')||'';this.setValue(i);},commit:function(h){var i=this.getValue();if(i)h.setStyle('list-style-type',i);else h.removeStyle('list-style-type');}}]}],onShow:function(){var h=this.getParentEditor(),i=a(h,'ul');i&&this.setupContent(i);},onOk:function(){var h=this.getParentEditor(),i=a(h,'ul');i&&this.commitContent(i);}};else if(e=='numberedListStyle'){var g=[[f.notset,''],[f.lowerRoman,'lower-roman'],[f.upperRoman,'upper-roman'],[f.lowerAlpha,'lower-alpha'],[f.upperAlpha,'upper-alpha'],[f.decimal,'decimal']];if(!CKEDITOR.env.ie||CKEDITOR.env.version>7)g.concat([[f.armenian,'armenian'],[f.decimalLeadingZero,'decimal-leading-zero'],[f.georgian,'georgian'],[f.lowerGreek,'lower-greek']]);return{title:f.numberedTitle,minWidth:300,minHeight:50,contents:[{id:'info',accessKey:'I',elements:[{type:'hbox',widths:['25%','75%'],children:[{label:f.start,type:'text',id:'start',validate:CKEDITOR.dialog.validate.integer(f.validateStartNumber),setup:function(h){var i=h.getAttribute('start')||1;i&&this.setValue(i);},commit:function(h){h.setAttribute('start',this.getValue());}},{type:'select',label:f.type,id:'type',style:'width: 100%;',items:g,setup:function(h){var i=h.getStyle('list-style-type')||b[h.getAttribute('type')]||h.getAttribute('type')||'';this.setValue(i);},commit:function(h){var i=this.getValue();if(i)h.setStyle('list-style-type',i);else h.removeStyle('list-style-type');}}]}]}],onShow:function(){var h=this.getParentEditor(),i=a(h,'ol');i&&this.setupContent(i);},onOk:function(){var h=this.getParentEditor(),i=a(h,'ol');i&&this.commitContent(i);}};}};CKEDITOR.dialog.add('numberedListStyle',function(d){return c(d,'numberedListStyle');});CKEDITOR.dialog.add('bulletedListStyle',function(d){return c(d,'bulletedListStyle');});})();\r