Change in ovirt-engine[master]: webadmin, userportal: Support column resizing for all tables

vszocs at redhat.com vszocs at redhat.com
Fri May 3 17:45:56 UTC 2013


Vojtech Szocs has submitted this change and it was merged.

Change subject: webadmin,userportal: Support column resizing for all tables
......................................................................


webadmin,userportal: Support column resizing for all tables

This patch moves column resize implementation out of AbstractActionTable
and into dedicated table widget, ColumnResizeCellTable.

1. All custom CellTable widgets now inherit from ColumnResizeCellTable:
   - ElementIdCellTable [ActionCellTable + EntityModelCellTable]
   - IVdcQueryableCellTable

2. ColumnResizeCellTable now contains enableColumnResizing() method,
   plus some other related/useful methods

3. Columns added to ColumnResizeCellTable automatically benefit from
   tooltip displayed when the given header has its content (text)
   truncated, i.e. after shrinking the column or with long header text

4. AbstractActionTable now just delegates to table/tableHeader widgets,
   plus code to synchronize both tables (during column resize, etc.)

5. AbstractCellWithTooltip now contains common tooltip-related logic
   used by different subclasses:
   - SafeHtmlCellWithTooltip [resizable + non-resizable header cells]
   - TextCellWithTooltip [textual body cells]

6. Minor ElementIdCellTable improvement: call configureElementId()
   for every insertColumn() call for better consistency

AbstractCellWithTooltip does two kinds of content overflow detection:
   (a) scrollWidth with temporary CSS 'overflow:auto'
   (b) clientHeight with temporary CSS 'whiteSpace:normal'

In practice, (a) is used for both header and body cells. In Firefox,
header cells (SafeHtmlCellWithTooltip) use <div> with 'display:block'
to work around Firefox-specific issue with scrollWidth.

Change-Id: Ic69b597d7c5f2330cef5a93bc8812494af731734
Bug-Url: https://bugzilla.redhat.com/956378
Signed-off-by: Vojtech Szocs <vszocs at redhat.com>
---
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/editor/EntityModelCellTable.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/editor/IVdcQueryableCellTable.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/AbstractActionTable.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/ElementIdCellTable.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/SimpleActionTable.java
A frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/column/AbstractCellWithTooltip.java
A frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/column/SafeHtmlCellWithTooltip.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/column/TextCellWithTooltip.java
A frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/resize/ColumnResizeCellTable.java
M frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/resize/ResizableHeader.java
D frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/table/resize/ResizableHeaderCell.java
11 files changed, 530 insertions(+), 235 deletions(-)

Approvals:
  Einav Cohen: Looks good to me, approved
  Vojtech Szocs: Verified; Looks good to me, approved


--
To view, visit http://gerrit.ovirt.org/14341
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic69b597d7c5f2330cef5a93bc8812494af731734
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Vojtech Szocs <vszocs at redhat.com>
Gerrit-Reviewer: Alona Kaplan <alkaplan at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Einav Cohen <ecohen at redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchaplik at redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjelinek at redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vszocs at redhat.com>



More information about the Engine-commits mailing list