Ticket #5150: 5150_2.patch
File 5150_2.patch, 2.2 KB (added by , 14 years ago) |
---|
-
_source/plugins/colorbutton/plugin.js
122 122 if ( ( i % 8 ) === 0 ) 123 123 output.push( '</tr><tr>' ); 124 124 125 var colorCode = colors[ i ]; 125 var parts = colors[ i ].split( '/' ), 126 colorName = parts[ 0 ], 127 colorCode = parts[ 1 ] || colorName; 128 if (!parts[1]) 129 colorName = '#' + colorName; 130 126 131 var colorLabel = editor.lang.colors[ colorCode ] || colorCode; 127 132 output.push( 128 133 '<td>' + 129 134 '<a class="cke_colorbox" _cke_focus=1 hidefocus=true' + 130 135 ' title="', colorLabel, '"' + 131 ' onclick="CKEDITOR.tools.callFunction(', clickFn, ',\' #', colorCode, '\',\'', type, '\'); return false;"' +136 ' onclick="CKEDITOR.tools.callFunction(', clickFn, ',\'', colorName, '\',\'', type, '\'); return false;"' + 132 137 ' href="javascript:void(\'', colorLabel, '\')"' + 133 138 ' role="option" aria-posinset="', ( i + 2 ), '" aria-setsize="', total, '">' + 134 139 '<span class="cke_colorbox" style="background-color:#', colorCode, '"></span>' + … … 172 177 /** 173 178 * Defines the colors to be displayed in the color selectors. It's a string 174 179 * containing the hexadecimal notation for HTML colors, without the "#" prefix. 180 * 181 * Since 3.3: A name may be optionally defined by prefixing the entries with the 182 * name and the slash character. For example, "FontColor1/FF9900" will be 183 * displayed as the color #FF9900 in the selector, but will be outputted as "FontColor1". 175 184 * @type String 176 185 * @default '000,800000,8B4513,2F4F4F,008080,000080,4B0082,696969,B22222,A52A2A,DAA520,006400,40E0D0,0000CD,800080,808080,F00,FF8C00,FFD700,008000,0FF,00F,EE82EE,A9A9A9,FFA07A,FFA500,FFFF00,00FF00,AFEEEE,ADD8E6,DDA0DD,D3D3D3,FFF0F5,FAEBD7,FFFFE0,F0FFF0,F0FFFF,F0F8FF,E6E6FA,FFF' 177 186 * @example 178 187 * // Brazil colors only. 179 188 * config.colorButton_colors = '00923E,F8C100,28166F'; 189 * @example 190 * config.colorButton_colors = 'FontColor1/FF9900,FontColor2/0066CC,FontColor3/F00' 180 191 */ 181 192 CKEDITOR.config.colorButton_colors = 182 193 '000,800000,8B4513,2F4F4F,008080,000080,4B0082,696969,' +