From 3c8bcf935b091af04e9011ae48c7e37156029fe3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Daniel=20Calvi=C3=B1o=20S=C3=A1nchez?= Date: Sat, 8 Jul 2017 15:56:19 +0200 Subject: [PATCH] Enable the toggleSelect extension in multi-select dropdowns MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The toggleSelect extension for Select2 makes possible to unselect items in a multi-select dropdown by clicking on them; this behaviour should be enabled in all the multi-select dropdowns used in the server. Signed-off-by: Daniel Calviño Sánchez --- apps/files_external/js/settings.js | 1 + apps/systemtags/js/systemtagsfilelist.js | 1 + settings/js/settings.js | 1 + 3 files changed, 3 insertions(+) diff --git a/apps/files_external/js/settings.js b/apps/files_external/js/settings.js index 0270b7a6957..e17bf673935 100644 --- a/apps/files_external/js/settings.js +++ b/apps/files_external/js/settings.js @@ -93,6 +93,7 @@ function addSelect2 ($elements, userListLimit) { placeholder: t('files_external', 'All users. Type to select user or group.'), allowClear: true, multiple: true, + toggleSelect: true, dropdownCssClass: 'files-external-select2', //minimumInputLength: 1, ajax: { diff --git a/apps/systemtags/js/systemtagsfilelist.js b/apps/systemtags/js/systemtagsfilelist.js index c2a6f09fd9e..a40eb548d9f 100644 --- a/apps/systemtags/js/systemtagsfilelist.js +++ b/apps/systemtags/js/systemtagsfilelist.js @@ -88,6 +88,7 @@ placeholder: t('systemtags', 'Select tags to filter by'), allowClear: false, multiple: true, + toggleSelect: true, separator: ',', query: _.bind(this._queryTagsAutocomplete, this), diff --git a/settings/js/settings.js b/settings/js/settings.js index 5a2ba4bcec7..3a1e67f41cd 100644 --- a/settings/js/settings.js +++ b/settings/js/settings.js @@ -30,6 +30,7 @@ OC.Settings = _.extend(OC.Settings, { placeholder: t('core', 'Groups'), allowClear: true, multiple: true, + toggleSelect: true, separator: '|', query: _.debounce(function(query) { var queryData = {}; -- 2.39.5