Skip to content

Commit e604896

Browse files
v23entv23ent
authored andcommitted
determine widgetKey from widget
1 parent e06794c commit e604896

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

export/LightPivotTable-DeepSeePortlet.xml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -182,16 +182,12 @@
182182
defaultFilters = [],
183183
exportToExcel = !!parseInt(container.getAttribute("export-csv"));
184184
185-
// !ultra-bydlocode (get the widget object)
186-
// ++ VP
187185
// Following "parent" until we find widget object
188186
while (!widget["widgetKey"]) {
189187
widget = widget["parent"];
190188
}
191-
// -- VP
192189
193-
// !ultra-bydlocode (possible you will have better suggestions to get widget key)
194-
widgetKey = parseInt(_.parent.parent.onwindowgrab.match(/[0-9]+/)[0]);
190+
widgetKey = widget["widgetKey"];
195191
196192
if (exportToExcel) {
197193
var widgetHead = document.getElementById(basicContainer.getAttribute("id").replace(/\/.*/, "/header"));
@@ -266,7 +262,6 @@
266262
}
267263
}
268264
}
269-
// ++ VP
270265
// Getting filters from controller, if it has filters filled...
271266
if (controller.filters.length) {
272267
for (i in controller.filters) {
@@ -277,7 +272,6 @@
277272
for (i in widget.filterState)
278273
if (widget.filterState[i]) defaultFilters.push(widget.constructMDXClause(i,widget.filterState[i]));
279274
}
280-
// -- VP
281275
282276
if (controller.contextFilterSpec) {
283277
defaultFilters.push(controller.contextFilterSpec);

0 commit comments

Comments
 (0)