mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 19:30:39 -03:30
AC-175 dynamically set Event link color and cursor for each row. Used ng-class to dynamically set a css class. Now child rows that cannot be expanded appear to have no link -the text color is charcoal and the cursor is the default arrow.
This commit is contained in:
parent
ebed99047b
commit
14ed59bedf
@ -386,6 +386,11 @@
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
||||
.child-event a {
|
||||
color: #36454F;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
/* End Jobs Page */
|
||||
|
||||
|
||||
|
||||
@ -28,6 +28,9 @@ function JobEventsList ($scope, $rootScope, $location, $log, $routeParams, Rest,
|
||||
$rootScope.flashMessage = null;
|
||||
scope.selected = [];
|
||||
scope.expand = true; //on load, automatically expand all nodes
|
||||
|
||||
scope.parentNode = 'parent-event'; // used in ngClass to dynamicall set row level class and control
|
||||
scope.childNode = 'child-event'; // link color and cursor
|
||||
|
||||
if (scope.RemovePostRefresh) {
|
||||
scope.RemovePostRefresh();
|
||||
@ -44,6 +47,7 @@ function JobEventsList ($scope, $rootScope, $location, $log, $routeParams, Rest,
|
||||
set[i]['ngicon'] = 'icon-expand-alt';
|
||||
set[i]['level'] = 0;
|
||||
set[i]['spaces'] = 0;
|
||||
set[i]['class'] = 'parentNode';
|
||||
}
|
||||
scope.jobevents[i].status = (scope.jobevents[i].failed) ? 'error' : 'success';
|
||||
cDate = new Date(set[i].created);
|
||||
|
||||
@ -54,6 +54,10 @@ angular.module('ChildrenHelper', ['RestServices', 'Utilities'])
|
||||
if (data.results[j].related.children) {
|
||||
data.results[j]['ngclick'] = "toggleChildren(" + data.results[j].id + ", \"" + data.results[j].related.children + "\")";
|
||||
data.results[j]['ngicon'] = 'icon-expand-alt';
|
||||
data.results[j]['class'] = 'parentNode';
|
||||
}
|
||||
else {
|
||||
data.results[j]['class'] = 'childNode';
|
||||
}
|
||||
if (clicked == (set.length - 1)) {
|
||||
set.push(data.results[j]);
|
||||
|
||||
@ -40,7 +40,8 @@ angular.module('JobEventsListDefinition', [])
|
||||
hasChildren: true,
|
||||
ngClick: "toggleChildren(\{\{ jobevent.id \}\}, '\{\{ jobevent.related.children \}\}')",
|
||||
nosort: true,
|
||||
searchable: false
|
||||
searchable: false,
|
||||
ngClass: '\{\{ jobevent.class \}\}'
|
||||
},
|
||||
host: {
|
||||
label: 'Host',
|
||||
|
||||
@ -84,7 +84,7 @@ angular.module('GeneratorHelpers', ['GeneratorHelpers'])
|
||||
html += "<td class=\"" + fld + "-column";
|
||||
html += (field['class']) ? " " + field['class'] : "";
|
||||
html += "\" ";
|
||||
html += (field.ngClass) ? this.attr(field, 'ngClass') : "";
|
||||
html += (field.ngClass) ? Attr(field, 'ngClass') : "";
|
||||
html += ">\n";
|
||||
|
||||
// Add ngShow
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user