Skip to content

Commit f9751ef

Browse files
fixed DeepSee widget body sizes + overflowing widget header fix
1 parent 32b6b4c commit f9751ef

File tree

2 files changed

+22
-7
lines changed

2 files changed

+22
-7
lines changed

example/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
// if cellDrillThrough callback returns boolean false, DrillThrough won't be performed.
103103
//, cellDrillThrough: function ({Object { event: {event}, filters: {string[]} }}) {}
104104
}
105-
//, pagination: 30 // Enables pagination. Pass a number of lines to show by page.
105+
, pagination: 40 // Enables pagination. Pass a number of lines to show by page.
106106
//, hideButtons: true // hides "back" and "drillThrough" buttons
107107
//, triggerEvent: "touchstart" // all "click" events will be replaced by this event
108108
//, caption: "My table" // if set, table basic caption will be replaced by this text

export/LightPivotTable-DeepSeePortlet.xml

Lines changed: 21 additions & 6 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>63572,75641.723765</TimeChanged>
14+
<TimeChanged>63572,80952.436177</TimeChanged>
1515
<TimeCreated>63515,61322.546099</TimeCreated>
1616

1717
<Parameter name="INCLUDEFILES">
@@ -100,6 +100,7 @@
100100
this.LightPivotTable.CONFIG["defaultFilterSpecs"].push(controller.filters[i].spec);
101101
}
102102
103+
this.adjustContentSize(false, 0, 0, true);
103104
this.LightPivotTable.refresh();
104105
105106
}
@@ -326,7 +327,7 @@
326327
</Method>
327328

328329
<Method name="adjustContentSize">
329-
<FormalSpec>load,width,height</FormalSpec>
330+
<FormalSpec>load,width,height,flag</FormalSpec>
330331
<Language>javascript</Language>
331332
<ClientMethod>1</ClientMethod>
332333
<Implementation><![CDATA[
@@ -336,22 +337,36 @@
336337
return;
337338
}
338339
339-
//////// cheat-codes to fix instrument panel height /////////
340+
//////// cheating to fix instrument panel height /////////
340341
var outContainer = document.getElementById(_.id),
342+
widgetHead = document.getElementById(outContainer.getAttribute("id").replace(/\/.*/, "/header")),
341343
inContainer;
342344
345+
// cheating to fix widget size when widget head change size
346+
var dragChildren = outContainer.parentNode.parentNode.parentNode.parentNode.parentNode
347+
.parentNode.parentNode.parentNode.parentNode.parentNode;
348+
dragChildren = dragChildren.className === "dragChildren"
349+
? dragChildren
350+
: (dragChildren.getElementsByClassName("dragChildren") || [])[0];
351+
// -
352+
343353
if (outContainer) {
344354
for (var i in outContainer.childNodes) {
345355
if (outContainer.childNodes[i].className === "lpt-container") {
346356
inContainer = outContainer.childNodes[i];
347-
inContainer.style.height = outContainer.clientHeight + "px";
348-
break;
357+
if (widgetHead && dragChildren) {
358+
inContainer.style.height = dragChildren.offsetHeight - widgetHead.offsetHeight + "px";
359+
//console.log(dragChildren.offsetHeight - widgetHead.offsetHeight);
360+
} else {
361+
inContainer.style.height = outContainer.clientHeight + "px";
362+
break;
363+
}
349364
}
350365
}
351366
}
352367
/////////////////////////////////////////////////////////////
353368
354-
if (!this.LightPivotTable) {
369+
if (!this.LightPivotTable || flag === true) {
355370
return;
356371
}
357372

0 commit comments

Comments
 (0)