|
11 | 11 |
|
12 | 12 | <Class name="DeepSee.LightPivotTable"> |
13 | 13 | <Super>%DeepSee.Component.Portlet.abstractPortlet</Super> |
14 | | -<TimeChanged>63572,75641.723765</TimeChanged> |
| 14 | +<TimeChanged>63572,80952.436177</TimeChanged> |
15 | 15 | <TimeCreated>63515,61322.546099</TimeCreated> |
16 | 16 |
|
17 | 17 | <Parameter name="INCLUDEFILES"> |
|
100 | 100 | this.LightPivotTable.CONFIG["defaultFilterSpecs"].push(controller.filters[i].spec); |
101 | 101 | } |
102 | 102 |
|
| 103 | + this.adjustContentSize(false, 0, 0, true); |
103 | 104 | this.LightPivotTable.refresh(); |
104 | 105 |
|
105 | 106 | } |
|
326 | 327 | </Method> |
327 | 328 |
|
328 | 329 | <Method name="adjustContentSize"> |
329 | | -<FormalSpec>load,width,height</FormalSpec> |
| 330 | +<FormalSpec>load,width,height,flag</FormalSpec> |
330 | 331 | <Language>javascript</Language> |
331 | 332 | <ClientMethod>1</ClientMethod> |
332 | 333 | <Implementation><![CDATA[ |
|
336 | 337 | return; |
337 | 338 | } |
338 | 339 |
|
339 | | - //////// cheat-codes to fix instrument panel height ///////// |
| 340 | + //////// cheating to fix instrument panel height ///////// |
340 | 341 | var outContainer = document.getElementById(_.id), |
| 342 | + widgetHead = document.getElementById(outContainer.getAttribute("id").replace(/\/.*/, "/header")), |
341 | 343 | inContainer; |
342 | 344 |
|
| 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 | +
|
343 | 353 | if (outContainer) { |
344 | 354 | for (var i in outContainer.childNodes) { |
345 | 355 | if (outContainer.childNodes[i].className === "lpt-container") { |
346 | 356 | 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 | + } |
349 | 364 | } |
350 | 365 | } |
351 | 366 | } |
352 | 367 | ///////////////////////////////////////////////////////////// |
353 | 368 |
|
354 | | - if (!this.LightPivotTable) { |
| 369 | + if (!this.LightPivotTable || flag === true) { |
355 | 370 | return; |
356 | 371 | } |
357 | 372 |
|
|
0 commit comments