dojo tabContainer - how to get tab id under right-mouse click popup menu for tab not in focus -
i'm dojo newbie , i'm modifying existing application customer , adding options popup menu....'close all', , 'close other tabs'. there exists 'close'.
adding menu items straightforward...'close all' gets tabcontainer , iterates on tabs removing them.
but 'close other tabs', i.e. close other tabs except 1 right-clicked on, can't figure out how id of tab, on right-mouse click done.
the 'selectedchildwidget' not tab want, gives tab selected...i right clicked on 1 of other non selected tabs.
any ideas? have mouse event cannot find path tab triggered against, popup menu.
many thanks, andrew (going rapidly grey on one)
dijit menus have currenttarget
property indicates node menu being displayed for. menuitem's onclick
handler, can access current target node this.getparent().currenttarget
:
closemenu.addchild(new menuitem({ label: 'close all', ownerdocument: document, onclick: function (evt) { // tab clicked var tab = registry.bynode(this.getparent().currenttarget); // tab's associated page tab.page } }));
Comments
Post a Comment