Skip to content

Commit eb3b31d

Browse files
DeepSee pagination bind, last cell size fix
1 parent 3167699 commit eb3b31d

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

export/LightPivotTable-DeepSeePortlet.xml

Lines changed: 10 additions & 2 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>63566,64710.965337</TimeChanged>
14+
<TimeChanged>63572,75641.723765</TimeChanged>
1515
<TimeCreated>63515,61322.546099</TimeCreated>
1616

1717
<Parameter name="INCLUDEFILES">
@@ -30,6 +30,10 @@
3030
<Type>%Boolean</Type>
3131
</Property>
3232

33+
<Property name="Pagination">
34+
<Type>%Boolean</Type>
35+
</Property>
36+
3337
<Method name="%OnGetPortletName">
3438
<ClassMethod>1</ClassMethod>
3539
<ReturnType>%String</ReturnType>
@@ -54,6 +58,7 @@
5458
set pInfo($I(pInfo)) = $LB("DataSource", "/" _ $NAMESPACE, "%String", $$$Text("MDX2JSON source", "%DeepSee"), "Set the URL of MDX2JSON source. Example: ""/SAMPLES""")
5559
set pInfo($I(pInfo)) = $LB("ShowSummary", 1, "%Boolean", $$$Text("Show summary", "%DeepSee"), "Show summary row")
5660
set pInfo($I(pInfo)) = $LB("ExportCSV", 1, "%Boolean", $$$Text("Export to CSV", "%DeepSee"), "Show export to CSV format button")
61+
set pInfo($I(pInfo)) = $LB("Pagination", 0, "%Integer", $$$Text("Pagination", "%DeepSee"), "Enable pagination")
5762
5863
quit $$$OK
5964
]]></Implementation>
@@ -222,6 +227,9 @@
222227
if (controller && controller["data"] && !setup.caption) setup.caption = controller["data"]["defaultCaption"] || "";
223228
if (info["drillDownDataSource"]) setup["drillDownTarget"] = info["drillDownDataSource"];
224229
setup["showSummary"] = !!parseInt(container.getAttribute("show-summary"));
230+
if (parseInt(container.getAttribute("pagination"))) {
231+
setup["pagination"] = parseInt(container.getAttribute("pagination"))
232+
}
225233
226234
_.LightPivotTable = new LightPivotTable(setup);
227235
}
@@ -310,7 +318,7 @@
310318
}
311319
312320
&html<
313-
<div export-csv="#(..ExportCSV)#" data-source="#(..DataSource)#" show-summary="#(..ShowSummary)#" class="lpt-container" style="position: absolute; left: 0; bottom: 0; width: 100%; height: 100%;">
321+
<div pagination="#(..Pagination)#" export-csv="#(..ExportCSV)#" data-source="#(..DataSource)#" show-summary="#(..ShowSummary)#" class="lpt-container" style="position: absolute; left: 0; bottom: 0; width: 100%; height: 100%;">
314322
315323
</div>
316324
>

source/js/DataSource.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ DataSource.prototype.getCurrentData = function (callback) {
158158

159159
var data = ready.data;
160160

161-
//console.log("Retrieved data:", ready);
161+
console.log("Retrieved data:", ready);
162162

163163
if (mdxType === "drillthrough") {
164164
callback((function (data) {

source/js/PivotView.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,8 @@ PivotView.prototype.recalculateSizes = function (container) {
437437
headerH = topHeader.offsetHeight,
438438
containerHeight = container.offsetHeight,
439439
mainHeaderWidth = headerContainer.offsetWidth,
440-
hasVerticalScrollBar = lTableHead.offsetHeight > containerHeight - headerH - pagedHeight,
440+
hasVerticalScrollBar = Math.max(lTableHead.offsetHeight, pTableHead.offsetHeight)
441+
> containerHeight - headerH - pagedHeight,
441442
addExtraLeftHeaderCell = lTableHead.offsetHeight > containerHeight - headerH - pagedHeight
442443
&& this.SCROLLBAR_WIDTH > 0,
443444
cell, tr, cellWidths = [], columnHeights = [], i;

0 commit comments

Comments
 (0)