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

Commit

Permalink
WIP: fix focus transunit issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Eng committed Sep 4, 2014
1 parent 163d1b7 commit 9fd68af
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
Expand Up @@ -42,6 +42,7 @@
import com.google.gwt.resources.client.CssResource;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Anchor;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HTMLPanel;
import com.google.gwt.user.client.ui.InlineLabel;
Expand All @@ -62,7 +63,7 @@ public class SourceContentsView extends Composite implements
Styles style;

@UiField(provided = true)
InlineLabel bookmarkIcon;
Anchor bookmarkIcon;

@UiField(provided = true)
ReferencePanel referencePanel;
Expand Down Expand Up @@ -98,8 +99,8 @@ public SourceContentsView(
rootPanel = binder.createAndBindUi(this);
}

private InlineLabel createBookmarkIcon() {
InlineLabel bookmarkIcon = new InlineLabel();
private Anchor createBookmarkIcon() {
Anchor bookmarkIcon = new Anchor();
bookmarkIcon.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
Expand Down
Expand Up @@ -20,9 +20,9 @@
<fui:ReferencePanel ui:field="referencePanel" />
</li>
<li>
<g:InlineLabel ui:field="bookmarkIcon"
<g:Anchor ui:field="bookmarkIcon"
styleName="{style.bookmark} i i--star l--float-left l--push-top-quarter" />
<fui:TransUnitDetailsPanel ui:field="transUnitDetailsPanel"/>
<fui:TransUnitDetailsPanel ui:field="transUnitDetailsPanel" styleName="l--push-left-half"/>
</li>
</g:HTMLPanel>
</ui:UiBinder>
Expand Up @@ -6,6 +6,7 @@
import org.zanata.webtrans.client.ui.FilterViewConfirmationDisplay;
import org.zanata.webtrans.client.ui.LoadingPanel;

import com.allen_sauer.gwt.log.client.Log;
import com.google.gwt.core.shared.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
Expand Down Expand Up @@ -176,7 +177,7 @@ public void delayRefresh() {
@Override
public void ensureVisible(TargetContentsDisplay currentDisplay) {
int rootBottom =
root.getAbsoluteTop() + root.getElement().getClientHeight();
root.getElement().getClientHeight();
Widget transUnitRow = currentDisplay.asWidget();
int rowBottom =
transUnitRow.getAbsoluteTop()
Expand Down
Expand Up @@ -50,7 +50,7 @@
<!-- you can leave the body empty if you want -->
<!-- to create a completely dynamic UI. -->
<!-- -->
<body class="new-zanata-body">
<h:body styleClass="new-zanata-body">
<script type="text/javascript">
var zanataSessionId = '#{request.session.id}';
</script>
Expand All @@ -67,7 +67,7 @@

<ui:include src="../WEB-INF/template/scripts.xhtml"/>

</body>
</h:body>

</html>
</f:view>
Expand Down

0 comments on commit 9fd68af

Please sign in to comment.