X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fdialogadvtab%2Fplugin.js;h=ad111ffc480e727c6b13ca4d46b1af1963ac50e7;hb=f0610347140239143439a511ee2bd48cb784f470;hp=434911c4dc34f09488959eb4d900465a29c255a4;hpb=e371ddf8abcb89013e20e6d0dd746adec344d0e5;p=ckeditor.git diff --git a/_source/plugins/dialogadvtab/plugin.js b/_source/plugins/dialogadvtab/plugin.js index 434911c..ad111ff 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( { @@ -138,18 +136,12 @@ CKEDITOR.plugins.add( 'dialogadvtab', 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 +159,8 @@ CKEDITOR.plugins.add( 'dialogadvtab', styles += name + ': ' + value; } - this.setValue( styles ); + this.setValue( styles, 1 ); - isUpdating = 0; }, setup : setupAdvParams,