|
@@ -1155,7 +1155,7 @@
|
|
for (let i = 0; i < columns.length; i++) {
|
|
for (let i = 0; i < columns.length; i++) {
|
|
$('<tr/>')
|
|
$('<tr/>')
|
|
.append($('<td/>').text(i + 1))
|
|
.append($('<td/>').text(i + 1))
|
|
- .append($('<td/>').text(columns[i].label))
|
|
|
|
|
|
+ .append($('<td/>').text(columns[i].label).append('<a href="#" class="edit-column-label ml-2" data-index="' + i + '"><i class="fa fa-edit text-primary text-sm on-hover-opaque"></i></a>'))
|
|
.append($('<td/>').text(columns[i].display_key))
|
|
.append($('<td/>').text(columns[i].display_key))
|
|
.append($('<td/>').text(columns[i].type))
|
|
.append($('<td/>').text(columns[i].type))
|
|
.append(
|
|
.append(
|
|
@@ -1259,6 +1259,21 @@
|
|
return false;
|
|
return false;
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+ $(document)
|
|
|
|
+ .off('click', '.edit-column-label')
|
|
|
|
+ .on('click', '.edit-column-label', function() {
|
|
|
|
+ let columns = StatTree.getSelectedNodeColumns();
|
|
|
|
+ let index = +($(this).attr('data-index'));
|
|
|
|
+ let value = window.prompt('New label:', columns[+($(this).attr('data-index'))].label || '');
|
|
|
|
+ if(value !== null) {
|
|
|
|
+ columns[index].label = value;
|
|
|
|
+ StatTree.setSelectedNodeColumns(columns);
|
|
|
|
+ StatTree.onSelected();
|
|
|
|
+ StatTree.setDirty();
|
|
|
|
+ }
|
|
|
|
+ return false;
|
|
|
|
+ });
|
|
|
|
+
|
|
$(document)
|
|
$(document)
|
|
.off('click', '.clause-expand-all')
|
|
.off('click', '.clause-expand-all')
|
|
.on('click', '.clause-expand-all', function() {
|
|
.on('click', '.clause-expand-all', function() {
|