From a4a3271b04d479b61a5cc8cb160143bededbb889 Mon Sep 17 00:00:00 2001 From: Michael Abashian Date: Fri, 30 Jun 2017 17:35:24 -0400 Subject: [PATCH] Hide page size dropdown for multi-select lists in modals --- .../shared/associate-groups/associate-groups.controller.js | 3 ++- .../shared/associate-hosts/associate-hosts.controller.js | 3 ++- .../instance-groups-modal/instance-groups-modal.directive.js | 3 ++- .../client/src/shared/list-generator/list-generator.factory.js | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/awx/ui/client/src/inventories-hosts/shared/associate-groups/associate-groups.controller.js b/awx/ui/client/src/inventories-hosts/shared/associate-groups/associate-groups.controller.js index f6f4fc4bed..207395406f 100644 --- a/awx/ui/client/src/inventories-hosts/shared/associate-groups/associate-groups.controller.js +++ b/awx/ui/client/src/inventories-hosts/shared/associate-groups/associate-groups.controller.js @@ -54,7 +54,8 @@ let html = generateList.build({ list: list, mode: 'edit', - title: false + title: false, + hideViewPerPage: true }); $scope.compileList(html); diff --git a/awx/ui/client/src/inventories-hosts/shared/associate-hosts/associate-hosts.controller.js b/awx/ui/client/src/inventories-hosts/shared/associate-hosts/associate-hosts.controller.js index d60800ab76..dd95b2c4c2 100644 --- a/awx/ui/client/src/inventories-hosts/shared/associate-hosts/associate-hosts.controller.js +++ b/awx/ui/client/src/inventories-hosts/shared/associate-hosts/associate-hosts.controller.js @@ -47,7 +47,8 @@ let html = generateList.build({ list: list, mode: 'edit', - title: false + title: false, + hideViewPerPage: true }); $scope.compileList(html); diff --git a/awx/ui/client/src/shared/instance-groups-multiselect/instance-groups-modal/instance-groups-modal.directive.js b/awx/ui/client/src/shared/instance-groups-multiselect/instance-groups-modal/instance-groups-modal.directive.js index 271ed97901..26a9bec7d2 100644 --- a/awx/ui/client/src/shared/instance-groups-multiselect/instance-groups-modal/instance-groups-modal.directive.js +++ b/awx/ui/client/src/shared/instance-groups-multiselect/instance-groups-modal/instance-groups-modal.directive.js @@ -55,7 +55,8 @@ export default ['templateUrl', function(templateUrl) { let html = `${GenerateList.build({ list: instanceGroupList, - input_type: 'instance-groups-modal-body' + input_type: 'instance-groups-modal-body', + hideViewPerPage: true })}`; $scope.list = instanceGroupList; diff --git a/awx/ui/client/src/shared/list-generator/list-generator.factory.js b/awx/ui/client/src/shared/list-generator/list-generator.factory.js index e4ac25273e..01d5d4ea83 100644 --- a/awx/ui/client/src/shared/list-generator/list-generator.factory.js +++ b/awx/ui/client/src/shared/list-generator/list-generator.factory.js @@ -457,7 +457,7 @@ export default ['$compile', 'Attr', 'Icon', } if (options.paginate === undefined || options.paginate === true) { - let hide_view_per_page = (options.mode === "lookup") ? true : false; + let hide_view_per_page = (options.mode === "lookup" || options.hideViewPerPage) ? true : false; html += `