TabPanel Context Menu can be used for dynamic TabPanels. This feature is available in some IDEs, document editors, and internet browsers. I split the code to three files and did not use MVC pattern, sad but true.

The plugin has the following manipulation functionality:

  • Close tab under mouse pointer;
  • Close all tabs;
  • Close all tabs except the one, which is under mouse pointer;
  • Switch the TabBar‘s position to top, right, bottom or left.

You can also add permit-to-close mechanisms for the tabs, which are not allowed to be closed.

app/ux/tab/contextMenu/Plugin.js

 

app/ux/tab/contextMenu/Menu.js

 

app/ux/tab/contextMenu/TabPlacementMenu.js

 

Sample Usage: