From 9a10811366e1d310228e643ba5ab11ef3467b0b8 Mon Sep 17 00:00:00 2001 From: Kia Lam Date: Thu, 24 Jan 2019 13:50:32 -0500 Subject: [PATCH] Add expand/collapse toolbar for Job Templates list. --- .../templates/templatesList.controller.js | 10 ++ .../templates/templatesList.view.html | 136 ++++++++++-------- awx/ui/client/lib/components/list/_index.less | 1 + .../src/smart-status/smart-status.block.less | 1 - 4 files changed, 86 insertions(+), 62 deletions(-) diff --git a/awx/ui/client/features/templates/templatesList.controller.js b/awx/ui/client/features/templates/templatesList.controller.js index d1a88dcda6..5170589d59 100644 --- a/awx/ui/client/features/templates/templatesList.controller.js +++ b/awx/ui/client/features/templates/templatesList.controller.js @@ -389,6 +389,16 @@ function ListTemplatesController( return html; } + + vm.isCollapsed = true; + + vm.onCollapse = () => { + vm.isCollapsed = true; + }; + + vm.onExpand = () => { + vm.isCollapsed = false; + }; } ListTemplatesController.$inject = [ diff --git a/awx/ui/client/features/templates/templatesList.view.html b/awx/ui/client/features/templates/templatesList.view.html index 2b5ad363bb..959dc3ba35 100644 --- a/awx/ui/client/features/templates/templatesList.view.html +++ b/awx/ui/client/features/templates/templatesList.view.html @@ -31,73 +31,87 @@ + +
- - - - - - - - - - - - - - - - - - - -
-
- - - - - - - - +
+
+ + + + + + +
+
+ + + + + + + + +
+
+
+ + + + + + + + +
+
+ + + + + +
diff --git a/awx/ui/client/lib/components/list/_index.less b/awx/ui/client/lib/components/list/_index.less index 2127f0a823..e9482340f5 100644 --- a/awx/ui/client/lib/components/list/_index.less +++ b/awx/ui/client/lib/components/list/_index.less @@ -207,6 +207,7 @@ .at-Row-container { display: flex; justify-content: space-between; + align-items: center; } .at-Row-container--wrapped { diff --git a/awx/ui/client/src/smart-status/smart-status.block.less b/awx/ui/client/src/smart-status/smart-status.block.less index 8b0b49c0f0..7e90874166 100644 --- a/awx/ui/client/src/smart-status/smart-status.block.less +++ b/awx/ui/client/src/smart-status/smart-status.block.less @@ -1,7 +1,6 @@ /** @define SmartStatus */ .SmartStatus-container{ - max-width: 165px; display:flex; }