X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Frichcombo%2Fplugin.js;h=f79c1b31cc24f4534109e85a6391498808988f7d;hb=4e70ea24db840898be8cc21c950363a52a2a6aba;hp=7978abeb085dee6eb8f247db8ec5f2f0559bf008;hpb=48b1db88210b4160dce439c6e3e32e14af8c106b;p=ckeditor.git diff --git a/_source/plugins/richcombo/plugin.js b/_source/plugins/richcombo/plugin.js index 7978abe..f79c1b3 100644 --- a/_source/plugins/richcombo/plugin.js +++ b/_source/plugins/richcombo/plugin.js @@ -18,7 +18,7 @@ CKEDITOR.plugins.add( 'richcombo', * @constant * @example */ -CKEDITOR.UI_RICHCOMBO = 3; +CKEDITOR.UI_RICHCOMBO = 'richcombo'; CKEDITOR.ui.richCombo = CKEDITOR.tools.createClass( { @@ -128,12 +128,16 @@ CKEDITOR.ui.richCombo = CKEDITOR.tools.createClass( clickFn : clickFn }; - editor.on( 'mode', function() - { - this.setState( this.modes[ editor.mode ] ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED ); - this.setValue( '' ); - }, - this ); + function updateState() + { + var state = this.modes[ editor.mode ] ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED; + this.setState( editor.readOnly && !this.readOnly ? CKEDITOR.TRISTATE_DISABLED : state ); + this.setValue( '' ); + } + + editor.on( 'mode', updateState, this ); + // If this combo is sensitive to readOnly state, update it accordingly. + !this.readOnly && editor.on( 'readOnly', updateState, this); var keyDownFn = CKEDITOR.tools.addFunction( function( ev, element ) { @@ -161,14 +165,14 @@ CKEDITOR.ui.richCombo = CKEDITOR.tools.createClass( instance.keyDownFn = keyDownFn; output.push( - '', + '', '', + ' role="presentation">', '', this.label, '', '= 10900 && !env.hc ? '' : ' href="javascript:void(\'' + this.label + '\')"', @@ -197,7 +201,7 @@ CKEDITOR.ui.richCombo = CKEDITOR.tools.createClass( '' + '' + this.label + '' + '' + - '' + ( CKEDITOR.env.hc ? '' : CKEDITOR.env.air ? ' ' : '' ) + '' + // BLACK DOWN-POINTING TRIANGLE + '' + ( CKEDITOR.env.hc ? '▼' : CKEDITOR.env.air ? ' ' : '' ) + '' + // BLACK DOWN-POINTING TRIANGLE '' + '' + '' );