X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fforms%2Fdialogs%2Fhiddenfield.js;h=ce63239b6d836051348ea473885c99eb730f8dd3;hb=4e90e78dc97789709ee7404359a5517540c27553;hp=4d823b111fc210e1183768061c69f1dbb193ef5d;hpb=f8fc585c18d287eb325c575596d183122486b641;p=ckeditor.git diff --git a/_source/plugins/forms/dialogs/hiddenfield.js b/_source/plugins/forms/dialogs/hiddenfield.js index 4d823b1..ce63239 100644 --- a/_source/plugins/forms/dialogs/hiddenfield.js +++ b/_source/plugins/forms/dialogs/hiddenfield.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( 'hiddenfield', function( editor ) @@ -17,7 +17,7 @@ CKEDITOR.dialog.add( 'hiddenfield', function( editor ) selection = editor.getSelection(), element = selection.getSelectedElement(); - if ( element && element.getAttribute( '_cke_real_element_type' ) && element.getAttribute( '_cke_real_element_type' ) == 'hiddenfield' ) + if ( element && element.data( 'cke-real-element-type' ) && element.data( 'cke-real-element-type' ) == 'hiddenfield' ) { this.hiddenField = element; element = editor.restoreRealElement( this.hiddenField ); @@ -30,7 +30,9 @@ CKEDITOR.dialog.add( 'hiddenfield', function( editor ) var name = this.getValueOf( 'info', '_cke_saved_name' ), value = this.getValueOf( 'info', 'value' ), editor = this.getParentEditor(), - element = CKEDITOR.env.ie ? editor.document.createElement( '' ) : editor.document.createElement( 'input' ); + element = CKEDITOR.env.ie && !( CKEDITOR.document.$.documentMode >= 8 ) ? + editor.document.createElement( '' ) + : editor.document.createElement( 'input' ); element.setAttribute( 'type', 'hidden' ); this.commitContent( element ); @@ -59,7 +61,7 @@ CKEDITOR.dialog.add( 'hiddenfield', function( editor ) setup : function( element ) { this.setValue( - element.getAttribute( '_cke_saved_name' ) || + element.data( 'cke-saved-name' ) || element.getAttribute( 'name' ) || '' ); },