mirror of
https://github.com/ansible/awx.git
synced 2026-03-13 23:17:32 -02: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:
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user