From b93a7d9636aad27963044854e44a704cf13c5651 Mon Sep 17 00:00:00 2001 From: chris Houseknecht Date: Wed, 15 Jan 2014 19:38:06 -0500 Subject: [PATCH] Fixed the drop-down on Jobs page to be more link-like. Fixed Cancel link spacing on jobs and projects by renaming to Stop (because it's shorter) and padded. Now Stop and Delete align vertically. --- awx/ui/static/js/lists/Jobs.js | 15 +++++---------- awx/ui/static/js/lists/Projects.js | 10 +--------- awx/ui/static/less/ansible-ui.less | 12 +++++++----- awx/ui/static/lib/ansible/generator-helpers.js | 3 +-- awx/ui/static/lib/ansible/list-generator.js | 2 +- 5 files changed, 15 insertions(+), 27 deletions(-) diff --git a/awx/ui/static/js/lists/Jobs.js b/awx/ui/static/js/lists/Jobs.js index c49e04b9e0..a56a2328b8 100644 --- a/awx/ui/static/js/lists/Jobs.js +++ b/awx/ui/static/js/lists/Jobs.js @@ -83,39 +83,34 @@ angular.module('JobsListDefinition', []) }, fieldActions: { - rerun: { + submit: { label: 'Launch', icon: 'icon-rocket', 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: 'Start the job', dataPlacement: 'top' }, cancel: { - label: 'Cancel', - icon: 'icon-minus-sign', + label: 'Stop', mode: 'all', 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'", dataPlacement: 'top' }, "delete": { label: 'Delete', - icon: 'icon-trash', mode: 'all', ngClick: 'deleteJob(\{\{ job.id \}\})', - "class": 'btn-danger btn-xs delete-btn', - awToolTip: 'Remove the selected job from the database', + awToolTip: 'Delete the job', ngShow: "job.status != 'pending' && job.status != 'running' && job.status != 'waiting'", dataPlacement: 'top' }, dropdown: { type: 'DropDown', label: 'View', - icon: 'icon-zoom-in', + icon: 'fa-search-plus', 'class': 'btn-default btn-xs', options: [ { ngClick: "editJob(\{\{ job.id \}\}, '\{\{ job.summary_fields.job_template.name \}\}')", label: 'Status' }, diff --git a/awx/ui/static/js/lists/Projects.js b/awx/ui/static/js/lists/Projects.js index 276fb77a6e..93bcb8682e 100644 --- a/awx/ui/static/js/lists/Projects.js +++ b/awx/ui/static/js/lists/Projects.js @@ -93,25 +93,19 @@ angular.module('ProjectsListDefinition', []) edit: { label: 'Edit', ngClick: "editProject(\{\{ project.id \}\})", - icon: 'icon-edit', - "class": 'btn-xs btn-default', awToolTip: 'Edit project properties', dataPlacement: 'top' }, scm_update: { label: 'Update', - icon: 'icon-cloud-download', - "class": 'btn-xs btn-success', ngClick: 'SCMUpdate(\{\{ project.id \}\})', awToolTip: "\{\{ project.scm_update_tooltip \}\}", ngClass: "project.scm_type_class", dataPlacement: 'top' }, cancel: { - label: 'Cancel', - icon: 'icon-minus-sign', + label: 'Stop', ngClick: "cancelUpdate(\{\{ project.id \}\}, '\{\{ project.name \}\}')", - "class": 'btn-danger btn-xs delete-btn', awToolTip: 'Cancel a running SCM update process', ngShow: "project.status == 'updating'", dataPlacement: 'top' @@ -119,8 +113,6 @@ angular.module('ProjectsListDefinition', []) "delete": { label: 'Delete', ngClick: "deleteProject(\{\{ project.id \}\},'\{\{ project.name \}\}')", - icon: 'icon-trash', - "class": 'btn-danger btn-xs delete-btn', awToolTip: 'Permanently remove project from the database', ngShow: "project.status !== 'updating'", dataPlacement: 'top' diff --git a/awx/ui/static/less/ansible-ui.less b/awx/ui/static/less/ansible-ui.less index d115c33e7d..34892250fa 100644 --- a/awx/ui/static/less/ansible-ui.less +++ b/awx/ui/static/less/ansible-ui.less @@ -108,14 +108,14 @@ a:focus { font-size: 14px; margin-right: 15px; } - /*a:first-child { - margin-left: 0; - }*/ a:hover { cursor: pointer; } - .dropdown { - margin-left: 15px; + .cancel { + padding-right: 10px; + } + .dropdown .caret { + border-top-color: @blue; } } @@ -1049,6 +1049,8 @@ input[type="checkbox"].checkbox-no-label { border-right: 1px solid #ddd; } + #groups_table .actions .cancel { padding-right: 0; } + .node-toggle, .node-no-toggle { /* also used on job evetns */ float: none; diff --git a/awx/ui/static/lib/ansible/generator-helpers.js b/awx/ui/static/lib/ansible/generator-helpers.js index 83f4b8bfa2..9ececaf76f 100644 --- a/awx/ui/static/lib/ansible/generator-helpers.js +++ b/awx/ui/static/lib/ansible/generator-helpers.js @@ -268,8 +268,7 @@ angular.module('GeneratorHelpers', ['GeneratorHelpers']) html += " \n"; */ html += "
\n"; - html += "