File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -102,9 +102,12 @@ CKEDITOR.plugins.add( 'colorbutton', {
102
102
function renderColors ( panel , type , colorBoxId ) {
103
103
var output = [ ] ,
104
104
colors = config . colorButton_colors . split ( ',' ) ,
105
+ // Tells if we should include "More Colors..." button.
106
+ moreColorsEnabled = editor . plugins . colordialog &&
107
+ ( config . colorButton_enableMore === undefined || config . colorButton_enableMore ) ,
105
108
// aria-setsize and aria-posinset attributes are used to indicate size of options, because
106
109
// screen readers doesn't play nice with table, based layouts (#12097).
107
- total = colors . length + ( config . colorButton_enableMore ? 2 : 1 ) ;
110
+ total = colors . length + ( moreColorsEnabled ? 2 : 1 ) ;
108
111
109
112
var clickFn = CKEDITOR . tools . addFunction ( function ( color , type ) {
110
113
if ( color == '?' ) {
@@ -198,7 +201,7 @@ CKEDITOR.plugins.add( 'colorbutton', {
198
201
}
199
202
200
203
// Render the "More Colors" button.
201
- if ( editor . plugins . colordialog && config . colorButton_enableMore === undefined || config . colorButton_enableMore ) {
204
+ if ( moreColorsEnabled ) {
202
205
output . push ( '</tr>' +
203
206
'<tr>' +
204
207
'<td colspan=8 align=center>' +
You can’t perform that action at this time.
0 commit comments