From 5bc96057baed922d53a3055e872772443b7491d8 Mon Sep 17 00:00:00 2001 From: Vasileios Papadopoulos Date: Sun, 19 Nov 2017 16:24:07 +0200 Subject: [PATCH] Added selectedIconClass and deselectedIconClass options to allow use of custom icons next to the selected items and check/uncheck all options --- .../angularjs-dropdown-multiselect.controller.js | 2 ++ .../component/angularjs-dropdown-multiselect.html | 8 ++++---- src/app/main/main.template.html | 12 ++++++++++++ 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/app/component/angularjs-dropdown-multiselect.controller.js b/src/app/component/angularjs-dropdown-multiselect.controller.js index e837cc99..c15e19a3 100644 --- a/src/app/component/angularjs-dropdown-multiselect.controller.js +++ b/src/app/component/angularjs-dropdown-multiselect.controller.js @@ -68,6 +68,8 @@ export default function dropdownMultiselectController( showEnableSearchButton: false, closeOnSelect: false, buttonClasses: 'btn btn-default', + selectedIconClass: 'glyphicon glyphicon-ok', + deselectedIconClass: 'glyphicon glyphicon-remove', closeOnDeselect: false, groupBy: undefined, checkBoxes: false, diff --git a/src/app/component/angularjs-dropdown-multiselect.html b/src/app/component/angularjs-dropdown-multiselect.html index e92650b6..d3130bb5 100644 --- a/src/app/component/angularjs-dropdown-multiselect.html +++ b/src/app/component/angularjs-dropdown-multiselect.html @@ -17,7 +17,7 @@ data-ng-click="selectAll()" tabindex="-1" id="selectAll"> - + {{texts.checkAll}}
  • @@ -25,7 +25,7 @@ data-ng-click="deselectAll();" tabindex="-1" id="deselectAll"> - + {{texts.uncheckAll}}
  • @@ -100,7 +100,7 @@ + data-ng-class="{'{{::settings.selectedIconClass}}' : isChecked(option)}"> @@ -126,7 +126,7 @@ + data-ng-class="{'{{::settings.selectedIconClass}}' : isChecked(option)}"> diff --git a/src/app/main/main.template.html b/src/app/main/main.template.html index 2e939cd0..ef724617 100644 --- a/src/app/main/main.template.html +++ b/src/app/main/main.template.html @@ -1262,6 +1262,18 @@

    Settings

    btn btn-default The CSS classes that used for setting the style of the button. + + selectedIconClass + String + glyphicon glyphicon-ok + CSS class applied to the icon that appears next to each selected item and Check All option. + + + deselectedIconClass + String + glyphicon glyphicon-remove + CSS class applied to the icon that appears next to the Uncheck All option. + groupBy