|
@@ -362,6 +362,11 @@
|
|
<div class="flex-grow-1 overflow-overlay-on-hover">
|
|
<div class="flex-grow-1 overflow-overlay-on-hover">
|
|
<div class="mb-3 d-flex align-items-baseline p-2 border-bottom font-weight-bold">
|
|
<div class="mb-3 d-flex align-items-baseline p-2 border-bottom font-weight-bold">
|
|
<span line-label></span>
|
|
<span line-label></span>
|
|
|
|
+ <div class="ml-3 pl-3 border-left d-inline-flex align-items-baseline">
|
|
|
|
+ <span class="mr-1 font-weight-normal">Goal:</span>
|
|
|
|
+ <span line-goal class="mr-2"></span>
|
|
|
|
+ <a href="#" class="btn-edit-goal"><i class="fa fa-edit"></i></a>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
<div class="d-flex align-items-baseline mb-2 px-2">
|
|
<div class="d-flex align-items-baseline mb-2 px-2">
|
|
<h6 class="font-weight-bold m-0 text-secondary">Argument Values</h6>
|
|
<h6 class="font-weight-bold m-0 text-secondary">Argument Values</h6>
|
|
@@ -1082,6 +1087,7 @@
|
|
displayLabel: node.data.displayLabel,
|
|
displayLabel: node.data.displayLabel,
|
|
clause: node.data.clause,
|
|
clause: node.data.clause,
|
|
columns: node.data.columns,
|
|
columns: node.data.columns,
|
|
|
|
+ goalPercent: node.data.goalPercent,
|
|
};
|
|
};
|
|
let children = [];
|
|
let children = [];
|
|
for (let i = 0; i < node.children.length; i++) {
|
|
for (let i = 0; i < node.children.length; i++) {
|
|
@@ -1145,6 +1151,7 @@
|
|
|
|
|
|
linePropsColumn.removeClass('d-none');
|
|
linePropsColumn.removeClass('d-none');
|
|
linePropsColumn.find('[line-label]').text(selected.data.displayLabel);
|
|
linePropsColumn.find('[line-label]').text(selected.data.displayLabel);
|
|
|
|
+ linePropsColumn.find('[line-goal]').text(selected.data.goalPercent === -1 ? '-' : selected.data.goalPercent + '%');
|
|
|
|
|
|
// fill args
|
|
// fill args
|
|
let tbody = linePropsColumn.find('[line-args]');
|
|
let tbody = linePropsColumn.find('[line-args]');
|
|
@@ -1323,6 +1330,25 @@
|
|
return false;
|
|
return false;
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+ $(document)
|
|
|
|
+ .off('click', '.btn-edit-goal')
|
|
|
|
+ .on('click', '.btn-edit-goal', function() {
|
|
|
|
+ let selected = StatTree.selectedNode();
|
|
|
|
+ let value = window.prompt('New goal (%):', (selected.data.goalPercent !== -1 ? selected.data.goalPercent : ''));
|
|
|
|
+ if(value !== null) {
|
|
|
|
+ if($.trim(value) === '') {
|
|
|
|
+ value = -1;
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ value = +value;
|
|
|
|
+ }
|
|
|
|
+ selected.data.goalPercent = value;
|
|
|
|
+ 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() {
|