From fc3864c6f1de803bf09f8fa2d7a4f15f40e2b8b0 Mon Sep 17 00:00:00 2001 From: Mikhail Slyusarev Date: Wed, 19 Nov 2014 02:47:10 -0800 Subject: [PATCH 1/3] adding ability to disable a ui-select by setting its ancestor fieldset disabled property --- src/bootstrap/match-multiple.tpl.html | 4 ++-- src/bootstrap/match.tpl.html | 2 +- src/bootstrap/select-multiple.tpl.html | 4 ++-- src/select.js | 17 ++++++++++++++++- src/select2/select-multiple.tpl.html | 6 +++--- src/select2/select.tpl.html | 2 +- src/selectize/select.tpl.html | 4 ++-- 7 files changed, 27 insertions(+), 12 deletions(-) diff --git a/src/bootstrap/match-multiple.tpl.html b/src/bootstrap/match-multiple.tpl.html index 08e24556b..fecb56056 100644 --- a/src/bootstrap/match-multiple.tpl.html +++ b/src/bootstrap/match-multiple.tpl.html @@ -5,10 +5,10 @@ class="ui-select-match-item btn btn-default btn-xs" tabindex="-1" type="button" - ng-disabled="$select.disabled" + ng-disabled="$select.disabled || $select.ancestorFieldsetDisabled()" ng-click="$select.activeMatchIndex = $index;" ng-class="{'btn-primary':$select.activeMatchIndex === $index}"> -  × +  × diff --git a/src/bootstrap/match.tpl.html b/src/bootstrap/match.tpl.html index b766d4680..baa831a1a 100644 --- a/src/bootstrap/match.tpl.html +++ b/src/bootstrap/match.tpl.html @@ -1,6 +1,6 @@