Provide default highlighting of simple active LinkMenuItems
When the Screen displayed matches the Screen which a menu item would lead to, highlight the active menu (similar to an active table row). This highlighting covers most of the simplest cases but does not handle more complex situations like the Differences menus, those will be handled in a follow on change. Change-Id: I6470abd7a544adf21ad143fda5da57cddad126e1
This commit is contained in:
committed by
Gerrit Code Review
parent
fdc62b4c0a
commit
041bfbcdd0
@@ -33,5 +33,10 @@ public class LinkMenuItem extends InlineHyperlink implements ScreenLoadHandler {
|
||||
}
|
||||
|
||||
public void onScreenLoad(ScreenLoadEvent event) {
|
||||
if (event.getScreen().getToken().equals(getTargetHistoryToken())){
|
||||
addStyleName(Gerrit.RESOURCES.css().activeRow());
|
||||
} else {
|
||||
removeStyleName(Gerrit.RESOURCES.css().activeRow());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user