File tree Expand file tree Collapse file tree 3 files changed +21
-2
lines changed Expand file tree Collapse file tree 3 files changed +21
-2
lines changed Original file line number Diff line number Diff line change 11
11
12
12
<Class name =" DeepSee.LightPivotTable" >
13
13
<Super >%DeepSee.Component.Portlet.abstractPortlet</Super >
14
- <TimeChanged >63700,68026.762239 </TimeChanged >
14
+ <TimeChanged >63749,65155.748273 </TimeChanged >
15
15
<TimeCreated >63515,61322.546099</TimeCreated >
16
16
17
17
<Parameter name =" INCLUDEFILES" >
151
151
]]> </Implementation >
152
152
</Method >
153
153
154
+ <Method name =" registerLPTOnCreateCallback" >
155
+ <Description >
156
+ Call this method when widget is created to handle moment when pivot table will be created.
157
+ If LPT has been created before, method fires given callback immidiately.</Description >
158
+ <FormalSpec >callback</FormalSpec >
159
+ <Language >javascript</Language >
160
+ <ClientMethod >1</ClientMethod >
161
+ <Implementation ><![CDATA[
162
+ if (typeof callback !== "function") return;
163
+ if (this.LightPivotTable) callback(this.LightPivotTable);
164
+ else this._registeredLPTOnCreateCallback = callback;
165
+ ]]> </Implementation >
166
+ </Method >
167
+
154
168
<Method name =" InitLPT" >
155
169
<Language >javascript</Language >
156
170
<ClientMethod >1</ClientMethod >
296
310
}
297
311
298
312
_.LightPivotTable = new LightPivotTable(setup);
313
+ if (this._registeredLPTOnCreateCallback) this._registeredLPTOnCreateCallback(_.LightPivotTable);
299
314
300
315
// hack to enable some change events
301
316
setTimeout(function () { _._INITIALIZED = true; }, 800);
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " LightPivotTable" ,
3
3
"author" : " ZitRo" ,
4
- "version" : " 1.2.8 " ,
4
+ "version" : " 1.2.9 " ,
5
5
"description" : " A lightweight pivot table for MDX2JSON source for InterSystems Cache" ,
6
6
"main" : " test/testServer.js" ,
7
7
"repository" : {
Original file line number Diff line number Diff line change @@ -99,6 +99,10 @@ build/LightPivotTable.xml</code> into namespace you want. Make sure that MDX2JSO
99
99
installed and configured. Also you may need to change the widget property "MDX2JSON source" to make
100
100
it work with another MDX2JSON source.
101
101
102
+ You can obtain LPT instance from widget by calling widgetInstance.registerLPTOnCreateCallback method.
103
+ This method takes one argument - anonymous function, which will be executed when LPT instance is created.
104
+ The anonymous function takes one argument - LPT instance.
105
+
102
106
## Build
103
107
104
108
You need [ NodeJS] ( http://nodejs.org/ ) platform to be installed in your system to perform any build
You can’t perform that action at this time.
0 commit comments