mirror of
https://github.com/ansible/awx.git
synced 2026-08-02 02:49:58 -02:30
Inventory refactoring: fixed toggle icon styling. Now job events and inventory group trees use .node-toggle to style collapse/expand icon. Fixed regex issue in Children helper.
This commit is contained in:
@@ -20,7 +20,7 @@ angular.module('ChildrenHelper', ['RestServices', 'Utilities'])
|
||||
var set = scope[list.name]; // set is now a pointer to scope[list.name]
|
||||
|
||||
function expand(node) {
|
||||
set[node]['ngicon'] = 'fa fa-minus-square-o';
|
||||
set[node]['ngicon'] = 'fa fa-minus-square-o node-toggle';
|
||||
for (var i = node + 1; i < set.length; i++) {
|
||||
if (set[i].parent == set[node].id) {
|
||||
set[i]['show'] = true;
|
||||
@@ -32,7 +32,7 @@ angular.module('ChildrenHelper', ['RestServices', 'Utilities'])
|
||||
}
|
||||
|
||||
function collapse(node) {
|
||||
set[node]['ngicon'] = 'fa fa-plus-square-o';
|
||||
set[node]['ngicon'] = 'fa fa-plus-square-o node-toggle';
|
||||
for (var i = node + 1; i < set.length; i++) {
|
||||
if (set[i].parent == set[node].id) {
|
||||
set[i]['show'] = false;
|
||||
@@ -53,7 +53,7 @@ angular.module('ChildrenHelper', ['RestServices', 'Utilities'])
|
||||
}
|
||||
}
|
||||
// Expand or collapse children based on clicked element's icon
|
||||
if (set[clicked]['ngicon'] == 'fa fa-plus-square-o') {
|
||||
if (/plus-square-o/.test(set[clicked]['ngicon'])) {
|
||||
// Expand: lookup and display children
|
||||
expand(clicked);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user