diff --git a/awx/ui/static/js/helpers/Groups.js b/awx/ui/static/js/helpers/Groups.js index 563b6d442b..7f4ac3a2ae 100644 --- a/awx/ui/static/js/helpers/Groups.js +++ b/awx/ui/static/js/helpers/Groups.js @@ -274,11 +274,15 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', ' scope.removeShowHelp(); } scope.removeShowHelp = scope.$on('ShowHelp', function() { - HelpDialog({ defn: InventorySummaryHelp }); + // Force display fo help tooltip when no groups exist + $('#inventory-summary-help').focus(); }); scope.showHelp = function() { - scope.$emit('ShowHelp'); + // Display help dialog + $('.btn').blur(); //remove focus from the help button and all buttons + //this stops the tooltip from continually displaying + HelpDialog({ defn: InventorySummaryHelp }); } scope.viewUpdateStatus = function(id) { diff --git a/awx/ui/static/js/helpers/inventory.js b/awx/ui/static/js/helpers/inventory.js index 54c1e79fab..8ec127e0fc 100644 --- a/awx/ui/static/js/helpers/inventory.js +++ b/awx/ui/static/js/helpers/inventory.js @@ -569,7 +569,10 @@ angular.module('InventoryHelper', [ 'RestServices', 'Utilities', 'OrganizationLi Rest.setUrl(url); Rest.get() .success( function(data, status, headers, config) { - scope.$emit('ShowHelp'); + if (data.count == 0) { + // no groups exist, show help + scope.$emit('ShowHelp'); + } }) .error( function(data, status, headers, config) { ProcessErrors(scope, data, status, form, diff --git a/awx/ui/static/js/lists/InventorySummary.js b/awx/ui/static/js/lists/InventorySummary.js index 2644d90dc4..959ebdbb1b 100644 --- a/awx/ui/static/js/lists/InventorySummary.js +++ b/awx/ui/static/js/lists/InventorySummary.js @@ -113,9 +113,11 @@ angular.module('InventorySummaryDefinition', []) icon: "icon-question-sign", mode: 'all', 'class': 'btn-xs btn-info btn-help', - awToolTip: 'Click for help', + awToolTip: "

Need help getting started creating your inventory?

" + + "

Click here for help with this page

", iconSize: 'large', - ngClick: "showHelp()" + ngClick: "showHelp()", + id: "inventory-summary-help" }, refresh: { awRefresh: true, diff --git a/awx/ui/static/less/ansible-ui.less b/awx/ui/static/less/ansible-ui.less index 01279404b2..717f651b2e 100644 --- a/awx/ui/static/less/ansible-ui.less +++ b/awx/ui/static/less/ansible-ui.less @@ -163,7 +163,7 @@ td.actions { .refresh-grp { display: inline-block; text-align: right; - margin-left: 10px; + margin-left: 0; margin-top: 0; padding: 0; line-height: normal; @@ -575,11 +575,10 @@ select.field-mini-height { /* Display list actions next to search widget */ .list-actions { text-align: right; -} - -.btn-help { - margin-left: 15px; + button { + margin-left: 8px; + } } /* End Display list actions */ diff --git a/awx/ui/static/lib/ansible/directives.js b/awx/ui/static/lib/ansible/directives.js index 8472b95fc6..c747530df3 100644 --- a/awx/ui/static/lib/ansible/directives.js +++ b/awx/ui/static/lib/ansible/directives.js @@ -234,7 +234,7 @@ angular.module('AWDirectives', ['RestServices', 'Utilities', 'AuthService', 'Hos $(this).remove(); }); }); - $(element).tooltip({ placement: placement, delay: delay, title: attrs.awToolTip, container: 'body' }); + $(element).tooltip({ placement: placement, delay: delay, html: true, title: attrs.awToolTip, container: 'body' }); } })