diff options
Diffstat (limited to 'sources/plugins/toolbar/plugin.js')
-rw-r--r-- | sources/plugins/toolbar/plugin.js | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/sources/plugins/toolbar/plugin.js b/sources/plugins/toolbar/plugin.js index 93e6e35..fc19359 100644 --- a/sources/plugins/toolbar/plugin.js +++ b/sources/plugins/toolbar/plugin.js | |||
@@ -1,5 +1,5 @@ | |||
1 | /** | 1 | /** |
2 | * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved. | 2 | * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. |
3 | * For licensing, see LICENSE.md or http://ckeditor.com/license | 3 | * For licensing, see LICENSE.md or http://ckeditor.com/license |
4 | */ | 4 | */ |
5 | 5 | ||
@@ -34,7 +34,7 @@ | |||
34 | if ( editor.toolbox ) { | 34 | if ( editor.toolbox ) { |
35 | editor.toolbox.focusCommandExecuted = true; | 35 | editor.toolbox.focusCommandExecuted = true; |
36 | 36 | ||
37 | // Make the first button focus accessible for IE. (#3417) | 37 | // Make the first button focus accessible for IE. (http://dev.ckeditor.com/ticket/3417) |
38 | // Adobe AIR instead need while of delay. | 38 | // Adobe AIR instead need while of delay. |
39 | if ( CKEDITOR.env.ie || CKEDITOR.env.air ) { | 39 | if ( CKEDITOR.env.ie || CKEDITOR.env.air ) { |
40 | setTimeout( function() { | 40 | setTimeout( function() { |
@@ -51,7 +51,7 @@ | |||
51 | CKEDITOR.plugins.add( 'toolbar', { | 51 | CKEDITOR.plugins.add( 'toolbar', { |
52 | requires: 'button', | 52 | requires: 'button', |
53 | // jscs:disable maximumLineLength | 53 | // jscs:disable maximumLineLength |
54 | lang: 'af,ar,bg,bn,bs,ca,cs,cy,da,de,de-ch,el,en,en-au,en-ca,en-gb,eo,es,et,eu,fa,fi,fo,fr,fr-ca,gl,gu,he,hi,hr,hu,id,is,it,ja,ka,km,ko,ku,lt,lv,mk,mn,ms,nb,nl,no,pl,pt,pt-br,ro,ru,si,sk,sl,sq,sr,sr-latn,sv,th,tr,tt,ug,uk,vi,zh,zh-cn', // %REMOVE_LINE_CORE% | 54 | lang: 'af,ar,az,bg,bn,bs,ca,cs,cy,da,de,de-ch,el,en,en-au,en-ca,en-gb,eo,es,es-mx,et,eu,fa,fi,fo,fr,fr-ca,gl,gu,he,hi,hr,hu,id,is,it,ja,ka,km,ko,ku,lt,lv,mk,mn,ms,nb,nl,no,oc,pl,pt,pt-br,ro,ru,si,sk,sl,sq,sr,sr-latn,sv,th,tr,tt,ug,uk,vi,zh,zh-cn', // %REMOVE_LINE_CORE% |
55 | // jscs:enable maximumLineLength | 55 | // jscs:enable maximumLineLength |
56 | 56 | ||
57 | init: function( editor ) { | 57 | init: function( editor ) { |
@@ -118,10 +118,6 @@ | |||
118 | return false; | 118 | return false; |
119 | case 40: // DOWN-ARROW | 119 | case 40: // DOWN-ARROW |
120 | if ( item.button && item.button.hasArrow ) { | 120 | if ( item.button && item.button.hasArrow ) { |
121 | // Note: code is duplicated in plugins\richcombo\plugin.js in keyDownFn(). | ||
122 | editor.once( 'panelShow', function( evt ) { | ||
123 | evt.data._.panel._.currentBlock.onKeyDown( 40 ); | ||
124 | } ); | ||
125 | item.execute(); | 121 | item.execute(); |
126 | } else { | 122 | } else { |
127 | // Send left arrow key. | 123 | // Send left arrow key. |
@@ -190,20 +186,22 @@ | |||
190 | output.push( '<span class="cke_toolbox_main"' + ( expanded ? '>' : ' style="display:none">' ) ); | 186 | output.push( '<span class="cke_toolbox_main"' + ( expanded ? '>' : ' style="display:none">' ) ); |
191 | 187 | ||
192 | var toolbars = editor.toolbox.toolbars, | 188 | var toolbars = editor.toolbox.toolbars, |
193 | toolbar = getToolbarConfig( editor ); | 189 | toolbar = getToolbarConfig( editor ), |
190 | toolbarLength = toolbar.length; | ||
194 | 191 | ||
195 | for ( var r = 0; r < toolbar.length; r++ ) { | 192 | for ( var r = 0; r < toolbarLength; r++ ) { |
196 | var toolbarId, | 193 | var toolbarId, |
197 | toolbarObj = 0, | 194 | toolbarObj = 0, |
198 | toolbarName, | 195 | toolbarName, |
199 | row = toolbar[ r ], | 196 | row = toolbar[ r ], |
197 | lastToolbarInRow = row !== '/' && ( toolbar[ r + 1 ] === '/' || r == toolbarLength - 1 ), | ||
200 | items; | 198 | items; |
201 | 199 | ||
202 | // It's better to check if the row object is really | 200 | // It's better to check if the row object is really |
203 | // available because it's a common mistake to leave | 201 | // available because it's a common mistake to leave |
204 | // an extra comma in the toolbar definition | 202 | // an extra comma in the toolbar definition |
205 | // settings, which leads on the editor not loading | 203 | // settings, which leads on the editor not loading |
206 | // at all in IE. (#3983) | 204 | // at all in IE. (http://dev.ckeditor.com/ticket/3983) |
207 | if ( !row ) | 205 | if ( !row ) |
208 | continue; | 206 | continue; |
209 | 207 | ||
@@ -244,7 +242,8 @@ | |||
244 | toolbarName = row.name && ( editor.lang.toolbar.toolbarGroups[ row.name ] || row.name ); | 242 | toolbarName = row.name && ( editor.lang.toolbar.toolbarGroups[ row.name ] || row.name ); |
245 | 243 | ||
246 | // Output the toolbar opener. | 244 | // Output the toolbar opener. |
247 | output.push( '<span id="', toolbarId, '" class="cke_toolbar"', ( toolbarName ? ' aria-labelledby="' + toolbarId + '_label"' : '' ), ' role="toolbar">' ); | 245 | output.push( '<span id="', toolbarId, '" class="cke_toolbar' + ( lastToolbarInRow ? ' cke_toolbar_last"' : '"' ), |
246 | ( toolbarName ? ' aria-labelledby="' + toolbarId + '_label"' : '' ), ' role="toolbar">' ); | ||
248 | 247 | ||
249 | // If a toolbar name is available, send the voice label. | 248 | // If a toolbar name is available, send the voice label. |
250 | toolbarName && output.push( '<span id="', toolbarId, '_label" class="cke_voice_label">', toolbarName, '</span>' ); | 249 | toolbarName && output.push( '<span id="', toolbarId, '_label" class="cke_voice_label">', toolbarName, '</span>' ); |
@@ -284,7 +283,7 @@ | |||
284 | itemObj.toolbar = toolbarObj; | 283 | itemObj.toolbar = toolbarObj; |
285 | itemObj.onkey = itemKeystroke; | 284 | itemObj.onkey = itemKeystroke; |
286 | 285 | ||
287 | // Fix for #3052: | 286 | // Fix for http://dev.ckeditor.com/ticket/3052: |
288 | // Prevent JAWS from focusing the toolbar after document load. | 287 | // Prevent JAWS from focusing the toolbar after document load. |
289 | itemObj.onfocus = function() { | 288 | itemObj.onfocus = function() { |
290 | if ( !editor.toolbox.focusCommandExecuted ) | 289 | if ( !editor.toolbox.focusCommandExecuted ) |