mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 10:00:01 -03:30
Fixed list generator to display the desc icon when list key has desc attribute. See jobs tab for example. When first loaded, the jobs list is sorted by job id in desc order, so the desc sort icon now displays in the job id column header.
This commit is contained in:
parent
e1d714a335
commit
4ac2a98eda
@ -722,7 +722,17 @@ angular.module('FormGenerator', ['GeneratorHelpers'])
|
||||
"ng-click=\"sort('" + form.related[itm].iterator + "', '" + fld + "')\">" +
|
||||
form.related[itm]['fields'][fld].label;
|
||||
html += " <i class=\"";
|
||||
html += (form.related[itm].fields[fld].key) ? "icon-sort-up" : "icon-sort";
|
||||
if (form.related[itm].fields[fld].key) {
|
||||
if (form.related[itm].fields[fld].desc) {
|
||||
html += "icon-sort-down";
|
||||
}
|
||||
else {
|
||||
html += "icon-sort-up";
|
||||
}
|
||||
}
|
||||
else {
|
||||
html += "icon-sort";
|
||||
}
|
||||
html += "\"></i></a></th>\n";
|
||||
}
|
||||
html += "<th></th>\n";
|
||||
@ -881,7 +891,18 @@ angular.module('FormGenerator', ['GeneratorHelpers'])
|
||||
"ng-click=\"sort('" + form.related[itm].iterator + "', '" + fld + "')\">" +
|
||||
form.related[itm]['fields'][fld].label;
|
||||
html += " <i class=\"";
|
||||
html += (form.related[itm].fields[fld].key) ? "icon-sort-up" : "icon-sort";
|
||||
//html += (form.related[itm].fields[fld].key) ? "icon-sort-up" : "icon-sort";
|
||||
if (form.related[itm].fields[fld].key) {
|
||||
if (form.related[itm].fields[fld].desc) {
|
||||
html += "icon-sort-down";
|
||||
}
|
||||
else {
|
||||
html += "icon-sort-up";
|
||||
}
|
||||
}
|
||||
else {
|
||||
html += "icon-sort";
|
||||
}
|
||||
html += "\"></i></a></th>\n";
|
||||
}
|
||||
html += "<th></th>\n";
|
||||
|
||||
@ -184,7 +184,17 @@ angular.module('ListGenerator', ['GeneratorHelpers'])
|
||||
for (var fld in list.fields) {
|
||||
html += "<th class=\"list-header\" id=\"" + fld + "-header\" ng-click=\"sort('" + fld + "')\">" + list.fields[fld].label;
|
||||
html += " <i class=\"";
|
||||
html += (list.fields[fld].key) ? "icon-sort-up" : "icon-sort";
|
||||
if (list.fields[fld].key) {
|
||||
if (list.fields[fld].desc) {
|
||||
html += "icon-sort-down";
|
||||
}
|
||||
else {
|
||||
html += "icon-sort-up";
|
||||
}
|
||||
}
|
||||
else {
|
||||
html += "icon-sort";
|
||||
}
|
||||
html += "\"></i></a></th>\n";
|
||||
}
|
||||
if (options.mode == 'select') {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user