X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FProjets%2Fpackagist%2Fpiedsjaloux-ckeditor-component.git;a=blobdiff_plain;f=sources%2Fplugins%2Flistblock%2Fplugin.js;fp=sources%2Fplugins%2Flistblock%2Fplugin.js;h=100159a6180dbcf0c0d5edb549348d406f20aba8;hp=e998167eb44095e5d6a344cea2f531344212b84e;hb=317f8f8f0651488f226b5280a8f036c7c135c639;hpb=1096cdefb1c9a3f3c4ca6807e272da6c92e5ed9c diff --git a/sources/plugins/listblock/plugin.js b/sources/plugins/listblock/plugin.js index e998167..100159a 100644 --- a/sources/plugins/listblock/plugin.js +++ b/sources/plugins/listblock/plugin.js @@ -1,5 +1,5 @@ /** - * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved. + * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.md or http://ckeditor.com/license */ @@ -12,7 +12,7 @@ CKEDITOR.plugins.add( 'listblock', { '' + '{text}' + '' + @@ -50,7 +50,7 @@ CKEDITOR.plugins.add( 'listblock', { keys[ 38 ] = 'prev'; // ARROW-UP keys[ CKEDITOR.SHIFT + 9 ] = 'prev'; // SHIFT + TAB keys[ 32 ] = CKEDITOR.env.ie ? 'mouseup' : 'click'; // SPACE - CKEDITOR.env.ie && ( keys[ 13 ] = 'mouseup' ); // Manage ENTER, since onclick is blocked in IE (#8041). + CKEDITOR.env.ie && ( keys[ 13 ] = 'mouseup' ); // Manage ENTER, since onclick is blocked in IE (http://dev.ckeditor.com/ticket/8041). this._.pendingHtml = []; this._.pendingList = []; @@ -180,6 +180,14 @@ CKEDITOR.plugins.add( 'listblock', { this.onMark && this.onMark( item ); }, + markFirstDisplayed: function() { + var context = this; + this._.markFirstDisplayed( function() { + if ( !context.multiSelect ) + context.unmarkAll(); + } ); + }, + unmark: function( value ) { var doc = this.element.getDocument(), itemId = this._.items[ value ],