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

Commit

Permalink
rhbz804871 - fix style after other changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Huang committed Sep 14, 2012
1 parent a7dfe71 commit 6dcadda
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 21 deletions.
Expand Up @@ -29,6 +29,7 @@
text-shadow: #DDF 1px 1px 0;
overflow: hidden;
font-weight: bold;
height: 1em;
}

.grid {
Expand All @@ -43,6 +44,7 @@

.flipButton {
padding: 5px;
height: 1em;
}
</ui:style>

Expand Down
Expand Up @@ -19,7 +19,6 @@
import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.Style;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.resources.client.CssResource;
import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
import com.google.gwt.uibinder.client.UiBinder;
Expand All @@ -29,6 +28,7 @@
import com.google.gwt.user.cellview.client.Column;
import com.google.gwt.user.cellview.client.ColumnSortEvent;
import com.google.gwt.user.cellview.client.SimplePager;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.DialogBox;
import com.google.gwt.user.client.ui.HTMLPanel;
import com.google.gwt.user.client.ui.Label;
Expand All @@ -45,6 +45,7 @@
public class TranslationHistoryView extends DialogBox implements TranslationHistoryDisplay
{
private static final int PAGE_SIZE = 5;
private static final int COMPARISON_TAB_INDEX = 1;
private static final CellTableResources CELL_TABLE_RESOURCES = GWT.create(CellTableResources.class);
private static TranslationHistoryViewUiBinder uiBinder = GWT.create(TranslationHistoryViewUiBinder.class);
private final CellTable<TransHistoryItem> historyTable;
Expand All @@ -63,7 +64,8 @@ public class TranslationHistoryView extends DialogBox implements TranslationHist
TabLayoutPanel tabLayoutPanel;

private Column<TransHistoryItem,String> versionColumn;
private final PushButton compareButton;
@UiField
Button compareButton;

@Inject
public TranslationHistoryView(EventBus eventBus)
Expand All @@ -72,6 +74,7 @@ public TranslationHistoryView(EventBus eventBus)
HTMLPanel container = uiBinder.createAndBindUi(this);
this.eventBus = eventBus;
ensureDebugId("transHistory");
tabLayoutPanel.ensureDebugId("transHistoryTabPanel");
setGlassEnabled(true);

getCaption().setText(messages.translationHistory());
Expand All @@ -83,17 +86,6 @@ public TranslationHistoryView(EventBus eventBus)

historyPanel.add(historyTable);
historyPanel.add(simplePager);
compareButton = new PushButton(messages.translationHistoryComparisonTitle());
compareButton.addStyleName(style.compareButton());
compareButton.addClickHandler(new ClickHandler()
{
@Override
public void onClick(ClickEvent event)
{
tabLayoutPanel.selectTab(1);
}
});
historyPanel.add(compareButton);
setWidget(container);
}

Expand Down Expand Up @@ -164,6 +156,12 @@ public TransHistoryItem getValue(TransHistoryItem object)
};
}

@UiHandler("compareButton")
public void onCompareButtonClick(ClickEvent event)
{
tabLayoutPanel.selectTab(COMPARISON_TAB_INDEX);
}

@UiHandler("closeButton")
public void onCloseButtonClick(ClickEvent event)
{
Expand Down Expand Up @@ -311,8 +309,6 @@ interface TranslationHistoryViewUiBinder extends UiBinder<HTMLPanel, Translation
interface Styles extends CssResource
{

String compareButton();

String closeButton();

String pasteButton();
Expand Down
Expand Up @@ -3,11 +3,6 @@
<ui:with field="messages" type="org.zanata.webtrans.client.resources.WebTransMessages"/>

<ui:style field="style" type="org.zanata.webtrans.client.ui.TranslationHistoryView.Styles" >
.compareButton {
margin: 5px;
width: 30%;
}

.closeButton {
width: 50px;
margin: 10px 5px 5px 0;
Expand All @@ -18,13 +13,21 @@
.pasteButton Button {
font-size: smaller;
}

.compareButton {
margin: 5px;
padding: 5px;
}
</ui:style>

<g:HTMLPanel width="800px" height="600px">
<g:Button ui:field="compareButton" title="{messages.translationHistoryComparisonTitle}" styleName="icon-exchange {style.compareButton}" />
<g:TabLayoutPanel ui:field="tabLayoutPanel" barUnit='PX' barHeight='20' width="100%" height="95%">
<g:tab>
<g:customHeader>
<g:InlineHTML text="{messages.translationHistory}" />
<g:HTMLPanel>
<g:InlineHTML text="{messages.translationHistory}" />
</g:HTMLPanel>
</g:customHeader>
<g:ScrollPanel>
<g:VerticalPanel ui:field="historyPanel" width="100%" height="100%" />
Expand Down
Expand Up @@ -961,6 +961,34 @@ td.ApprovedStateDecoration div div div
background-color: #F3F2F2;
}

/* translation history style */
#gwt-debug-transHistoryTabPanel.gwt-TabLayoutPanel .gwt-TabLayoutPanelTab {
cursor: pointer;
margin-left: 6px;
padding: 3px 6px 3px 6px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
background: #4a75b5;
color: #FFFFFF;
font-weight: bold;
}

#gwt-debug-transHistoryTabPanel.gwt-TabLayoutPanel .gwt-TabLayoutPanelTab-selected {
cursor: default;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
background: #183c66;
color: #FFFFFF;
}

#gwt-debug-transHistoryTabPanel.gwt-TabLayoutPanel .gwt-TabLayoutPanelContent {
border: 2px solid #e0e8ee;
background: #FFFFFF;
border-radius: 5px;
}

/* end translation history style*/

.indexLabel
{
font-size:0.8em;
Expand Down

0 comments on commit 6dcadda

Please sign in to comment.