Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
rhbz844820 - fix: trans unit table scrollbar disappear
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Huang committed Sep 6, 2012
1 parent 1bb8a62 commit e5253a0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
Expand Up @@ -37,11 +37,14 @@ public class TransUnitEditView extends Composite implements TransUnitEditDisplay
Grid transUnitTable;
@UiField
Styles style;
@UiField
WebTransMessages messages;
@UiField
ScrollPanel root;

private final FilterViewConfirmationDisplay filterViewConfirmationDisplay;
private final LoadingPanel loadingPanel;
@UiField
Label noContentLabel;
private final Label noContentLabel = new Label();
private Listener listener;

@Inject
Expand All @@ -50,6 +53,8 @@ public TransUnitEditView(FilterViewConfirmationDisplay filterViewConfirmationDis
this.filterViewConfirmationDisplay = filterViewConfirmationDisplay;
this.loadingPanel = loadingPanel;
initWidget(uiBinder.createAndBindUi(this));
noContentLabel.setText(messages.noContent());
noContentLabel.setStyleName(style.noContent());

transUnitTable.addClickHandler(new ClickHandler()
{
Expand Down Expand Up @@ -115,7 +120,14 @@ public void buildTable(List<SourceContentsDisplay> sourceDisplays, List<TargetCo

private void showEmptyContentIfNoData(int dataSize)
{
noContentLabel.setVisible(dataSize == 0);
if (dataSize == 0)
{
root.setWidget(noContentLabel);
}
else
{
root.setWidget(transUnitTable);
}
}

private void applyRowStyle()
Expand Down
Expand Up @@ -37,10 +37,7 @@
}
</ui:style>

<g:HTMLPanel>
<g:ScrollPanel>
<g:ScrollPanel ui:field="root">
<g:Grid ui:field="transUnitTable" styleName="{style.table}" />
</g:ScrollPanel>
<g:Label ui:field="noContentLabel" styleName="{style.noContent}" visible="false" text="{messages.noContent}" />
</g:HTMLPanel>
</ui:UiBinder>

0 comments on commit e5253a0

Please sign in to comment.