From e58e80bbad3b4ee3987db964e482a61ee99a7ffa Mon Sep 17 00:00:00 2001 From: chouseknecht Date: Thu, 6 Jun 2013 19:14:04 -0400 Subject: [PATCH] All tables (lists and related lists) hightight current row on hover. Hover over a row and the background turns white. --- ansibleworks/ui/static/css/ansible-ui.css | 8 +++++--- ansibleworks/ui/static/js/lists/Credentials.js | 2 +- ansibleworks/ui/static/js/lists/Inventories.js | 1 + ansibleworks/ui/static/js/lists/JobTemplates.js | 1 + ansibleworks/ui/static/js/lists/Organizations.js | 1 + ansibleworks/ui/static/js/lists/Projects.js | 1 + ansibleworks/ui/static/js/lists/Teams.js | 3 ++- ansibleworks/ui/static/js/lists/Users.js | 1 + ansibleworks/ui/static/lib/ansible/form-generator.js | 4 ++-- 9 files changed, 15 insertions(+), 7 deletions(-) diff --git a/ansibleworks/ui/static/css/ansible-ui.css b/ansibleworks/ui/static/css/ansible-ui.css index b96fcc1df1..bc20b44ac9 100644 --- a/ansibleworks/ui/static/css/ansible-ui.css +++ b/ansibleworks/ui/static/css/ansible-ui.css @@ -280,12 +280,14 @@ padding-bottom: 0; } - /* Jobs page */ - .jobs-table tbody tr:hover > td, - .jobs-table tbody tr:hover > th { +/* Enable table-hover to work when table is in a well */ +.table-hover tbody tr:hover > td, +.table-hover tbody tr:hover > th { background-color: #fff; } + /* Jobs page */ + .job-error, .job-failed, input[type="text"].job-failed, input[type="text"].job-error diff --git a/ansibleworks/ui/static/js/lists/Credentials.js b/ansibleworks/ui/static/js/lists/Credentials.js index be3e504a54..f0a64ede33 100644 --- a/ansibleworks/ui/static/js/lists/Credentials.js +++ b/ansibleworks/ui/static/js/lists/Credentials.js @@ -17,7 +17,7 @@ angular.module('CredentialsListDefinition', []) selectInstructions: 'Check the Select checkbox next to each credential to be added, and click Finished when done. Use the green button to create a new user.', editInstructions: 'Create a new credential from either the Teams tab or the Users tab. Teams and Users each have an associated set of Credentials.', index: true, - index: true, + hover: true, fields: { name: { diff --git a/ansibleworks/ui/static/js/lists/Inventories.js b/ansibleworks/ui/static/js/lists/Inventories.js index c6fa596f89..d7eb52b645 100644 --- a/ansibleworks/ui/static/js/lists/Inventories.js +++ b/ansibleworks/ui/static/js/lists/Inventories.js @@ -16,6 +16,7 @@ angular.module('InventoriesListDefinition', []) editTitle: 'Inventories', selectInstructions: 'Click on a row to select it, and click Finished when done. Use the green button to create a new row.', index: true, + hover: true, fields: { name: { diff --git a/ansibleworks/ui/static/js/lists/JobTemplates.js b/ansibleworks/ui/static/js/lists/JobTemplates.js index c2cec40e82..15730010f0 100644 --- a/ansibleworks/ui/static/js/lists/JobTemplates.js +++ b/ansibleworks/ui/static/js/lists/JobTemplates.js @@ -16,6 +16,7 @@ angular.module('JobTemplatesListDefinition', []) editTitle: 'Job Templates', selectInstructions: 'Click on a row to select it, and click Finished when done. Use the green button to create a new row.', index: true, + hover: true, fields: { name: { diff --git a/ansibleworks/ui/static/js/lists/Organizations.js b/ansibleworks/ui/static/js/lists/Organizations.js index 6a080cb65c..0c94ab608d 100644 --- a/ansibleworks/ui/static/js/lists/Organizations.js +++ b/ansibleworks/ui/static/js/lists/Organizations.js @@ -14,6 +14,7 @@ angular.module('OrganizationListDefinition', []) iterator: 'organization', selectTitle: 'Add Organizations', editTitle: 'Organizations', + hover: true, index: true, fields: { diff --git a/ansibleworks/ui/static/js/lists/Projects.js b/ansibleworks/ui/static/js/lists/Projects.js index 9948292f75..4c3d34328e 100644 --- a/ansibleworks/ui/static/js/lists/Projects.js +++ b/ansibleworks/ui/static/js/lists/Projects.js @@ -16,6 +16,7 @@ angular.module('ProjectsListDefinition', []) editTitle: '{{ name }}', selectInstructions: 'Click on a row to select it, and click Finished when done. Use the green button to create a new row.', index: true, + hover: true, fields: { name: { diff --git a/ansibleworks/ui/static/js/lists/Teams.js b/ansibleworks/ui/static/js/lists/Teams.js index 18826d3824..9047b80fce 100644 --- a/ansibleworks/ui/static/js/lists/Teams.js +++ b/ansibleworks/ui/static/js/lists/Teams.js @@ -16,7 +16,8 @@ angular.module('TeamsListDefinition', []) editTitle: 'Teams', selectInstructions: 'Click on a row to select it, and click Finished when done. Use the green button to create a new row.', index: true, - + hover: true, + fields: { name: { key: true, diff --git a/ansibleworks/ui/static/js/lists/Users.js b/ansibleworks/ui/static/js/lists/Users.js index ee4f1706b2..63b3326078 100644 --- a/ansibleworks/ui/static/js/lists/Users.js +++ b/ansibleworks/ui/static/js/lists/Users.js @@ -16,6 +16,7 @@ angular.module('UserListDefinition', []) editTitle: 'Users', selectInstructions: 'Check the Select checkbox next to each user to be added, and click Finished when done. Use the green button to create a new user.', index: true, + hover: true, fields: { username: { diff --git a/ansibleworks/ui/static/lib/ansible/form-generator.js b/ansibleworks/ui/static/lib/ansible/form-generator.js index eb33ae21d6..fca5b6e148 100644 --- a/ansibleworks/ui/static/lib/ansible/form-generator.js +++ b/ansibleworks/ui/static/lib/ansible/form-generator.js @@ -709,7 +709,7 @@ angular.module('FormGenerator', ['GeneratorHelpers']) // Start the list html += "
\n"; - html += "\n"; + html += "
\n"; html += "\n"; html += "\n"; html += "\n"; @@ -863,7 +863,7 @@ angular.module('FormGenerator', ['GeneratorHelpers']) // Start the list html += "
\n"; - html += "
#
\n"; + html += "
\n"; html += "\n"; html += "\n"; html += "\n";
#