From afb151bf29fcd29e5767e0e2b0c6d57f597bda8f Mon Sep 17 00:00:00 2001 From: Chris Houseknecht Date: Mon, 13 Jan 2014 20:55:28 +0000 Subject: [PATCH] Inventory refactor: lists now uniformly set tool tips placement to 'top'. Fixed an ugly scope bug when using modals that call LookupInit. The callbacks inside search were being left in the inventory scope and fired everytime the host view refreshed. Added a cleanup method in search to remove its callbacks. Calling the cleanup method on modal close fixes. --- awx/ui/static/js/helpers/Groups.js | 67 ++++++++++------------ awx/ui/static/js/helpers/Hosts.js | 1 + awx/ui/static/js/helpers/Lookup.js | 32 +++++------ awx/ui/static/js/helpers/refresh.js | 3 +- awx/ui/static/js/helpers/search.js | 10 ++++ awx/ui/static/js/lists/CloudCredentials.js | 6 +- awx/ui/static/js/lists/Credentials.js | 6 +- awx/ui/static/js/lists/Groups.js | 6 +- awx/ui/static/js/lists/Hosts.js | 6 +- awx/ui/static/js/lists/Inventories.js | 6 +- awx/ui/static/js/lists/InventoryHosts.js | 3 +- awx/ui/static/js/lists/JobTemplates.js | 9 ++- awx/ui/static/js/lists/Jobs.js | 9 ++- awx/ui/static/js/lists/Organizations.js | 6 +- awx/ui/static/js/lists/Permissions.js | 6 +- awx/ui/static/js/lists/Projects.js | 12 ++-- awx/ui/static/js/lists/Teams.js | 6 +- awx/ui/static/js/lists/Users.js | 6 +- awx/ui/templates/ui/index.html | 2 +- 19 files changed, 117 insertions(+), 85 deletions(-) diff --git a/awx/ui/static/js/helpers/Groups.js b/awx/ui/static/js/helpers/Groups.js index 2fd023f451..b90e21b7e0 100644 --- a/awx/ui/static/js/helpers/Groups.js +++ b/awx/ui/static/js/helpers/Groups.js @@ -450,8 +450,8 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', ' var inventory_id = params.inventory_id; var group_id = (params.group_id !== undefined) ? params.group_id : null; - var inventory_scope = params.scope; - + var parent_scope = params.scope; + // Inject dynamic view var defaultUrl = (group_id !== null) ? GetBasePath('groups') + group_id + '/children/' : GetBasePath('inventory') + inventory_id + '/groups/'; @@ -459,14 +459,14 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', ' var generator = GenerateForm; var scope = generator.inject(form, { mode: 'add', modal: true, related: false, show_modal: false }); var groupCreated = false; - + + $('#form-modal .btn-none').removeClass('btn-none').addClass('btn-success'); + scope.formModalActionLabel = 'Save'; scope.formModalCancelShow = true; scope.parseType = 'yaml'; scope.source = null; ParseTypeChange(scope); - - $('#form-modal .btn-none').removeClass('btn-none').addClass('btn-success'); generator.reset(); var master={}; @@ -475,24 +475,28 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', ' scope.removeAddTreeRefreshed(); } scope.removeAddTreeRefreshed = scope.$on('GroupTreeRefreshed', function(e) { + $rootScope.formModalHeader = null; + $rootScope.formModalCancleShow= null; + $rootScope.formModalActionLabel = null; Wait('stop'); $('#form-modal').modal('hide'); scope.removeAddTreeRefreshed(); }); if (scope.removeSaveComplete) { - scope.removeSaveComplete(); + scope.removeSaveComplete(); } scope.removeSaveComplete = scope.$on('SaveComplete', function(e, group_id, error) { if (!error) { + scope.searchCleanup(); scope.formModalActionDisabled = false; scope.showGroupHelp = false; //get rid of the Hint - BuildTree({ scope: inventory_scope, inventory_id: inventory_id, refresh: true, new_group_id: group_id }); + BuildTree({ scope: parent_scope, inventory_id: inventory_id, refresh: true, new_group_id: group_id }); } }); if (scope.removeFormSaveSuccess) { - scope.removeFormSaveSuccess(); + scope.removeFormSaveSuccess(); } scope.removeFormSaveSuccess = scope.$on('formSaveSuccess', function(e, group_id, url) { @@ -574,7 +578,13 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', ' scope.$emit('SaveComplete', group_id, false); } }); - + + // Cancel + scope.cancelModal = function() { + if (scope.searchCleanup) { + scope.searchCleanup(); + } + } // Save scope.formModalAction = function() { @@ -637,12 +647,6 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', ' }); } - // Cancel - scope.formReset = function() { - // Defaults - generator.reset(); - }; - var choicesReady = 0; if (scope.removeChoicesReady) { @@ -699,7 +703,6 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', ' var form = GroupForm; var defaultUrl = GetBasePath('groups') + group_id + '/'; var master = {}; - var relatedSets = {}; // Load the modal form var scope = generator.inject(form, { mode: 'edit', modal: true, related: false, show_modal: false }); @@ -726,10 +729,6 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', ' scope.groupLoadedRemove(); } scope.groupLoadedRemove = scope.$on('groupLoaded', function() { - for (var set in relatedSets) { - scope.search(relatedSets[set].iterator); - } - if (scope.variable_url) { // get group variables Rest.setUrl(scope.variable_url); @@ -871,12 +870,6 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', ' master[fld] = scope[fld]; } } - var related = data.related; - for (var set in form.related) { - if (related[set]) { - relatedSets[set] = { url: related[set], iterator: form.related[set].iterator }; - } - } scope.variable_url = data.related.variable_data; scope.source_url = data.related.inventory_source; $('#form-modal').modal('show'); @@ -926,6 +919,7 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', ' } scope.removeSaveComplete = scope.$on('SaveComplete', function(e, error) { if (!error) { + // Update the view with any changes UpdateGroup({ scope: parent_scope, group_id: group_id, @@ -935,6 +929,8 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', ' has_inventory_sources: (scope.source) ? true : false } }); + //Clean up + scope.searchCleanup(); scope.formModalActionDisabled = false; scope.showGroupHelp = false; //get rid of the Hint Wait('stop'); @@ -1025,6 +1021,13 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', ' } }); + // Cancel + scope.cancelModal = function() { + if (scope.searchCleanup) { + scope.searchCleanup(); + } + } + // Save scope.formModalAction = function() { Wait('start'); @@ -1120,17 +1123,7 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', ' form: GroupForm }); } - - // Cancel - scope.formReset = function() { - generator.reset(); - for (var fld in master) { - scope[fld] = master[fld]; - } - scope.parseType = 'yaml'; - $('#s2id_group_source_regions').select2('data', master['source_regions']); - } - + } }]) diff --git a/awx/ui/static/js/helpers/Hosts.js b/awx/ui/static/js/helpers/Hosts.js index aa8d7413fc..1094c73935 100644 --- a/awx/ui/static/js/helpers/Hosts.js +++ b/awx/ui/static/js/helpers/Hosts.js @@ -38,6 +38,7 @@ angular.module('HostsHelper', [ 'RestServices', 'Utilities', 'ListGenerator', 'H SearchInit({ scope: scope, set: 'hosts', list: InventoryHosts, url: url }); PaginateInit({ scope: scope, list: InventoryHosts, url: url }); + console.log('before call to hosts search') scope.search(InventoryHosts.iterator); } }]) diff --git a/awx/ui/static/js/helpers/Lookup.js b/awx/ui/static/js/helpers/Lookup.js index 2dad53a22a..d99763123a 100644 --- a/awx/ui/static/js/helpers/Lookup.js +++ b/awx/ui/static/js/helpers/Lookup.js @@ -27,11 +27,11 @@ angular.module('LookUpHelper', [ 'RestServices', 'Utilities', 'SearchHelper', 'P var defaultUrl; if (params.url) { - // pass in a url value to override the default - defaultUrl = params.url; + // pass in a url value to override the default + defaultUrl = params.url; } else { - defaultUrl = (list.name == 'inventories') ? GetBasePath('inventory') : GetBasePath(list.name); + defaultUrl = (list.name == 'inventories') ? GetBasePath('inventory') : GetBasePath(list.name); } // Show pop-up @@ -67,15 +67,15 @@ angular.module('LookUpHelper', [ 'RestServices', 'Utilities', 'SearchHelper', 'P found = true; scope[field] = listScope[list.name][i].id; if (scope[form.name + '_form'] && form.fields[field] && form.fields[field].sourceModel) { - scope[form.fields[field].sourceModel + '_' + form.fields[field].sourceField] = - listScope[list.name][i][form.fields[field].sourceField]; + scope[form.fields[field].sourceModel + '_' + form.fields[field].sourceField] = + listScope[list.name][i][form.fields[field].sourceField]; if (scope[form.name + '_form'][form.fields[field].sourceModel + '_' + form.fields[field].sourceField]) { - scope[form.name + '_form'][form.fields[field].sourceModel + '_' + form.fields[field].sourceField] - .$setValidity('awlookup',true); + scope[form.name + '_form'][form.fields[field].sourceModel + '_' + form.fields[field].sourceField] + .$setValidity('awlookup',true); } } if (scope[form.name + '_form']) { - scope[form.name + '_form'].$setDirty(); + scope[form.name + '_form'].$setDirty(); } listGenerator.hide(); } @@ -94,12 +94,12 @@ angular.module('LookUpHelper', [ 'RestServices', 'Utilities', 'SearchHelper', 'P listScope['toggle_' + list.iterator] = function(id) { for (var i=0; i < scope[list.name].length; i++) { if (listScope[list.name][i]['id'] == id) { - listScope[list.name][i]['checked'] = '1'; - listScope[list.name][i]['success_class'] = 'success'; + listScope[list.name][i]['checked'] = '1'; + listScope[list.name][i]['success_class'] = 'success'; } else { - listScope[list.name][i]['checked'] = '0'; - listScope[list.name][i]['success_class'] = ''; + listScope[list.name][i]['checked'] = '0'; + listScope[list.name][i]['success_class'] = ''; } } } @@ -114,10 +114,10 @@ angular.module('LookUpHelper', [ 'RestServices', 'Utilities', 'SearchHelper', 'P listScope.lookupPostRefreshRemove = scope.$on('PostRefresh', function() { for (var fld in list.fields) { if (list.fields[fld].type && list.fields[fld].type == 'date') { - //convert dates to our standard format - for (var i=0; i < scope[list.name].length; i++) { - scope[list.name][i][fld] = FormatDate(new Date(scope[list.name][i][fld])); - } + //convert dates to our standard format + for (var i=0; i < scope[list.name].length; i++) { + scope[list.name][i][fld] = FormatDate(new Date(scope[list.name][i][fld])); + } } } // List generator creates the form, resetting it and losing the previously selected value. diff --git a/awx/ui/static/js/helpers/refresh.js b/awx/ui/static/js/helpers/refresh.js index 7ae433ef60..d605643a57 100644 --- a/awx/ui/static/js/helpers/refresh.js +++ b/awx/ui/static/js/helpers/refresh.js @@ -22,7 +22,8 @@ angular.module('RefreshHelper', ['RestServices', 'Utilities']) var set = params.set; var iterator = params.iterator; var url = params.url; - + console.log('Inside refresh'); + console.log(url); scope.current_url = url; Rest.setUrl(url); Rest.get() diff --git a/awx/ui/static/js/helpers/search.js b/awx/ui/static/js/helpers/search.js index d43c87ed01..ec96e43a6d 100644 --- a/awx/ui/static/js/helpers/search.js +++ b/awx/ui/static/js/helpers/search.js @@ -525,5 +525,15 @@ angular.module('SearchHelper', ['RestServices', 'Utilities', 'RefreshHelper']) scope.search(list.iterator); } + // Call after modal dialogs to remove any lingering callbacks + scope.searchCleanup = function() { + console.log('search cleanup!'); + scope.removeDoSearch(); + scope.removeFoundObject(); + scope.removeResultWarning(); + scope.removePrepareSearch(); + scope.removePrepareSearch2(); + } + } }]); diff --git a/awx/ui/static/js/lists/CloudCredentials.js b/awx/ui/static/js/lists/CloudCredentials.js index 4139c8bef2..ff22048a67 100644 --- a/awx/ui/static/js/lists/CloudCredentials.js +++ b/awx/ui/static/js/lists/CloudCredentials.js @@ -59,7 +59,8 @@ angular.module('CloudCredentialsListDefinition', []) icon: 'fa-edit', label: 'Edit', "class": 'btn-sm', - awToolTip: 'View/Edit credential' + awToolTip: 'View/Edit credential', + dataPlacement: 'top' }, "delete": { @@ -67,7 +68,8 @@ angular.module('CloudCredentialsListDefinition', []) icon: 'fa-trash-o', label: 'Delete', "class": 'btn-sm', - awToolTip: 'Delete credential' + awToolTip: 'Delete credential', + dataPlacement: 'top' } } }); diff --git a/awx/ui/static/js/lists/Credentials.js b/awx/ui/static/js/lists/Credentials.js index 94c02dc618..e99a3b46d8 100644 --- a/awx/ui/static/js/lists/Credentials.js +++ b/awx/ui/static/js/lists/Credentials.js @@ -73,7 +73,8 @@ angular.module('CredentialsListDefinition', []) icon: 'fa-edit', label: 'Edit', "class": 'btn-sm', - awToolTip: 'View/Edit credential' + awToolTip: 'View/Edit credential', + dataPlacement: 'top' }, "delete": { @@ -81,7 +82,8 @@ angular.module('CredentialsListDefinition', []) icon: 'fa-trash', label: 'Delete', "class": 'btn-sm', - awToolTip: 'Delete credential' + awToolTip: 'Delete credential', + dataPlacement: 'top' } } }); diff --git a/awx/ui/static/js/lists/Groups.js b/awx/ui/static/js/lists/Groups.js index 4353b2b0d5..b5c19f97ac 100644 --- a/awx/ui/static/js/lists/Groups.js +++ b/awx/ui/static/js/lists/Groups.js @@ -44,7 +44,8 @@ angular.module('GroupListDefinition', []) ngClick: "editGroup(\{\{ group.id \}\})", icon: 'icon-edit', "class": 'btn-xs', - awToolTip: 'View/Edit group' + awToolTip: 'View/Edit group', + dataPlacement: 'top' }, "delete": { @@ -52,7 +53,8 @@ angular.module('GroupListDefinition', []) ngClick: "deleteGroup(\{\{ group.id \}\},'\{\{ group.name \}\}')", icon: 'icon-trash', "class": 'btn-xs', - awToolTip: 'Delete group' + awToolTip: 'Delete group', + dataPlacement: 'top' } } }); \ No newline at end of file diff --git a/awx/ui/static/js/lists/Hosts.js b/awx/ui/static/js/lists/Hosts.js index 449165a30b..e2e61c0b11 100644 --- a/awx/ui/static/js/lists/Hosts.js +++ b/awx/ui/static/js/lists/Hosts.js @@ -44,7 +44,8 @@ angular.module('HostListDefinition', []) ngClick: "editHost(\{\{ host.id \}\})", icon: 'icon-edit', "class": 'btn-xs', - awToolTip: 'View/Edit host' + awToolTip: 'View/Edit host', + dataPlacement: 'top' }, "delete": { @@ -52,7 +53,8 @@ angular.module('HostListDefinition', []) ngClick: "deleteHost(\{\{ host.id \}\},'\{\{ host.name \}\}')", icon: 'icon-trash', "class": 'btn-xs', - awToolTip: 'Delete host' + awToolTip: 'Delete host', + dataPlacement: 'top' } } }); diff --git a/awx/ui/static/js/lists/Inventories.js b/awx/ui/static/js/lists/Inventories.js index b84f5fabaa..a428bed891 100644 --- a/awx/ui/static/js/lists/Inventories.js +++ b/awx/ui/static/js/lists/Inventories.js @@ -101,14 +101,16 @@ angular.module('InventoriesListDefinition', []) ngClick: "editInventory(\{\{ inventory.id \}\})", icon: 'icon-edit', "class": 'btn-xs btn-default', - awToolTip: 'Edit inventory' + awToolTip: 'Edit inventory', + dataPlacement: 'top' }, "delete": { label: 'Delete', ngClick: "deleteInventory(\{\{ inventory.id \}\},'\{\{ inventory.name \}\}')", icon: 'icon-trash', "class": 'btn-xs btn-danger', - awToolTip: 'Delete inventory' + awToolTip: 'Delete inventory', + dataPlacement: 'top' }, dropdown: { type: 'DropDown', diff --git a/awx/ui/static/js/lists/InventoryHosts.js b/awx/ui/static/js/lists/InventoryHosts.js index 5dc50bc533..225b0ea799 100644 --- a/awx/ui/static/js/lists/InventoryHosts.js +++ b/awx/ui/static/js/lists/InventoryHosts.js @@ -100,13 +100,12 @@ angular.module('InventoryHostsDefinition', []) awToolTip: "Create a new host" }, stream: { + mode: 'all', ngClick: "showActivity()", awToolTip: "View Activity Stream", - mode: 'all', ngShow: "user_is_superuser" }, help: { - dataPlacement: 'top', mode: 'all', awToolTip: //"
" + diff --git a/awx/ui/static/js/lists/JobTemplates.js b/awx/ui/static/js/lists/JobTemplates.js index 97afb70f36..b567203aea 100644 --- a/awx/ui/static/js/lists/JobTemplates.js +++ b/awx/ui/static/js/lists/JobTemplates.js @@ -50,7 +50,8 @@ angular.module('JobTemplatesListDefinition', []) ngClick: "editJobTemplate(\{\{ job_template.id \}\})", icon: 'icon-edit', awToolTip: 'Edit template', - "class": 'btn-default btn-xs' + "class": 'btn-default btn-xs', + dataPlacement: 'top' }, submit: { label: 'Launch', @@ -58,14 +59,16 @@ angular.module('JobTemplatesListDefinition', []) mode: 'all', "class": 'btn-xs btn-success', ngClick: 'submitJob(\{\{ job_template.id \}\})', - awToolTip: 'Start a job using this template' + awToolTip: 'Start a job using this template', + dataPlacement: 'top' }, "delete": { label: 'Delete', ngClick: "deleteJobTemplate(\{\{ job_template.id \}\},'\{\{ job_template.name \}\}')", icon: 'icon-trash', "class": 'btn-danger btn-xs', - awToolTip: 'Delete template' + awToolTip: 'Delete template', + dataPlacement: 'top' } } }); diff --git a/awx/ui/static/js/lists/Jobs.js b/awx/ui/static/js/lists/Jobs.js index ad0d2c56e7..c49e04b9e0 100644 --- a/awx/ui/static/js/lists/Jobs.js +++ b/awx/ui/static/js/lists/Jobs.js @@ -89,7 +89,8 @@ angular.module('JobsListDefinition', []) mode: 'all', ngClick: "submitJob(\{\{ job.id \}\}, '\{\{ job.summary_fields.job_template.name \}\}' )", 'class': 'btn-success btn-xs', - awToolTip: 'Relaunch the job template, running it again from scratch' + awToolTip: 'Relaunch the job template, running it again from scratch', + dataPlacement: 'top' }, cancel: { label: 'Cancel', @@ -98,7 +99,8 @@ angular.module('JobsListDefinition', []) ngClick: 'deleteJob(\{\{ job.id \}\})', "class": 'btn-danger btn-xs delete-btn', awToolTip: 'Cancel a running or pending job', - ngShow: "job.status == 'pending' || job.status == 'running' || job.status == 'waiting'" + ngShow: "job.status == 'pending' || job.status == 'running' || job.status == 'waiting'", + dataPlacement: 'top' }, "delete": { label: 'Delete', @@ -107,7 +109,8 @@ angular.module('JobsListDefinition', []) ngClick: 'deleteJob(\{\{ job.id \}\})', "class": 'btn-danger btn-xs delete-btn', awToolTip: 'Remove the selected job from the database', - ngShow: "job.status != 'pending' && job.status != 'running' && job.status != 'waiting'" + ngShow: "job.status != 'pending' && job.status != 'running' && job.status != 'waiting'", + dataPlacement: 'top' }, dropdown: { type: 'DropDown', diff --git a/awx/ui/static/js/lists/Organizations.js b/awx/ui/static/js/lists/Organizations.js index 2805ddc3a6..5595414826 100644 --- a/awx/ui/static/js/lists/Organizations.js +++ b/awx/ui/static/js/lists/Organizations.js @@ -47,7 +47,8 @@ angular.module('OrganizationListDefinition', []) ngClick: "editOrganization(\{\{ organization.id \}\})", icon: 'icon-edit', "class": 'btn-xs btn-default', - awToolTip: 'View/Edit organization' + awToolTip: 'View/Edit organization', + dataPlacement: 'top' }, "delete": { @@ -55,7 +56,8 @@ angular.module('OrganizationListDefinition', []) ngClick: "deleteOrganization(\{\{ organization.id \}\},'\{\{ organization.name \}\}')", icon: 'icon-trash', "class": 'btn-xs btn-danger', - awToolTip: 'Delete organization' + awToolTip: 'Delete organization', + dataPlacement: 'top' } } }); diff --git a/awx/ui/static/js/lists/Permissions.js b/awx/ui/static/js/lists/Permissions.js index 217697b3c0..b62ab793da 100644 --- a/awx/ui/static/js/lists/Permissions.js +++ b/awx/ui/static/js/lists/Permissions.js @@ -62,7 +62,8 @@ angular.module('PermissionListDefinition', []) ngClick: "editPermission(\{\{ permission.id \}\})", icon: 'icon-edit', "class": 'btn-xs btn-default', - awToolTip: 'View/Edit permission' + awToolTip: 'View/Edit permission', + dataPlacement: 'top' }, "delete": { @@ -71,7 +72,8 @@ angular.module('PermissionListDefinition', []) icon: 'icon-trash', "class": 'btn-xs btn-danger', awToolTip: 'Delete permission', - ngShow: 'PermissionAddAllowed' + ngShow: 'PermissionAddAllowed', + dataPlacement: 'top' } } }); diff --git a/awx/ui/static/js/lists/Projects.js b/awx/ui/static/js/lists/Projects.js index b3ace4f7c3..8039a0d5f4 100644 --- a/awx/ui/static/js/lists/Projects.js +++ b/awx/ui/static/js/lists/Projects.js @@ -95,7 +95,8 @@ angular.module('ProjectsListDefinition', []) ngClick: "editProject(\{\{ project.id \}\})", icon: 'icon-edit', "class": 'btn-xs btn-default', - awToolTip: 'View/edit project properties' + awToolTip: 'View/edit project properties', + dataPlacement: 'top' }, scm_update: { label: 'Update', @@ -103,7 +104,8 @@ angular.module('ProjectsListDefinition', []) "class": 'btn-xs btn-success', ngClick: 'SCMUpdate(\{\{ project.id \}\})', awToolTip: "\{\{ project.scm_update_tooltip \}\}", - ngClass: "project.scm_type_class" + ngClass: "project.scm_type_class", + dataPlacement: 'top' }, cancel: { label: 'Cancel', @@ -111,7 +113,8 @@ angular.module('ProjectsListDefinition', []) ngClick: "cancelUpdate(\{\{ project.id \}\}, '\{\{ project.name \}\}')", "class": 'btn-danger btn-xs delete-btn', awToolTip: 'Cancel a running SCM update process', - ngShow: "project.status == 'updating'" + ngShow: "project.status == 'updating'", + dataPlacement: 'top' }, "delete": { label: 'Delete', @@ -119,7 +122,8 @@ angular.module('ProjectsListDefinition', []) icon: 'icon-trash', "class": 'btn-danger btn-xs delete-btn', awToolTip: 'Permanently remove project from the database', - ngShow: "project.status !== 'updating'" + ngShow: "project.status !== 'updating'", + dataPlacement: 'top' } } }); diff --git a/awx/ui/static/js/lists/Teams.js b/awx/ui/static/js/lists/Teams.js index 26c2ae179c..ea03fef146 100644 --- a/awx/ui/static/js/lists/Teams.js +++ b/awx/ui/static/js/lists/Teams.js @@ -54,7 +54,8 @@ angular.module('TeamsListDefinition', []) ngClick: "editTeam(\{\{ team.id \}\})", icon: 'icon-edit', "class": 'btn-xs btn-default', - awToolTip: 'View/Edit team' + awToolTip: 'View/Edit team', + dataPlacement: 'top' }, "delete": { @@ -62,7 +63,8 @@ angular.module('TeamsListDefinition', []) ngClick: "deleteTeam(\{\{ team.id \}\},'\{\{ team.name \}\}')", icon: 'icon-trash', "class": 'btn-xs btn-danger', - awToolTip: 'Delete team' + awToolTip: 'Delete team', + dataPlacement: 'top' } } }); diff --git a/awx/ui/static/js/lists/Users.js b/awx/ui/static/js/lists/Users.js index a53cfae456..b22638ed5b 100644 --- a/awx/ui/static/js/lists/Users.js +++ b/awx/ui/static/js/lists/Users.js @@ -56,7 +56,8 @@ angular.module('UserListDefinition', []) ngClick: "editUser(\{\{ user.id \}\})", icon: 'icon-edit', "class": 'btn-xs btn-default', - awToolTip: 'View/Edit user' + awToolTip: 'View/Edit user', + dataPlacement: 'top' }, "delete": { @@ -64,7 +65,8 @@ angular.module('UserListDefinition', []) ngClick: "deleteUser(\{\{ user.id \}\},'\{\{ user.username \}\}')", icon: 'icon-trash', "class": 'btn-xs btn-danger', - awToolTip: 'Delete user' + awToolTip: 'Delete user', + dataPlacement: 'top' } } }); diff --git a/awx/ui/templates/ui/index.html b/awx/ui/templates/ui/index.html index 5f9bbaa621..3952189a31 100644 --- a/awx/ui/templates/ui/index.html +++ b/awx/ui/templates/ui/index.html @@ -252,7 +252,7 @@