X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fliststyle%2Fdialogs%2Fliststyle.js;h=43bd2e7848955439a0c594a728f28938890a7212;hb=48b1db88210b4160dce439c6e3e32e14af8c106b;hp=b874d53e1b01813b1c036d0ae2a1ac118f1fcda2;hpb=8665a7c6c60586526e32e8941fe2896739b6ebfb;p=ckeditor.git diff --git a/_source/plugins/liststyle/dialogs/liststyle.js b/_source/plugins/liststyle/dialogs/liststyle.js index b874d53..43bd2e7 100644 --- a/_source/plugins/liststyle/dialogs/liststyle.js +++ b/_source/plugins/liststyle/dialogs/liststyle.js @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. + * Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -12,7 +12,7 @@ catch( e ) { return null; } range.shrink( CKEDITOR.SHRINK_TEXT ); - return range.getCommonAncestor().getAscendant( listTag, true ); + return range.getCommonAncestor().getAscendant( listTag, 1 ); } var mapListStyle = { @@ -28,28 +28,31 @@ function listStyle( editor, startupPage ) { + var lang = editor.lang.list; if ( startupPage == 'bulletedListStyle' ) { return { - title : editor.lang.list.bulletedTitle, + title : lang.bulletedTitle, minWidth : 300, minHeight : 50, contents : [ { + id : 'info', + accessKey : 'I', elements : [ { type : 'select', - label : editor.lang.list.type, + label : lang.type, id : 'type', style : 'width: 150px; margin: auto;', items : [ - [ editor.lang.list.notset, '' ], - [ editor.lang.list.circle, 'circle' ], - [ editor.lang.list.disc, 'disc' ], - [ editor.lang.list.square, 'square' ] + [ lang.notset, '' ], + [ lang.circle, 'circle' ], + [ lang.disc, 'disc' ], + [ lang.square, 'square' ] ], setup : function( element ) { @@ -90,13 +93,36 @@ } else if ( startupPage == 'numberedListStyle' ) { + + var listStyleOptions = + [ + [ lang.notset, '' ], + [ lang.lowerRoman, 'lower-roman' ], + [ lang.upperRoman, 'upper-roman' ], + [ lang.lowerAlpha, 'lower-alpha' ], + [ lang.upperAlpha, 'upper-alpha' ], + [ lang.decimal, 'decimal' ] + ]; + + if ( !CKEDITOR.env.ie || CKEDITOR.env.version > 7 ) + { + listStyleOptions.concat( [ + [ lang.armenian, 'armenian' ], + [ lang.decimalLeadingZero, 'decimal-leading-zero' ], + [ lang.georgian, 'georgian' ], + [ lang.lowerGreek, 'lower-greek' ] + ]); + } + return { - title : editor.lang.list.numberedTitle, + title : lang.numberedTitle, minWidth : 300, minHeight : 50, contents : [ { + id : 'info', + accessKey : 'I', elements : [ { @@ -105,9 +131,10 @@ children : [ { - label : editor.lang.list.start, + label : lang.start, type : 'text', id : 'start', + validate : CKEDITOR.dialog.validate.integer( lang.validateStartNumber ), setup : function( element ) { var value = element.getAttribute( 'start' ) || 1; @@ -120,22 +147,10 @@ }, { type : 'select', - label : editor.lang.list.type, + label : lang.type, id : 'type', style : 'width: 100%;', - items : - [ - [ editor.lang.list.notset, '' ], - [ editor.lang.list.armenian, 'armenian' ], - [ editor.lang.list.georgian, 'georgian' ], - [ editor.lang.list.lowerRoman, 'lower-roman' ], - [ editor.lang.list.upperRoman, 'upper-roman' ], - [ editor.lang.list.lowerAlpha, 'lower-alpha' ], - [ editor.lang.list.upperAlpha, 'upper-alpha' ], - [ editor.lang.list.lowerGreek, 'lower-greek' ], - [ editor.lang.list.decimal, 'decimal' ], - [ editor.lang.list.decimalLeadingZero, 'decimal-leading-zero' ] - ], + items : listStyleOptions, setup : function( element ) { var value = element.getStyle( 'list-style-type' )