1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 15:21:13 +03:00

Merge pull request #309 from mabashian/roll-back-survey-question-changes

Rolled back survey question preview enhancements
This commit is contained in:
Michael Abashian 2017-08-22 16:39:06 -04:00 committed by GitHub
commit 4e6722a171
3 changed files with 2 additions and 6 deletions

View File

@ -640,10 +640,6 @@ angular.module('Utilities', ['RestServices', 'Utilities'])
// Don't toggle the dropdown when a multiselect option is
// being removed
if (multiple) {
if (params.disabledOptions) {
$(element).on('select2:selecting', e => e.preventDefault());
}
$(element).on('select2:opening', (e) => {
var unselecting = $(e.target).data('select2-unselecting');
if (unselecting === true) {

View File

@ -17,8 +17,7 @@ function link($timeout, CreateSelect2, scope, element, attrs, ngModel) {
element: element.find('select'),
multiple: scope.isMultipleSelect(),
minimumResultsForSearch: scope.isMultipleSelect() ? Infinity : 10,
customDropdownAdapter: true,
disabledOptions: scope.preview ? true : false
customDropdownAdapter: scope.preview ? false : true
});
});

View File

@ -11,6 +11,7 @@
choices="choices"
ng-required="isRequired === 'true'"
ng-model="defaultValue"
ng-disabled="isDisabled === 'true'"
preview="preview">
</multiple-choice>
</div>