X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Frichcombo%2Fplugin.js;h=8c2e81ba0ac0bbfd79859e8e09840daa7ca17320;hb=059b4c2fef02528bf1af189f7996e80652faddfb;hp=522e864bb957b1a4262f2dd2404b4b87912a9276;hpb=7cd80714081a8ffdf4a1a8d2c72f120ed5ef3d6d;p=ckeditor.git diff --git a/_source/plugins/richcombo/plugin.js b/_source/plugins/richcombo/plugin.js index 522e864..8c2e81b 100644 --- a/_source/plugins/richcombo/plugin.js +++ b/_source/plugins/richcombo/plugin.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -44,6 +44,11 @@ CKEDITOR.ui.richCombo = CKEDITOR.tools.createClass( || CKEDITOR.document; panelDefinition.className = ( panelDefinition.className || '' ) + ' cke_rcombopanel'; + panelDefinition.block = + { + multiSelect : panelDefinition.multiSelect, + attributes : panelDefinition.attributes + }; this._ = { @@ -83,6 +88,8 @@ CKEDITOR.ui.richCombo = CKEDITOR.tools.createClass( */ render : function( editor, output ) { + var env = CKEDITOR.env; + var id = 'cke_' + this.id; var clickFn = CKEDITOR.tools.addFunction( function( $element ) { @@ -162,9 +169,11 @@ CKEDITOR.ui.richCombo = CKEDITOR.tools.createClass( output.push( ' class="', this.className, ' cke_off"'); output.push( - '>' + - '', this.label, '' + - '', + '', this.label, '', + '= 10900 && !env.hc ? '' : ' href="javascript:void(\'' + this.label + '\')"', + ' role="button" aria-labelledby="', id , '_label" aria-describedby="', id, '_text" aria-haspopup="true"' ); // Some browsers don't cancel key events in the keydown but in the // keypress. @@ -187,10 +196,9 @@ CKEDITOR.ui.richCombo = CKEDITOR.tools.createClass( ' onkeydown="CKEDITOR.tools.callFunction( ', keyDownFn, ', event, this );"' + ' onclick="CKEDITOR.tools.callFunction(', clickFn, ', this); return false;">' + '' + - '' + ( this.voiceLabel ? this.voiceLabel + ' ' : '' ) + '' + '' + this.label + '' + '' + - '' + + '' + ( CKEDITOR.env.hc ? '' : '' ) + '' + // BLACK DOWN-POINTING TRIANGLE '' + '' + '' ); @@ -207,9 +215,10 @@ CKEDITOR.ui.richCombo = CKEDITOR.tools.createClass( return; var panelDefinition = this._.panelDefinition, + panelBlockDefinition = this._.panelDefinition.block, panelParentElement = panelDefinition.parent || CKEDITOR.document.getBody(), panel = new CKEDITOR.ui.floatPanel( editor, panelParentElement, panelDefinition ), - list = panel.addListBlock( this.id, this.multiSelect ), + list = panel.addListBlock( this.id, panelBlockDefinition ), me = this; panel.onShow = function() @@ -290,6 +299,7 @@ CKEDITOR.ui.richCombo = CKEDITOR.tools.createClass( } else textElement.removeClass( 'cke_inline_label' ); + textElement.setHtml( typeof text != 'undefined' ? text : value ); },