app/assets/javascripts/ckeditor/_source/plugins/dialogui/plugin.js in refinerycms-ckeditor-0.1.4 vs app/assets/javascripts/ckeditor/_source/plugins/dialogui/plugin.js in refinerycms-ckeditor-0.2.0

- old
+ new

@@ -1,7 +1,7 @@ /* -Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** @fileoverview The "dialogui" plugin. */ @@ -222,11 +222,11 @@ if ( arguments.length < 3 ) return; initPrivateObject.call( this, elementDefinition ); var domId = this._.inputId = CKEDITOR.tools.getNextId() + '_textInput', - attributes = { 'class' : 'cke_dialog_ui_input_' + elementDefinition.type, id : domId, type : 'text' }, + attributes = { 'class' : 'cke_dialog_ui_input_' + elementDefinition.type, id : domId, type : elementDefinition.type }, i; // Set the validator, if any. if ( elementDefinition.validate ) this.validate = elementDefinition.validate; @@ -853,11 +853,13 @@ var legendLabel = elementDefinition.label; /** @ignore */ var innerHTML = function() { var html = []; - legendLabel && html.push( '<legend>' + legendLabel + '</legend>' ); + legendLabel && html.push( '<legend' + + ( elementDefinition.labelStyle ? ' style="' + elementDefinition.labelStyle + '"' : '' ) + + '>' + legendLabel + '</legend>' ); for ( var i = 0; i < childHtmlList.length; i++ ) html.push( childHtmlList[ i ] ); return html.join( '' ); }; @@ -967,10 +969,16 @@ eventProcessors : CKEDITOR.tools.extend( {}, CKEDITOR.ui.dialog.uiElement.prototype.eventProcessors, { /** @ignore */ onClick : function( dialog, func ) { - this.on( 'click', func ); + this.on( 'click', function() + { + // Some browsers (Chrome, IE8, IE7 compat mode) don't move + // focus to clicked button. Force this. + this.getElement().focus(); + func.apply( this, arguments ); + }); } }, true ), /** * Handler for the element's access key up event. Simulates a click to