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

Commit

Permalink
Added new classes and tweaks to history UI
Browse files Browse the repository at this point in the history
  • Loading branch information
lukebrooker committed Jul 31, 2013
1 parent f230fc6 commit bcbb271
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 31 deletions.
Expand Up @@ -21,9 +21,9 @@

<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
xmlns:g='urn:import:com.google.gwt.user.client.ui'>
<g:HTMLPanel styleName="g">
<g:HTMLPanel styleName="g--tight">
<div class="g__item w--1-12 txt--align-right">
<i class="i--comment i"/><span class="is-invisible">Comment</span>
<i class="i--comment i--large txt--neutral"/><span class="is-invisible">Comment</span>
</div>
<div class="w--9-12 g__item">
<g:TextArea name="comment" styleName="basic-input" ui:field="commentTextArea" />
Expand All @@ -32,4 +32,4 @@
<g:Button addStyleNames="button--full" text="Add Comment" ui:field="addCommentButton" />
</div>
</g:HTMLPanel>
</ui:UiBinder>
</ui:UiBinder>
Expand Up @@ -22,13 +22,13 @@
<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
xmlns:g='urn:import:com.google.gwt.user.client.ui'>
<g:HTMLPanel tag="li" styleName="l--pad-v-half">
<div class="g">
<div class="g__item w--1-12 txt--align-right"><i class="i--comment i"/><span class="is-invisible">Comment</span></div>
<div class="g--tight">
<div class="g__item w--1-12 txt--align-right"><i class="i--comment i--large txt--neutral"/><span class="is-invisible">Comment</span></div>
<div class="g__item w--9-12">
<g:InlineHTML ui:field="heading"/>
<g:InlineHTML ui:field="commentContent"/>
<g:InlineHTML ui:field="commentTime"/>
</div>
</div>
</g:HTMLPanel>
</ui:UiBinder>
</ui:UiBinder>
Expand Up @@ -24,9 +24,9 @@
<ui:with field="messages" type="org.zanata.webtrans.client.resources.WebTransMessages" />

<g:HTMLPanel tag="li" styleName="l--pad-v-1 bg--higher">
<div class="g">
<div class="g--tight">
<div class="g__item w--1-12 txt--align-right">
<i class="i--pencil i"/>
<i class="i--translate i--large txt--neutral"/>
<span class="is-invisible">Translation</span>
</div>
<div class="g__item w--9-12">
Expand All @@ -36,7 +36,7 @@
<li>
<g:InlineLabel ui:field="creationDate"/>
</li>
<li class="divide--left l--pad-left-half">
<li class="d--left l--pad-left-half">
<g:InlineHTML ui:field="revision"/>
</li>
<li>
Expand All @@ -49,4 +49,4 @@
</div>
</div>
</g:HTMLPanel>
</ui:UiBinder>
</ui:UiBinder>
Expand Up @@ -39,8 +39,6 @@ public class TranslationHistoryView extends DialogBox implements TranslationHist
@UiField
TabLayoutPanel tabLayoutPanel;

@UiField
Button compareButton;
@UiField
UnorderedListWidget itemList;

Expand Down Expand Up @@ -100,24 +98,16 @@ public void clearInput()
commentInput.clearInput();
}

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

@Override
public void showDiff(TransHistoryItem one, TransHistoryItem two, String description)
{
compareButton.setEnabled(true);
comparisonPanel.compare(one, two);
setComparisonTitle(description);
}

@Override
public void disableComparison()
{
compareButton.setEnabled(false);
comparisonPanel.clear();
setComparisonTitle(messages.translationHistoryComparisonTitle());
}
Expand All @@ -138,7 +128,6 @@ public void setListener(Listener listener)
private void setComparisonTitle(String description)
{
tabLayoutPanel.setTabText(1, description);
compareButton.setText(description);
}

@Override
Expand All @@ -158,6 +147,5 @@ interface Styles extends CssResource

String pasteButton();

String compareButton();
}
}
Expand Up @@ -6,24 +6,18 @@
.pasteButton Button {
font-size: smaller;
}

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

<g:HTMLPanel width="800px" height="600px" styleName="new-zanata">
<g:Button ui:field="compareButton" title="{messages.translationHistoryComparisonTitle}" styleName="icon-exchange {style.compareButton} l--push-v-half" />
<g:TabLayoutPanel ui:field="tabLayoutPanel" barUnit='PX' barHeight='20' width="100%" height="95%">
<g:TabLayoutPanel ui:field="tabLayoutPanel" barUnit='PX' barHeight='24' width="100%" height="95%">
<g:tab>
<g:customHeader>
<g:HTMLPanel>
<g:InlineHTML text="{messages.translationHistory}" />
</g:HTMLPanel>
</g:customHeader>
<g:ScrollPanel>
<g:HTMLPanel ui:field="historyPanel" styleName="l__wrapper l--push-v-1" >
<g:HTMLPanel ui:field="historyPanel" styleName="l--push-v-1" >
<z:ReviewCommentInputWidget ui:field="commentInput" />
<z:UnorderedListWidget styleName="list--slat d--top" ui:field="itemList"/>
</g:HTMLPanel>
Expand All @@ -38,4 +32,4 @@
</g:TabLayoutPanel>
<z:DialogBoxCloseButton ui:field="closeButton" />
</g:HTMLPanel>
</ui:UiBinder>
</ui:UiBinder>

0 comments on commit bcbb271

Please sign in to comment.