Fix disabling of toggleable multiselect during initialization

pull/1478/head
Till Breuer 11 years ago
parent 17bb9e8528
commit 2671311e1a
  1. 3
      app/assets/javascripts/angular/directives/components/toggled-multiselect-directive.js
  2. 4
      app/assets/javascripts/angular/models/query.js
  3. 2
      public/templates/components/toggled_multiselect.html
  4. 4
      public/templates/work_packages/query_filters.html

@ -36,7 +36,8 @@ angular.module('openproject.uiComponents')
scope: {
name: '=',
values: '=',
availableOptions: '='
availableOptions: '=',
disabled: '='
},
templateUrl: '/templates/components/toggled_multiselect.html',
link: function(scope, element, attributes){

@ -244,8 +244,8 @@ angular.module('openproject.models')
this.filters.splice(this.getFilterNames().indexOf(filterName), 1);
},
deactivateFilter: function(filter, loading) {
if (!loading) filter.deactivated = true;
deactivateFilter: function(filter) {
filter.deactivated = true;
},
getFilterType: function(filterName) {

@ -3,6 +3,7 @@
ng-show="!isMultiselect"
name="v[{{name}}][]"
ng-model="values"
ng-disabled="disabled"
id="values-{{name}}"
class="select-small"
style="vertical-align: top;"
@ -15,6 +16,7 @@
ng-show="isMultiselect"
name="v[{{name}}][]"
ng-model="values"
ng-disabled="disabled"
id="values-{{name}}"
class="select-small"
style="vertical-align: top;"

@ -135,7 +135,7 @@
name="filter.name"
values="filter.values"
is-multiselect="false"
ng-disabled="isLoading"/>
disabled="isLoading"/>
</div>
</td>
@ -144,7 +144,7 @@
<td>
<icon-wrapper icon-name="delete2"
icon-title="{{I18n.t('js.button_delete')}}"
ng-click="query.deactivateFilter(filter, loading)"/>
ng-click="query.deactivateFilter(filter)"/>
<!-- TODO I18n -->
</td>
</tr>

Loading…
Cancel
Save