dojo tabContainer - how to get tab id under right-mouse click popup menu for tab not in focus - menu

I'm a dojo newbie and I'm modifying an existing application for my customer and adding an extra options to the popup menu....'Close all', and 'Close other tabs'. There already exists 'Close'.
Adding the extra menu items were fairly straightforward...'Close all' gets the tabContainer and iterates over the tabs removing them.
But for 'Close other tabs', i.e. close all other tabs except the one I right-clicked on, I can't figure out how to get the id of that tab, on which the right-mouse click was done.
The 'selectedChildWidget' is not the tab I want, it gives the tab which is currently selected...I right clicked on one of the other non selected tabs.
Any ideas? I have the mouse event but cannot find the path back to the tab it was triggered against, only the popup menu.
Many thanks, Andrew (going rapidly grey over this one)

Dijit Menus have a currentTarget property that indicates what node the menu is being displayed for. From a MenuItem's onClick handler, you can access the current target node with this.getParent().currentTarget:
closeMenu.addChild(new MenuItem({
label: 'Close all',
ownerDocument: document,
onClick: function (evt) {
// tab that was clicked
var tab = registry.byNode(this.getParent().currentTarget);
// tab's associated page is tab.page
}
}));

Related

Navigation in Xamarin.Form from masterdetail page

I am new to Xamarin and want to develop an Xamarin.Form Portable App.For that, I have created the project template as Xamarin.Form Portable.
After login, I have successfully created a Master Detail Page to display the Menu List like Home, AboutUs, ContactUs links in the left corner which is initially hide and when i click on the Menu Icon (Menu Icon is like three dashes(-) in parallel) all Menu List is populated to the right side in window. Now when i click on any Menu Item,I don't want to repeat the menu list or its icon in the inner pages. Instead of that, I want Navigation back arrow button instead of the Menu Icon. When I tried to navigate it like below it gives me error like "PushAsync is not supported globally on iOS/Android, please use a NavigationPage"
await Navigation.PushAsync(new AboutUs());
If instead of this, I navigate it to the master detail page and set the About Us page as Detail property of the Master Detail Page then Menu Icon and Menu list will be reapeated which i don't want. Please help me how can i show the navigate the page with Back Arrow button in inner pages.
Overall, I want functionality like in Gmail where when we open any Detail of Email Menu button is not there but the back arrow button is there.
Thanks in advance!
Try this approach(Because DetailPage must be NavigationPage in Xamarin.Forms):
await Navigation.PushAsync(new NavigationPage(new AboutUs()));

After dirty flag check the new tab data is getting loaded in the current tab

While using JSF richfaces , on change done to a particular tab, dirty flag check is executed in javascript. A confirmation message is displayed while clicking another tab "There are changes made to the current tab, would you navigate to the new tab?". If i click Cancel and remain in the same tab, the new tab data gets loaded in the current screen. Any idea why this behaviour?

Using Chrome Extension contextMenu, how to open a small view right next to the context menu on click?

This question has a couple bits to it. Basically I want to make the context menu behave like a sidebar that pops out a box with html.
Get the height and location of a users context menu?
Open an interactable html view next to the menu without closing the menu?
Close both the menu and popout on off-click.
So a user can right click on the page,
and then click the contextMenu item to open a page that can hold html

Tab stop order for controls residing inside Tab control?

In my MFC application, which is a modeless dialog by itself, has a Tab control along with many other controls. And Tab control has two tabs, and dialogs are inserted into those.
This tab control is preceded and followed by other controls in the tabbing order. And when tab key gets to the tab control, It doesn't go into the dialogs inside tab, instead it moves to the next control in the application. I want that to go into the tab dialog and navigate through controls inside it.
At the moment, Tab key visits these dialogs inside tabs after visiting all controls in my application(modeless dialog).
How do I or where do I set tab order such that the tab key goes into the tab control dialogs ?
Research the WS_EX_CONTROLPARENT window style. MSDN:
"If this style is specified, the dialog manager recurses into children of this window when performing navigation operations such as handling the TAB key, an arrow key, or a keyboard mnemonic."

ExtJS 4: Prevent Ext.grid.Panel header menu from closing after clicking "Columns" sub menu

The Sencha ExtJS framework Ext.grid.Panel component is great for representing result set data. However, it gets rather annoying for end-users when they try to enable and disable the columns in the grid. When you click the right side of a column header, a down arrow appears indicating there's a menu. When you click that arrow, a menu drops down. In any other HTML application based menu (or desktop app menu), you can either hover over a [sub] menu option or click the [sub] menu option and the next sub menu pops out. In the case of the Ext.grid.Panel, when you click a menu option on the main header menu hoping to expand the nested sub-menu, the entire root (column header) menu disappears. This would be represented as an enhancement by Sencha since there is a workaround--that being don't click on the menu option "Columns". It still works if you don't click, but it's just not intuitive. Who is bright enough to fix this in the extjs 4 framework code?
According to source files in the documentation this behavior is fixed in 4.1.2 (which is not available yet for public).
But!
Ext.define('MenuFix', {
override: 'Ext.menu.Item',
onClick: function () {
return this.menu ? null : this.callParent(arguments);
}
});

Resources