gerrit/gerrit-extension-api
Edwin Kempin 002c9cb5b2 Support 'id' attribute for menu items contributed by plugins
For menu items in the top menu that are contributed by plugins it is
now optionally possible to specify the 'id' attribute. Having the 'id'
attribute allows GWT UI plugins to manipulate the menu item. E.g. a
GWT plugin could open a dialog box when the user clicks on the menu
item:

  RootPanel rootPanel = RootPanel.get(MENU_ID);
  rootPanel.getElement().removeAttribute("href");
  rootPanel.addDomHandler(new ClickHandler() {
    @Override
    public void onClick(ClickEvent event) {
      dialogBox.center();
      dialogBox.show();
    }
  }, ClickEvent.getType());

Change-Id: Icbe2a5c5af9c126a6dd2373b768cae651e482200
2013-11-06 09:24:47 +01:00
..
.settings Suppress Eclipse warning "annotation should not be used as a superinterface" 2012-12-02 21:01:28 +09:00
src/main/java/com/google/gerrit/extensions Support 'id' attribute for menu items contributed by plugins 2013-11-06 09:24:47 +01:00
.gitignore Define gerrit-extension-api module 2012-05-10 16:05:45 -07:00
BUCK Create enum containing all Gerrit top menu items 2013-10-16 11:19:29 -07:00