This commit is contained in:
2023-03-16 21:58:34 +00:00
parent 1cf637698e
commit 5561826960
177 changed files with 358 additions and 295 deletions
@@ -162,22 +162,24 @@ var Unibase;
}
},
cellClick: function (e, cell) {
if (instance.subreportResponse && instance.subreportResponse.length) {
let cellAliasName = cell._cell.column.field;
let subRpt = instance.subreportResponse.find(x => x.AliasName == cellAliasName);
if (subRpt) {
return instance.tableCellClick(e, cell, level, reportid, instance.subreportResponse, containerid);
if ($(cell.getElement()).closest('.tabulator-footer').length === 0) {
if (instance.subreportResponse && instance.subreportResponse.length) {
let cellAliasName = cell._cell.column.field;
let subRpt = instance.subreportResponse.find(x => x.AliasName == cellAliasName);
if (subRpt) {
return instance.tableCellClick(e, cell, level, reportid, instance.subreportResponse, containerid);
}
}
var row = cell.getRow();
let onclick = rv_instance.ViewerSettings.OnClick.trim();
let InstalledAppId = rv_instance.ViewerSettings.InstalledAppId;
if (onclick) {
onclick = onclick.replace("{{appinstalledappid}}", InstalledAppId.toString());
let row_data = row.getData();
var templateScript = Handlebars.compile(onclick);
onclick = templateScript(row_data);
eval(onclick);
}
}
var row = cell.getRow();
let onclick = rv_instance.ViewerSettings.OnClick.trim();
let InstalledAppId = rv_instance.ViewerSettings.InstalledAppId;
if (onclick) {
onclick = onclick.replace("{{appinstalledappid}}", InstalledAppId.toString());
let row_data = row.getData();
var templateScript = Handlebars.compile(onclick);
onclick = templateScript(row_data);
eval(onclick);
}
},
ajaxProgressiveLoadScrollMargin: 500,
@@ -518,7 +520,9 @@ var Unibase;
subreportdata.forEach(function (subreport) {
if (subreport.AliasName && instance._reportViewer.table.getColumn(subreport.AliasName)) {
instance._reportViewer.table.getColumn(subreport.AliasName).getCells().forEach(function (cell) {
$(cell.getElement()).addClass("text-underline clickable-cell");
if ($(cell.getElement()).closest('.tabulator-footer').length === 0) {
$(cell.getElement()).addClass("text-underline clickable-cell");
}
});
}
});
@@ -1120,8 +1124,10 @@ var Unibase;
movableColumns: true,
resizableColumns: !instance.isTouchScreen ? true : 'header',
cellClick: function (e, cell) {
var subres = JSON.parse(subresponse.result.toString());
instance.tableCellClick(e, cell, level, mainreportid, subres, containerid);
if ($(cell.getElement()).closest('.tabulator-footer').length === 0) {
var subres = JSON.parse(subresponse.result.toString());
instance.tableCellClick(e, cell, level, mainreportid, subres, containerid);
}
}
});
let cols = [];
@@ -1529,6 +1535,11 @@ var Unibase;
const pvtTableEl = viewerEl.find('.pvtTable');
$(`#exportCSVBtn_${containerid}`).removeClass('d-none');
$(`#DownloadReport_${containerid}`).addClass('d-none');
pvtTableEl.find('.pvtAxisLabel').each(function (i, e) {
const aliasName = $(e).contents().get(0).nodeValue;
const displayText = rv_instance.reportColumns.find(col => col.AliasName === aliasName).DisplayText;
$(e).contents().get(0).nodeValue = displayText;
});
underlineCols.forEach((column) => {
if (pvtTableEl.find(`.pvtAxisLabel:contains("${column}")`).siblings('.pvtColLabel').length > 0) {
pvtTableEl.find('.pvtVal[data-value!="null"]').addClass('text-underline');