From 6e2a5bb722d0b001f6b5783b90660cfb9cfcad82 Mon Sep 17 00:00:00 2001 From: chouseknecht Date: Tue, 23 Jul 2013 00:02:00 -0400 Subject: [PATCH] AC-231 title for Hosts section of inventory detail page now appears on 2 lines. --- awx/ui/static/css/ansible-ui.css | 13 ++++++++++--- awx/ui/static/js/controllers/Inventories.js | 8 ++++---- awx/ui/static/js/forms/Inventories.js | 2 +- awx/ui/static/lib/ansible/form-generator.js | 2 +- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/awx/ui/static/css/ansible-ui.css b/awx/ui/static/css/ansible-ui.css index 6fc10dfd47..e58a8b880e 100644 --- a/awx/ui/static/css/ansible-ui.css +++ b/awx/ui/static/css/ansible-ui.css @@ -511,13 +511,20 @@ padding-top: 10px; } - #hosts-title { - margin-bottom: 15px; + #hosts-title p { + font-size: 12px; } + #hosts-title h4 { + margin: 5px 0; + } + + #hosts-well .search-widget { + margin-top: 10px; + } .parse-selection { font-size: 12px; - margin: 5px 0 10px 0; + margin: 5px 0 8px 0; } .parse-selection .radio.inline { diff --git a/awx/ui/static/js/controllers/Inventories.js b/awx/ui/static/js/controllers/Inventories.js index 7189faea4a..fdcf220b79 100644 --- a/awx/ui/static/js/controllers/Inventories.js +++ b/awx/ui/static/js/controllers/Inventories.js @@ -207,7 +207,7 @@ function InventoriesEdit ($scope, $rootScope, $compile, $location, $log, $routeP scope.inventoryLoadedRemove(); } scope.inventoryLoadedRemove = scope.$on('inventoryLoaded', function() { - scope.groupTitle = 'All Hosts'; + scope.groupTitle = '

All Hosts

'; scope.createButtonShow = false; scope.search(scope.relatedSets['hosts'].iterator); TreeInit(scope.TreeParams); @@ -396,8 +396,8 @@ function InventoriesEdit ($scope, $rootScope, $compile, $location, $log, $routeP scope.createButtonShow = true; scope.group_id = node.attr('group_id'); scope.groupName = n.data; - scope.groupTitle = n.data; - scope.groupTitle += (node.attr('description')) ? ' -' + node.attr('description') : ''; + scope.groupTitle = '

' + n.data + '

'; + scope.groupTitle += (node.attr('description')) ? '

' + node.attr('description') + '

' : ''; } else if (type == 'inventory') { url = node.attr('hosts'); @@ -406,7 +406,7 @@ function InventoriesEdit ($scope, $rootScope, $compile, $location, $log, $routeP scope.groupDeleteHide = true; scope.createButtonShow = false; scope.groupName = 'All Hosts'; - scope.groupTitle = 'All Hosts'; + scope.groupTitle = '

All Hosts

'; scope.group_id = null; } scope.relatedSets['hosts'] = { url: url, iterator: 'host' }; diff --git a/awx/ui/static/js/forms/Inventories.js b/awx/ui/static/js/forms/Inventories.js index 066278ff11..99402553d1 100644 --- a/awx/ui/static/js/forms/Inventories.js +++ b/awx/ui/static/js/forms/Inventories.js @@ -106,7 +106,7 @@ angular.module('InventoryFormDefinition', []) hosts: { type: 'treeview', - title: "{{ groupTitle }}", + title: "groupTitle", iterator: 'host', actions: { select: { diff --git a/awx/ui/static/lib/ansible/form-generator.js b/awx/ui/static/lib/ansible/form-generator.js index 84ec31ce5b..851eaf97d0 100644 --- a/awx/ui/static/lib/ansible/form-generator.js +++ b/awx/ui/static/lib/ansible/form-generator.js @@ -855,7 +855,7 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies']) else { html += "
\n"; html += "
\n"; - html += "

" + form.related[itm].title + "

\n"; + html += "
\n"; html += SearchWidget({ iterator: form.related[itm].iterator, template: form.related[itm], mini: true }); // Add actions(s)