JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.4.1
[ckeditor.git] / _source / plugins / forms / dialogs / select.js
index ee5dbbd..7bd91e5 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.\r
+Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.\r
 For licensing, see LICENSE.html or http://ckeditor.com/license\r
 */\r
 CKEDITOR.dialog.add( 'select', function( editor )\r
@@ -73,7 +73,7 @@ CKEDITOR.dialog.add( 'select', function( editor )
        function removeAllOptions( combo )\r
        {\r
                combo = getSelect( combo );\r
-               while( combo.getChild( 0 ) && combo.getChild( 0 ).remove() )\r
+               while ( combo.getChild( 0 ) && combo.getChild( 0 ).remove() )\r
                { /*jsl:pass*/ }\r
        }\r
        // Moves the selected option by a number of steps (also negative).\r
@@ -161,12 +161,12 @@ CKEDITOR.dialog.add( 'select', function( editor )
 \r
                        if ( isInsertMode )\r
                        {\r
-                               editor.insertElement(element);\r
-                               if( CKEDITOR.env.ie )\r
+                               editor.insertElement( element );\r
+                               if ( CKEDITOR.env.ie )\r
                                {\r
                                        var sel = editor.getSelection(),\r
                                                bms = sel.createBookmarks();\r
-                                       setTimeout(function ()\r
+                                       setTimeout(function()\r
                                        {\r
                                                sel.selectBookmarks( bms );\r
                                        }, 0 );\r
@@ -193,7 +193,7 @@ CKEDITOR.dialog.add( 'select', function( editor )
                                                setup : function( name, element )\r
                                                {\r
                                                        if ( name == 'clear' )\r
-                                                               this.setValue( '' );\r
+                                                               this.setValue( this['default'] || '' );\r
                                                        else if ( name == 'select' )\r
                                                        {\r
                                                                this.setValue(\r