JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.2
[ckeditor.git] / _source / plugins / richcombo / plugin.js
index e93a351..8c2e81b 100644 (file)
@@ -44,6 +44,11 @@ CKEDITOR.ui.richCombo = CKEDITOR.tools.createClass(
                                                || CKEDITOR.document;\r
 \r
                panelDefinition.className = ( panelDefinition.className || '' ) + ' cke_rcombopanel';\r
+               panelDefinition.block =\r
+               {\r
+                       multiSelect : panelDefinition.multiSelect,\r
+                       attributes : panelDefinition.attributes\r
+               };\r
 \r
                this._ =\r
                {\r
@@ -83,6 +88,8 @@ CKEDITOR.ui.richCombo = CKEDITOR.tools.createClass(
                 */\r
                render : function( editor, output )\r
                {\r
+                       var env = CKEDITOR.env;\r
+\r
                        var id = 'cke_' + this.id;\r
                        var clickFn = CKEDITOR.tools.addFunction( function( $element )\r
                                {\r
@@ -162,9 +169,11 @@ CKEDITOR.ui.richCombo = CKEDITOR.tools.createClass(
                                output.push( ' class="', this.className, ' cke_off"');\r
 \r
                        output.push(\r
-                               '>' +\r
-                                       '<span class=cke_label>', this.label, '</span>' +\r
-                                       '<a hidefocus=true title="', this.title, '" tabindex="-1" href="javascript:void(\'', this.label, '\')"' );\r
+                               '>',\r
+                                       '<span id="' + id+ '_label" class=cke_label>', this.label, '</span>',\r
+                                       '<a hidefocus=true title="', this.title, '" tabindex="-1"',\r
+                                               env.gecko && env.version >= 10900 && !env.hc ? '' : ' href="javascript:void(\'' + this.label + '\')"',\r
+                                               ' role="button" aria-labelledby="', id , '_label" aria-describedby="', id, '_text" aria-haspopup="true"' );\r
 \r
                        // Some browsers don't cancel key events in the keydown but in the\r
                        // keypress.\r
@@ -187,10 +196,9 @@ CKEDITOR.ui.richCombo = CKEDITOR.tools.createClass(
                                        ' onkeydown="CKEDITOR.tools.callFunction( ', keyDownFn, ', event, this );"' +\r
                                        ' onclick="CKEDITOR.tools.callFunction(', clickFn, ', this); return false;">' +\r
                                                '<span>' +\r
-                                                       '<span class="cke_accessibility">' + ( this.voiceLabel ? this.voiceLabel + ' ' : '' ) + '</span>' +\r
                                                        '<span id="' + id + '_text" class="cke_text cke_inline_label">' + this.label + '</span>' +\r
                                                '</span>' +\r
-                                               '<span class=cke_openbutton></span>' +\r
+                                               '<span class=cke_openbutton>' + ( CKEDITOR.env.hc ? '<span>&#9660;</span>' : '' ) + '</span>' + // BLACK DOWN-POINTING TRIANGLE\r
                                        '</a>' +\r
                                '</span>' +\r
                                '</span>' );\r
@@ -207,9 +215,10 @@ CKEDITOR.ui.richCombo = CKEDITOR.tools.createClass(
                                return;\r
 \r
                        var panelDefinition = this._.panelDefinition,\r
+                               panelBlockDefinition = this._.panelDefinition.block,\r
                                panelParentElement = panelDefinition.parent || CKEDITOR.document.getBody(),\r
                                panel = new CKEDITOR.ui.floatPanel( editor, panelParentElement, panelDefinition ),\r
-                               list = panel.addListBlock( this.id, this.multiSelect ),\r
+                               list = panel.addListBlock( this.id, panelBlockDefinition ),\r
                                me = this;\r
 \r
                        panel.onShow = function()\r
@@ -290,6 +299,7 @@ CKEDITOR.ui.richCombo = CKEDITOR.tools.createClass(
                        }\r
                        else\r
                                textElement.removeClass( 'cke_inline_label' );\r
+\r
                        textElement.setHtml( typeof text != 'undefined' ? text : value );\r
                },\r
 \r