Skip to content

Commit 04d208f

Browse files
missed filters & DeepSee setFilter control type support
1 parent 1c4f8a7 commit 04d208f

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

export/LightPivotTable-DeepSeePortlet.xml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
<Class name="DeepSee.LightPivotTable">
1313
<Super>%DeepSee.Component.Portlet.abstractPortlet</Super>
14-
<TimeChanged>63574,73711.132259</TimeChanged>
14+
<TimeChanged>63574,69706.798517</TimeChanged>
1515
<TimeCreated>63515,61322.546099</TimeCreated>
1616

1717
<Parameter name="INCLUDEFILES">
@@ -137,6 +137,7 @@
137137
var controller = this.getConnectedController(),
138138
source,
139139
setup,
140+
filterValue,
140141
_ = this,
141142
widget = this, // It's lie. It changes later.
142143
widgetKey,
@@ -210,8 +211,11 @@
210211
//console.log(info);
211212
if (info.controls instanceof Array) {
212213
for (i in info.controls) {
213-
if (info.controls[i].action === "applyFilter" && info.controls[i].value) {
214-
defaultFilters.push(info.controls[i].targetProperty + "." + info.controls[i].value);
214+
if ((info.controls[i].action === "applyFilter" || info.controls[i].action === "setFilter") && info.controls[i].value) {
215+
if ((filterValue = info.controls[i].value).charAt(0) === "%" && filterValue.indexOf(" ") > 1) {
216+
filterValue = filterValue.split(" ")[1] + "." + filterValue.split(" ")[0]
217+
}
218+
defaultFilters.push(info.controls[i].targetProperty + "." + filterValue);
215219
}
216220
}
217221
}

source/js/DataSource.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,10 @@ DataSource.prototype.getCurrentData = function (callback) {
130130
pivotData: {}
131131
};
132132

133+
for (var i = 0; i < this.FILTERS.length; i++) {
134+
mdx = mdxParser.applyFilter(mdx, this.FILTERS[i]);
135+
}
136+
133137
var setupPivotOptions = function () {
134138

135139
var data = ready.pivotData;

0 commit comments

Comments
 (0)