X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fforms%2Fdialogs%2Fselect.js;h=fc66d0a8424b1a72a134f31494d73918d259dc85;hb=48b1db88210b4160dce439c6e3e32e14af8c106b;hp=228a05ee02e3fa11f9884bfb016b4e7aef7a81eb;hpb=c6e377a02b54abc07129d72b632763c727476a15;p=ckeditor.git diff --git a/_source/plugins/forms/dialogs/select.js b/_source/plugins/forms/dialogs/select.js index 228a05e..fc66d0a 100644 --- a/_source/plugins/forms/dialogs/select.js +++ b/_source/plugins/forms/dialogs/select.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 */ CKEDITOR.dialog.add( 'select', function( editor ) @@ -161,12 +161,12 @@ CKEDITOR.dialog.add( 'select', function( editor ) if ( isInsertMode ) { - editor.insertElement(element); + editor.insertElement( element ); if ( CKEDITOR.env.ie ) { var sel = editor.getSelection(), bms = sel.createBookmarks(); - setTimeout(function () + setTimeout(function() { sel.selectBookmarks( bms ); }, 0 ); @@ -193,11 +193,11 @@ CKEDITOR.dialog.add( 'select', function( editor ) setup : function( name, element ) { if ( name == 'clear' ) - this.setValue( '' ); + this.setValue( this[ 'default' ] || '' ); else if ( name == 'select' ) { this.setValue( - element.getAttribute( '_cke_saved_name' ) || + element.data( 'cke-saved-name' ) || element.getAttribute( 'name' ) || '' ); } @@ -205,10 +205,10 @@ CKEDITOR.dialog.add( 'select', function( editor ) commit : function( element ) { if ( this.getValue() ) - element.setAttribute( '_cke_saved_name', this.getValue() ); + element.data( 'cke-saved-name', this.getValue() ); else { - element.removeAttribute( '_cke_saved_name' ) ; + element.data( 'cke-saved-name', false ); element.removeAttribute( 'name' ); } }