Fix Project Links

The project Links were broken when they were moved to the
top MenuBar.  The "go" worked, but the tokenHistory was
wrong so the links didn't work when opening in separate
tabs and it appeared wrong on mouseovers.

Change-Id: Ide675eb27fa0bd697a4b0da13a389de35a6a1d1d
This commit is contained in:
Martin Fick
2012-12-04 11:44:03 -07:00
committed by Gerrit Code Review
parent d42a29d949
commit fdc62b4c0a
2 changed files with 12 additions and 5 deletions

View File

@@ -18,11 +18,12 @@ import com.google.gerrit.client.Gerrit;
import com.google.gwt.aria.client.Roles;
import com.google.gwt.dom.client.AnchorElement;
public class LinkMenuItem extends InlineHyperlink {
public class LinkMenuItem extends InlineHyperlink implements ScreenLoadHandler {
public LinkMenuItem(final String text, final String targetHistoryToken) {
super(text, targetHistoryToken);
setStyleName(Gerrit.RESOURCES.css().menuItem());
Roles.getMenuitemRole().set(getElement());
Gerrit.EVENT_BUS.addHandler(ScreenLoadEvent.TYPE, this);
}
@Override
@@ -30,4 +31,7 @@ public class LinkMenuItem extends InlineHyperlink {
super.go();
AnchorElement.as(getElement()).blur();
}
public void onScreenLoad(ScreenLoadEvent event) {
}
}