--- /dev/null
+/*\r
+Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.\r
+For licensing, see LICENSE.html or http://ckeditor.com/license\r
+*/\r
+\r
+(function()\r
+{\r
+ CKEDITOR.plugins.liststyle =\r
+ {\r
+ requires : [ 'dialog' ],\r
+ init : function( editor )\r
+ {\r
+ editor.addCommand( 'numberedListStyle', new CKEDITOR.dialogCommand( 'numberedListStyle' ) );\r
+ CKEDITOR.dialog.add( 'numberedListStyle', this.path + 'dialogs/liststyle.js' );\r
+ editor.addCommand( 'bulletedListStyle', new CKEDITOR.dialogCommand( 'bulletedListStyle' ) );\r
+ CKEDITOR.dialog.add( 'bulletedListStyle', this.path + 'dialogs/liststyle.js' );\r
+\r
+ // If the "menu" plugin is loaded, register the menu items.\r
+ if ( editor.addMenuItems )\r
+ {\r
+ //Register map group;\r
+ editor.addMenuGroup("list", 108);\r
+\r
+ editor.addMenuItems(\r
+ {\r
+ numberedlist :\r
+ {\r
+ label : editor.lang.list.numberedTitle,\r
+ group : 'list',\r
+ command: 'numberedListStyle'\r
+ },\r
+ bulletedlist :\r
+ {\r
+ label : editor.lang.list.bulletedTitle,\r
+ group : 'list',\r
+ command: 'bulletedListStyle'\r
+ }\r
+ });\r
+ }\r
+\r
+ // If the "contextmenu" plugin is loaded, register the listeners.\r
+ if ( editor.contextMenu )\r
+ {\r
+ editor.contextMenu.addListener( function( element, selection )\r
+ {\r
+ if ( !element || element.isReadOnly() )\r
+ return null;\r
+\r
+ while ( element )\r
+ {\r
+ var name = element.getName();\r
+ if ( name == 'ol' )\r
+ return { numberedlist: CKEDITOR.TRISTATE_OFF };\r
+ else if ( name == 'ul' )\r
+ return { bulletedlist: CKEDITOR.TRISTATE_OFF };\r
+\r
+ element = element.getParent();\r
+ }\r
+ return null;\r
+ });\r
+ }\r
+ }\r
+ };\r
+\r
+ CKEDITOR.plugins.add( 'liststyle', CKEDITOR.plugins.liststyle );\r
+})();\r