X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fdialogui%2Fplugin.js;h=888c015445e60bcb8eb127b237cf43ba82d9d9e9;hb=a272c66d841421f8bf933c16535bdcde1c4649fc;hp=963c80c45d6030d1cd7345da7867c864edc2889b;hpb=2f22c0c38f17e75be5541089076885442aaa2377;p=ckeditor.git diff --git a/_source/plugins/dialogui/plugin.js b/_source/plugins/dialogui/plugin.js index 963c80c..888c015 100644 --- a/_source/plugins/dialogui/plugin.js +++ b/_source/plugins/dialogui/plugin.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -157,7 +157,7 @@ CKEDITOR.plugins.add( 'dialogui' ); if ( elementDefinition.labelLayout != 'horizontal' ) html.push( '', @@ -240,30 +240,6 @@ CKEDITOR.plugins.add( 'dialogui' ); if ( elementDefinition.inputStyle ) attributes.style = elementDefinition.inputStyle; - // If user presses Enter in a text box, it implies clicking OK for the dialog. - var me = this, keyPressedOnMe = false; - dialog.on( 'load', function() - { - me.getInputElement().on( 'keydown', function( evt ) - { - if ( evt.data.getKeystroke() == 13 ) - keyPressedOnMe = true; - } ); - - // Lower the priority this 'keyup' since 'ok' will close the dialog.(#3749) - me.getInputElement().on( 'keyup', function( evt ) - { - if ( evt.data.getKeystroke() == 13 && keyPressedOnMe ) - { - dialog.getButton( 'ok' ) && setTimeout( function () - { - dialog.getButton( 'ok' ).click(); - }, 0 ); - keyPressedOnMe = false; - } - }, null, null, 1000 ); - } ); - /** @ignore */ var innerHTML = function() { @@ -677,6 +653,7 @@ CKEDITOR.plugins.add( 'dialogui' ); ' frameborder="0"' + ' allowtransparency="0"' + ' class="cke_dialog_ui_input_file"' + + ' role="presentation"' + ' id="', _.frameId, '"' + ' title="', elementDefinition.label, '"' + ' src="javascript:void(' ]; @@ -1205,7 +1182,7 @@ CKEDITOR.plugins.add( 'dialogui' ); { onChange : function( dialog, func ) { - if ( !CKEDITOR.env.ie ) + if ( !CKEDITOR.env.ie || ( CKEDITOR.env.version > 8 ) ) return commonEventProcessors.onChange.apply( this, arguments ); else { @@ -1443,11 +1420,17 @@ CKEDITOR.plugins.add( 'dialogui' ); if ( elementDefinition.size ) size = elementDefinition.size - ( CKEDITOR.env.ie ? 7 : 0 ); // "Browse" button is bigger in IE. + var inputId = _.frameId + '_input'; + frameDocument.$.write( [ '', '
', - '', + CKEDITOR.tools.htmlEncode( elementDefinition.label ), + '', + '