diff --git a/awx/ui/static/js/controllers/Jobs.js b/awx/ui/static/js/controllers/Jobs.js index 5e997b3e36..566dc1ba83 100644 --- a/awx/ui/static/js/controllers/Jobs.js +++ b/awx/ui/static/js/controllers/Jobs.js @@ -231,7 +231,7 @@ function JobsEdit ($scope, $rootScope, $compile, $location, $log, $routeParams, $('input[type="checkbox"]').attr('disabled','disabled'); $('input[type="radio"]').attr('disabled','disabled'); $('#host_config_key-gen-btn').attr('disabled','disabled'); - $('textarea').attr('disabled','disabled'); + $('textarea').attr('readonly','readonly'); }) .error( function(data, status, headers, config) { ProcessErrors(scope, data, status, form, diff --git a/awx/ui/static/js/helpers/Selection.js b/awx/ui/static/js/helpers/Selection.js index 075a2344e3..85df352dc2 100644 --- a/awx/ui/static/js/helpers/Selection.js +++ b/awx/ui/static/js/helpers/Selection.js @@ -24,13 +24,14 @@ angular.module('SelectionHelper', ['Utilities', 'RestServices']) scope.selected = []; //array of selected row IDs // toggle row selection - scope['toggle_' + list.iterator] = function(id) { + scope['toggle_' + list.iterator] = function(id, ischeckbox) { for (var i=0; i < scope[list.name].length; i++) { if (scope[list.name][i]['id'] == id) { - if (scope[list.name][i]['checked'] == '0') { + if ( (scope[list.name][i]['checked'] == '0' && !ischeckbox) || (scope[list.name][i]['checked'] == 1 && ischeckbox) ) { // select the row scope[list.name][i]['checked'] = '1'; scope[list.name][i]['success_class'] = 'success'; + // add selected object to the array var found = false; for (var j=0; j < scope.selected.length; j++) { @@ -47,6 +48,7 @@ angular.module('SelectionHelper', ['Utilities', 'RestServices']) // unselect the row scope[list.name][i]['checked'] = '0'; scope[list.name][i]['success_class'] = ''; + // remove selected object from the array for (var j=0; j < scope.selected.length; j++) { if (scope.selected[j].id == id) { diff --git a/awx/ui/static/lib/ansible/generator-helpers.js b/awx/ui/static/lib/ansible/generator-helpers.js index 8ba1f24827..2caf24ff57 100644 --- a/awx/ui/static/lib/ansible/generator-helpers.js +++ b/awx/ui/static/lib/ansible/generator-helpers.js @@ -101,12 +101,13 @@ angular.module('GeneratorHelpers', ['GeneratorHelpers']) var field = list['fields'][fld]; var html = ''; - html += "{{ $index + (" + list.iterator + "Page * " + list.iterator + "PageSize) + 1 }}.\n"; @@ -237,13 +236,9 @@ angular.module('ListGenerator', ['GeneratorHelpers']) } if (options.mode == 'select' || options.mode == 'lookup') { - //html += ""; - html += ""; - - //ng-click=\"toggle_" + list.iterator + - // "({{ " + list.iterator + ".id }}, true)\" + list.iterator + ".id }}\" ng-click=\"toggle_" + list.iterator +"({{ " + list.iterator + ".id }}, true)\" ng-true-value=\"1\" " + + "ng-false-value=\"0\" id=\"check_{{" + list.iterator + ".id}}\" />"; } else if (options.mode == 'edit') { // Row level actions