File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111
1212<Class name =" DeepSee.LightPivotTable" >
1313<Super >%DeepSee.Component.Portlet.abstractPortlet</Super >
14- <TimeChanged >63565,64700.290542 </TimeChanged >
14+ <TimeChanged >63566,4522.006886 </TimeChanged >
1515<TimeCreated >63515,61322.546099</TimeCreated >
1616
1717<Parameter name =" INCLUDEFILES" >
247247<ClientMethod >1</ClientMethod >
248248<Implementation ><![CDATA[
249249 if (!this.LightPivotTable) return;
250+
251+ if (location.pathname.indexOf("DeepSee") > -1) {
252+ window.open(
253+ location.href.replace(/(%|_)(25)?DeepSee.*/, "_DeepSee.UI.MDXExcel.zen?MDX=")
254+ + encodeURIComponent(this.LightPivotTable.getActualMDX())
255+ );
256+ return;
257+ }
258+
250259 var link = document.createElement("a"),
251260 csvData = [], preservedGroups = {},
252261 rawData = this.LightPivotTable.dataController.getData(),
Original file line number Diff line number Diff line change 11{
22 "name" : " LightPivotTable" ,
33 "author" : " ZitRo" ,
4- "version" : " 1.0.0-beta.2 " ,
4+ "version" : " 1.0.0-beta.3 " ,
55 "description" : " A lightweight pivot table for MDX2JSON source for InterSystems Cache" ,
66 "main" : " test/testServer.js" ,
77 "repository" : {
Original file line number Diff line number Diff line change @@ -76,6 +76,7 @@ lp.setFilter("[DateOfSale].[Actual].[YearSold].&[2009]");
7676lp .refresh (); // refresh pivot contents
7777lp .updateSizes (); // recalculate pivot sizes
7878lp .changeBasicMDX (" ..." ); // change basic mdx
79+ lp .getActualMDX (); // get the current mdx
7980```
8081
8182#### Caché DeepSee
Original file line number Diff line number Diff line change @@ -77,6 +77,24 @@ LightPivotTable.prototype.changeBasicMDX = function (mdx) {
7777
7878} ;
7979
80+ /**
81+ * Returns current mdx including filters.
82+ * @returns {string }
83+ */
84+ LightPivotTable . prototype . getActualMDX = function ( ) {
85+
86+ var mdx = this . CONFIG . dataSource . basicMDX ,
87+ mdxParser = new MDXParser ( ) ,
88+ filters = this . dataSource . _PIVOT_DEFAULT_FILTERS . concat ( this . dataSource . FILTERS ) ;
89+
90+ for ( var i in filters ) {
91+ mdx = mdxParser . applyFilter ( mdx , filters [ i ] ) ;
92+ }
93+
94+ return mdx ;
95+
96+ } ;
97+
8098/**
8199 * Performs resizing.
82100 */
You can’t perform that action at this time.
0 commit comments