X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fdialogadvtab%2Fplugin.js;h=bd8aa7fd26201a25a42f1043d121877403d8f458;hb=e73319a12b56100b29ef456fd74114fe5519e01c;hp=434911c4dc34f09488959eb4d900465a29c255a4;hpb=e371ddf8abcb89013e20e6d0dd746adec344d0e5;p=ckeditor.git diff --git a/_source/plugins/dialogadvtab/plugin.js b/_source/plugins/dialogadvtab/plugin.js index 434911c..bd8aa7f 100644 --- a/_source/plugins/dialogadvtab/plugin.js +++ b/_source/plugins/dialogadvtab/plugin.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 */ @@ -43,8 +43,6 @@ function commitAdvParams() } } -var isUpdating; - CKEDITOR.plugins.add( 'dialogadvtab', { /** @@ -62,8 +60,8 @@ CKEDITOR.plugins.add( 'dialogadvtab', var result = { id : 'advanced', - label : lang.advanced, - title : lang.advanced, + label : lang.advancedTab, + title : lang.advancedTab, elements : [ { @@ -100,7 +98,7 @@ CKEDITOR.plugins.add( 'dialogadvtab', type : 'select', label : lang.langDir, 'default' : '', - style : 'width:110px', + style : 'width:100%', items : [ [ lang.notSet, '' ], @@ -124,7 +122,7 @@ CKEDITOR.plugins.add( 'dialogadvtab', { contents = []; - if ( tabConfig.id ) + if ( tabConfig.styles ) { contents.push( { @@ -134,22 +132,17 @@ CKEDITOR.plugins.add( 'dialogadvtab', label : lang.styles, 'default' : '', + validate : CKEDITOR.dialog.validate.inlineStyle( lang.invalidInlineStyle ), onChange : function(){}, getStyle : function( name, defaultValue ) { - var match = this.getValue().match( new RegExp( name + '\\s*:\s*([^;]*)', 'i') ); + var match = this.getValue().match( new RegExp( name + '\\s*:\\s*([^;]*)', 'i') ); return match ? match[ 1 ] : defaultValue; }, updateStyle : function( name, value ) { - if ( isUpdating ) - return; - - // Flag to avoid recursion. - isUpdating = 1; - var styles = this.getValue(); // Remove the current value. @@ -167,9 +160,8 @@ CKEDITOR.plugins.add( 'dialogadvtab', styles += name + ': ' + value; } - this.setValue( styles ); + this.setValue( styles, 1 ); - isUpdating = 0; }, setup : setupAdvParams,