Skip to content

Commit bc6521e

Browse files
table header fix
1 parent 0f75423 commit bc6521e

File tree

2 files changed

+4
-23
lines changed

2 files changed

+4
-23
lines changed

source/js/DataController.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ DataController.prototype.TOTAL_FUNCTIONS = {
285285
DataController.prototype.resetRawData = function () {
286286

287287
var data, summary, y, x,
288+
dimCaption,
288289
_ = this;
289290

290291
if (!(data = this._dataStack[this._dataStack.length - 1].data)) {
@@ -306,7 +307,6 @@ DataController.prototype.resetRawData = function () {
306307

307308
dim1raw(rd0, c, arr, true);
308309

309-
// @hotfix https://github.com/intersystems-ru/Cache-MDX2JSON/issues/29
310310
var i, maxLen = 0;
311311
for (i in rd0) { if (rd0[i].length > maxLen) maxLen = rd0[i].length; }
312312
for (i in rd0) { for (var u = rd0[i].length; u < maxLen; u++) {
@@ -406,6 +406,8 @@ DataController.prototype.resetRawData = function () {
406406

407407
if (data.dimensions[0].length) dim0raw(rd0, data.dimensions[0]);
408408
if (data.dimensions[1].length) dim1raw(rd1, data.dimensions[1]);
409+
console.log(rd1[0][rd1[0].length - 1]);
410+
if (rd1[0]) dimCaption = (rd1[0][rd1[0].length - 1] || { source: {} }).source["dimension"];
409411

410412
var xw = (rd0[0] || []).length,
411413
yh = rd1.length || data.info.rowCount || 0,
@@ -422,6 +424,7 @@ DataController.prototype.resetRawData = function () {
422424
group: 1,
423425
isCaption: true,
424426
value: this.controller.CONFIG["caption"]
427+
|| dimCaption
425428
|| (data["info"] || {})["cubeName"]
426429
|| ""
427430
};

source/js/DataSource.js

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,6 @@ var DataSource = function (config, globalConfig, lpt) {
2929

3030
this.FILTERS = [];
3131

32-
/**
33-
* @type {Array}
34-
* @private
35-
* @deprecated
36-
*/
37-
this._PIVOT_DEFAULT_FILTERS = [];
38-
3932
};
4033

4134
/**
@@ -142,7 +135,6 @@ DataSource.prototype.getCurrentData = function (callback) {
142135
var data = ready.pivotData;
143136

144137
_.GLOBAL_CONFIG["pivotProperties"] = ready.pivotData;
145-
//_._PIVOT_DEFAULT_FILTERS = [];
146138

147139
if (data["rowAxisOptions"]) {
148140
if (data["rowAxisOptions"]["drilldownSpec"]) {
@@ -160,14 +152,6 @@ DataSource.prototype.getCurrentData = function (callback) {
160152
}
161153
}
162154

163-
//if (data["filters"] && data["filters"].length > 0) {
164-
// for (var i in data["filters"]) {
165-
// if (data["filters"][i]["spec"]) {
166-
// _._PIVOT_DEFAULT_FILTERS.push(data["filters"][i]["spec"]);
167-
// }
168-
// }
169-
//}
170-
171155
};
172156

173157
var handleDataReady = function () {
@@ -224,12 +208,6 @@ DataSource.prototype.getCurrentData = function (callback) {
224208

225209
var requestData = function () {
226210

227-
//var filters = _._PIVOT_DEFAULT_FILTERS.concat(_.FILTERS);
228-
//
229-
//for (var i in filters) {
230-
// mdx = mdxParser.applyFilter(mdx, filters[i]);
231-
//}
232-
233211
console.log("LPT MDX request:", mdx);
234212

235213
_._post(

0 commit comments

Comments
 (0)