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 >63564,79829.955132 </TimeChanged >
14+ <TimeChanged >63565,62684.158342 </TimeChanged >
1515<TimeCreated >63515,61322.546099</TimeCreated >
1616
1717<Parameter name =" INCLUDEFILES" >
143143 widget = this, // It's lie. It changes later.
144144 widgetKey,
145145 i, info = {},
146+ defaultFilters = [],
146147 exportToExcel = !!parseInt(container.getAttribute("export-csv"));
147148
148149 // !ultra-bydlocode (get the widget object)
209210 }
210211 }
211212 //console.log(info);
213+ if (info.controls instanceof Array) {
214+ for (i in info.controls) {
215+ if (info.controls[i].action === "applyFilter" && info.controls[i].value) {
216+ defaultFilters.push(info.controls[i].targetProperty + "." + info.controls[i].value);
217+ }
218+ }
219+ }
212220 setup = {
213221 container: container,
214222 dataSource: {
215223 pivot: info["dataSource"],
216224 MDX2JSONSource: source,
217- basicMDX: info["mdx"]
225+ basicMDX: info["basemdx"] || info[" mdx"]
218226 }
219227 }
228+ if (defaultFilters.length) { setup["defaultFilterSpecs"] = defaultFilters; }
220229 if (controller && controller["data"] && controller["data"]["rowCaptions"] && typeof controller["data"]["rowCaptions"][0] === "string") setup.caption = controller["data"]["rowCaptions"][0];
221230 if (controller && controller["data"] && !setup.caption) setup.caption = controller["data"]["defaultCaption"] || "";
222231 if (info["drillDownDataSource"]) setup["drillDownTarget"] = info["drillDownDataSource"];
Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ var setup = { // Object that contain settings. Any setting may be missed.
5959 [ , conditionalFormattingOn: true ] // pass false to turn off conditional formatting
6060 [ , loadingMessageHTML: " LOADING DATA..." ] // HTML displaying during data load
6161 [ , enableHeadersScrolling: false ] // enable scrolling both for table and headers. Useful for mobile devices.
62+ [ , defaultFilterSpecs: [" [Date].[H1].[month].&[]" ] ] // default filters array
6263 [ , drillDownTarget: " <dashboard name>" ] // deepSee only - dashboard to open
6364 },
6465 lp = new LightPivotTable (setup);
Original file line number Diff line number Diff line change 4949}
5050
5151.lpt tr : hover td {
52- background : # FFF7D7 ;
52+ box-shadow : inset 0 0 30 px # FFF7D7 ;
5353}
5454
5555.lpt table td : hover {
56- background : # FFEEAA ;
56+ box-shadow : inset 0 0 20 px # FEA ;
5757}
5858
5959/* DeepSee theme */
Original file line number Diff line number Diff line change @@ -47,7 +47,14 @@ var LightPivotTable = function (configuration) {
4747 */
4848LightPivotTable . prototype . refresh = function ( ) {
4949
50- var _ = this ;
50+ var _ = this ,
51+ i ;
52+
53+ if ( this . CONFIG [ "defaultFilterSpecs" ] instanceof Array ) {
54+ for ( i in this . CONFIG [ "defaultFilterSpecs" ] ) {
55+ this . setFilter ( this . CONFIG [ "defaultFilterSpecs" ] [ i ] ) ;
56+ }
57+ }
5158
5259 this . dataSource . getCurrentData ( function ( data ) {
5360 if ( _ . dataController . isValidData ( data ) ) {
You can’t perform that action at this time.
0 commit comments