change
This commit is contained in:
@@ -1566,6 +1566,7 @@ var Unibase;
|
||||
ColorAppliedOn: chartSelectedColumn.ColorType || chartSelectedColumn.ColorAppliedOn,
|
||||
IsChartBaseColumn: chartSelectedColumn.IsBaseColumn,
|
||||
IsNumAbb: chartSelectedColumn.IsNumAbb == undefined ? true : chartSelectedColumn.IsNumAbb,
|
||||
ToolTipIndex: tooltip ? tooltip.Index : 0
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1635,7 +1636,7 @@ var Unibase;
|
||||
}
|
||||
var tIndex = instance.getIndexByDisplayText_tooltipColumnsArray(data.text);
|
||||
if (tIndex == -1) {
|
||||
instance.toolTipArray.push({ ColumnId: Number(data.id), ColumnName: data.text, DisplayText: data.text, AliasName: data.text });
|
||||
instance.toolTipArray.push({ ColumnId: Number(data.id), ColumnName: data.text, DisplayText: data.text, AliasName: data.text, ToolTipIndex: 0 });
|
||||
}
|
||||
instance.ChartSelectedColumns = instance.coordinate_Elements(true, true, true, true, true, true);
|
||||
instance.chartData();
|
||||
@@ -1792,8 +1793,7 @@ var Unibase;
|
||||
}
|
||||
changeIndexOfElementsInArray(arr, fromIndex, toIndex) {
|
||||
let element = arr[fromIndex];
|
||||
arr.splice(fromIndex, 1);
|
||||
arr.splice(toIndex, 0, element);
|
||||
element.Index = toIndex + 1;
|
||||
}
|
||||
updateshowTooltipTitleProp(showTooltip) {
|
||||
$("#showtooltipheader_checkbox").prop("checked", showTooltip);
|
||||
|
||||
@@ -511,6 +511,7 @@ var Unibase;
|
||||
var instance = this;
|
||||
instance.DatasetTooltips = [];
|
||||
if (instance.toolTipArray.length > 0) {
|
||||
instance.toolTipArray.sort((x, y) => Number(x.Index) - Number(y.Index));
|
||||
for (var i = 0; i < instance.toolTipArray.length; i++) {
|
||||
var tooltiparr = instance.toolTipArray[i];
|
||||
let Labelarr = [];
|
||||
@@ -2007,11 +2008,12 @@ var Unibase;
|
||||
prepareAndBindToolTipColumns(ChartColumns) {
|
||||
let tooltipColumns = ChartColumns.filter(x => x.IsToolTip);
|
||||
let cols = this.getReportColumns();
|
||||
for (var i = 0; i < tooltipColumns.length; i++) {
|
||||
var tCols = tooltipColumns.sort((x, y) => Number(x.ToolTipIndex) - Number(y.ToolTipIndex));
|
||||
for (var i = 0; i < tCols.length; i++) {
|
||||
let idx = cols.findIndex(x => x.AliasName == tooltipColumns[i].AliasName);
|
||||
if (idx > -1) {
|
||||
let col = cols[idx];
|
||||
this.toolTipArray.push({ ColumnValue: col.ColumnValue, ColumnName: col.ReportColumnName, DisplayText: col.DisplayText, AliasName: col.AliasName, Index: col.ColumnIndex });
|
||||
this.toolTipArray.push({ ColumnValue: col.ColumnValue, ColumnName: col.ReportColumnName, DisplayText: col.DisplayText, AliasName: col.AliasName, Index: tooltipColumns[i].ToolTipIndex });
|
||||
if (this._reportBuilder.isEdit) {
|
||||
var html = this._reportBuilderTemplate.loadToolTipColumn(col.ReportColumnId, col.AliasName, col.DataType, col.DisplayText);
|
||||
$("#tab_tooltip #tooltip_selected_columns").append(html);
|
||||
|
||||
@@ -590,6 +590,7 @@ var Unibase;
|
||||
$("#dynFilParentProperty_AutoComplete").val(dynamicfilters[0].ParentColumn).trigger("change");
|
||||
$("#dynFilApplyFor_AutoComplete").val(dynamicfilters[0].ApplyFor).trigger("change");
|
||||
}
|
||||
$('#dataList_AutoComplete').attr('disabled', 'true');
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -332,14 +332,19 @@ var Unibase;
|
||||
instance.fileCacheHelper.loadJsFile("libs/pivottable/js/pivot.js", function () {
|
||||
var rptRowCols = [];
|
||||
var rptColumnCols = [];
|
||||
let rptDisplayTexts = [];
|
||||
if (instance._reportBuilder.ReportColumns.length != 0) {
|
||||
for (var p = 0; p < instance._reportBuilder.ReportColumns.length; p++) {
|
||||
if (instance._reportBuilder.ReportColumns[p].IsPivotTableCol) {
|
||||
rptColumnCols.push("" + instance._reportBuilder.ReportColumns[p].AliasName + "");
|
||||
const { IsPivotTableCol, AliasName, DisplayText, ReportColumnId, Isvisible } = instance._reportBuilder.ReportColumns[p];
|
||||
if (IsPivotTableCol) {
|
||||
rptColumnCols.push(AliasName);
|
||||
}
|
||||
else {
|
||||
rptRowCols.push("" + instance._reportBuilder.ReportColumns[p].AliasName + "");
|
||||
else if (Isvisible) {
|
||||
rptRowCols.push(AliasName);
|
||||
}
|
||||
rptDisplayTexts[AliasName] = {
|
||||
ReportColumnId, DisplayText
|
||||
};
|
||||
}
|
||||
}
|
||||
let containerEl = $("#tabulatorReportbuilder");
|
||||
@@ -350,14 +355,33 @@ var Unibase;
|
||||
rendererName: "Table",
|
||||
onRefresh: function (config) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const pvtUnusedList = [];
|
||||
containerEl.find('.pvtUnused .pvtAttr').each(function (i, e) {
|
||||
pvtUnusedList.push($(e).contents().get(0).nodeValue);
|
||||
var hiddencol_index = instance._reportBuilder.getIndexByAliasName_selectedColumnsArray($(e).contents().get(0).nodeValue);
|
||||
containerEl.find('.pvtAxisLabel').each(function (i, e) {
|
||||
const aliasName = $(e).contents().get(0).nodeValue;
|
||||
$(e).contents().get(0).nodeValue = rptDisplayTexts[aliasName].DisplayText;
|
||||
$(e).attr('id', `pvtAxisLabel_${aliasName}`);
|
||||
});
|
||||
containerEl.find('.pvtAttr').each(function (i, e) {
|
||||
const aliasName = $(e).find('.pvtDisplayText').attr('data-aliasname');
|
||||
const isUnused = $(e).closest('.pvtUnused').length;
|
||||
const isRowCol = $(e).closest('.pvtRows').length;
|
||||
var hiddencol_index = instance._reportBuilder.getIndexByAliasName_selectedColumnsArray(aliasName);
|
||||
const selectedColumn = instance._reportBuilder.selectedColumns[hiddencol_index];
|
||||
if (hiddencol_index > -1) {
|
||||
instance._reportBuilder.selectedColumns[hiddencol_index].Isvisible = false;
|
||||
if (isUnused || isRowCol) {
|
||||
if (isUnused) {
|
||||
selectedColumn.Isvisible = false;
|
||||
}
|
||||
else {
|
||||
selectedColumn.Isvisible = true;
|
||||
}
|
||||
selectedColumn.IsPivotTableCol = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
containerEl.find('.pvtRows,.pvtCols').find('.pvtDisplayText').addClass('hidden');
|
||||
containerEl.find('.pvtRows,.pvtCols').find('.pvtDisplayTextInput').removeClass('hidden');
|
||||
containerEl.find('.pvtUnused .pvtDisplayText').removeClass('hidden');
|
||||
containerEl.find('.pvtUnused .pvtDisplayTextInput').addClass('hidden');
|
||||
for (var c = 0; c < config.cols.length; c++) {
|
||||
var index = instance._reportBuilder.getIndexByAliasName_selectedColumnsArray(config.cols[c]);
|
||||
if (index > -1) {
|
||||
@@ -375,7 +399,7 @@ var Unibase;
|
||||
}
|
||||
});
|
||||
instance._reportBuilder.EditableTabulatorTitle();
|
||||
containerEl.find('.pvtAttr').append('<span></span>');
|
||||
instance.appendInputToPivotRows(rptDisplayTexts);
|
||||
containerEl.addClass('pivot-ui-tableview');
|
||||
containerEl.find('button').each(function (i, e) {
|
||||
if ($(e).text().toLowerCase().includes('cancel')) {
|
||||
@@ -388,6 +412,16 @@ var Unibase;
|
||||
});
|
||||
});
|
||||
}
|
||||
appendInputToPivotRows(rptDisplayTexts) {
|
||||
$("#tabulatorReportbuilder .pvtAttr").contents().filter(function () {
|
||||
return this.nodeType === Node.TEXT_NODE;
|
||||
}).each(function (i, el) {
|
||||
const aliasName = $(el).text();
|
||||
const isUsedCol = $(el).closest('.pvtRows,.pvtCols').length;
|
||||
const { ReportColumnId, DisplayText } = rptDisplayTexts[aliasName];
|
||||
$(el).after(`<span class="pvtDisplayText ${isUsedCol ? 'hidden' : ''}" data-aliasname=${aliasName}>${DisplayText}</span><input type="text" value="${DisplayText}" class="pvtDisplayTextInput ${!isUsedCol ? 'hidden' : ''}" id="pvtDisplayTextInput_${aliasName}" onchange="Unibase.Platform.Analytics.Reports.ReportBuilder.Instance().changeDisplayText_table(${ReportColumnId},'${aliasName}')"/>`).remove();
|
||||
});
|
||||
}
|
||||
getPivotAggregationTypeId(aggrName) {
|
||||
var aggrtypeid = 0;
|
||||
var instance = this;
|
||||
|
||||
@@ -1101,8 +1101,10 @@ var Unibase;
|
||||
rowClick: function (e, row) {
|
||||
},
|
||||
cellClick: function (e, cell) {
|
||||
var Interval = cell["_cell"].column.definition.title;
|
||||
Unibase.Platform.Analytics.Reports.Tenure.Instance().tenureDetailsTable(Interval);
|
||||
if ($(cell.getElement()).closest('.tabulator-footer').length === 0) {
|
||||
var Interval = cell["_cell"].column.definition.title;
|
||||
Unibase.Platform.Analytics.Reports.Tenure.Instance().tenureDetailsTable(Interval);
|
||||
}
|
||||
},
|
||||
placeholder: "No data available",
|
||||
columnResized: function (column) {
|
||||
@@ -1509,13 +1511,29 @@ var Unibase;
|
||||
}
|
||||
changeDisplayText_table(columnId, aliasName) {
|
||||
var instance = this;
|
||||
let displayText = $("[tabulator-field = '" + aliasName + "']").find(".tabulator-title-editor").val().toString();
|
||||
let displayText = '';
|
||||
let isPivotTable = false;
|
||||
const containerEl = $('#tabulatorReportbuilder');
|
||||
if (containerEl.find('.pvtUi').length !== 0) {
|
||||
isPivotTable = true;
|
||||
}
|
||||
if (isPivotTable) {
|
||||
displayText = containerEl.find(`#pvtDisplayTextInput_${aliasName}`).val().toString();
|
||||
}
|
||||
else {
|
||||
displayText = $(`[tabulator-field='${aliasName}'] .tabulator-title-editor`).val().toString();
|
||||
}
|
||||
if (displayText) {
|
||||
let sIndex = instance.getIndexByAliasName_selectedColumnsArray(aliasName);
|
||||
if (sIndex > -1) {
|
||||
instance.selectedColumns[sIndex].DisplayText = displayText;
|
||||
$(".tabulator-col-title").find("#DisplayText_" + aliasName).val(displayText);
|
||||
$(".tabulator-col-title").find("#DisplayText_" + aliasName).focus();
|
||||
if (isPivotTable) {
|
||||
containerEl.find(`#pvtAxisLabel_${aliasName}`).contents().get(0).nodeValue = displayText;
|
||||
}
|
||||
else {
|
||||
$(".tabulator-col-title").find("#DisplayText_" + aliasName).val(displayText);
|
||||
$(".tabulator-col-title").find("#DisplayText_" + aliasName).focus();
|
||||
}
|
||||
$("#selectedColumns #column_" + aliasName + "_block").find(".dsl-block-name").text(displayText);
|
||||
}
|
||||
let xIdx = this._chartBuilder.xaxisColumns.findIndex(x => x.AliasName == aliasName);
|
||||
|
||||
@@ -47,7 +47,7 @@ var Unibase;
|
||||
loadToolTipColumn(ColumnId, AliasName, DataType, DisplayText) {
|
||||
let tooltipHtml = `<div class="dsl-block datagroup inline-edit" id="dsl_tool_column_${AliasName}">
|
||||
<span>
|
||||
<i class="las la-braille dragger hidden"></i>
|
||||
<i class="las la-braille dragger mr-1"></i>
|
||||
<div class="dsl-block-name position-relative flex-grow-1 mw-100">
|
||||
<input type="text" id="txttooltipedit" required="required" value="${DisplayText}" class="edit text-truncate" disabled>
|
||||
<button type="reset" title="Click me to clear the input field" class="btn btn-icon btn-flush-biz-theme btn-rounded flush-soft-hover d-20 reset-text hidden reset-text hidden" onclick ="Unibase.Platform.Analytics.Charts.ChartBuilder.Instance().toolTipEdit('${AliasName}')"><span class="btn-icon-wrap"><i class="icon dripicons-cross"></i></span></button>
|
||||
|
||||
@@ -2025,6 +2025,8 @@ ${instance.getViewAllHtml(containerid, 'desktop', reportid)}
|
||||
let rv_ins = instance.getReportViewerInstance(containerid);
|
||||
if (rv_ins && rv_ins.PageSize)
|
||||
instance.PageSize = rv_ins.PageSize;
|
||||
instance.filterId = filterid;
|
||||
instance._applyfilter(reportid, containerid);
|
||||
instance.loadFilteredReport(reportid, filterid, containerid);
|
||||
}
|
||||
statusFilters(statusname) {
|
||||
@@ -2880,7 +2882,9 @@ ${instance.getViewAllHtml(containerid, 'desktop', reportid)}
|
||||
if (rv_instance && rv_instance.PageSize)
|
||||
instance.PageSize = rv_instance.PageSize;
|
||||
!ErrorProduced && instance.loadFilteredReport(reportid, instance.filterId ? instance.filterId : rv_instance.filterId, containerid);
|
||||
!ErrorProduced && $(`#filter-icon${containerid}`).dropdown('toggle');
|
||||
if (!ErrorProduced && $(`#biz-filter-dropdown${containerid}`).hasClass('show')) {
|
||||
$(`#filter-icon${containerid}`).dropdown('toggle');
|
||||
}
|
||||
if (ErrorProduced) {
|
||||
instance.navigationHelper.hideLoading();
|
||||
rv_instance.dynamicFilters = [];
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -11,6 +11,9 @@ var Unibase;
|
||||
this.server = {
|
||||
Connect: function (packet, callback) {
|
||||
Unibase.Platform.Automation.Hubs.NotificationHub.Instance(_appsettings.notification_url()).invoke("Connect", packet, callback);
|
||||
},
|
||||
ClearOnlineUsers: function (sessionId, callback) {
|
||||
Unibase.Platform.Automation.Hubs.NotificationHub.Instance(_appsettings.notification_url()).invoke("ClearOnlineUsers", sessionId, callback);
|
||||
}
|
||||
};
|
||||
this.huburl = huburl;
|
||||
|
||||
@@ -55,6 +55,7 @@ var Unibase;
|
||||
this._notificationHub = Automation.Hubs.NotificationHub.Instance(_appsettings.notification_url());
|
||||
this.connection = this._notificationHub;
|
||||
this.start();
|
||||
Notifier.Instance().ClearOnlineUsers();
|
||||
}
|
||||
playAudio(audiotype) {
|
||||
var obj = document.createElement("audio");
|
||||
@@ -66,6 +67,11 @@ var Unibase;
|
||||
getAudioUrl(audiotype) {
|
||||
return this.audiolibrary[Number(audiotype)];
|
||||
}
|
||||
ClearOnlineUsers() {
|
||||
var timerID = setInterval(function () {
|
||||
Notifier.Instance()._notificationHub.server.ClearOnlineUsers(Unibase.Platform.Membership.Infos.Identity.currentUser.sessionId, null);
|
||||
}, 1800000);
|
||||
}
|
||||
seedAudioLibrary() {
|
||||
if (this.audiolibrary === undefined)
|
||||
this.audiolibrary = new Array();
|
||||
|
||||
Vendored
+5
-5
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+7
-7
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user