Skip to content

Commit

Permalink
do not send pretty label to row evolution request for actions tables (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
diosmosis authored Jul 3, 2023
1 parent 0b6262c commit 45e0e6b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions plugins/CoreHome/javascripts/dataTable_rowactions.js
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ DataTable_RowActions_RowEvolution.prototype.performAction = function (label, tr,
}
} else {
var labelPretty = this.getPrettyLabel(originalRow || tr);
if (labelPretty != label) {
if (labelPretty && labelPretty != label) {
extraParams['labelPretty'] = labelPretty;
}
}
Expand Down Expand Up @@ -369,6 +369,10 @@ DataTable_RowActions_RowEvolution.prototype.performAction = function (label, tr,
};

DataTable_RowActions_RowEvolution.prototype.getPrettyLabel = function getPrettyLabel(tr) {
if (tr.closest('.dataTableActions').length) {
return null; // actions tables don't need to override the pretty label, since they should not have a custom row identifier
}

var prettyLabel = [];

var row = $(tr);
Expand Down Expand Up @@ -402,7 +406,7 @@ DataTable_RowActions_RowEvolution.prototype.addMultiEvolutionRow = function (lab

if (!found) {
this.multiEvolutionRows.push(label);
this.multiEvolutionRowsPretty.push(this.getPrettyLabel(tr))
this.multiEvolutionRowsPretty.push(this.getPrettyLabel(tr));
this.multiEvolutionRowsSeries.push(seriesIndex);
}
} else if ($.inArray(label, this.multiEvolutionRows) === -1) {
Expand Down

0 comments on commit 45e0e6b

Please sign in to comment.