Class idx.layout.OpenMenuTabController
Extends
dijit.layout.ScrollingTabController
Note: This controller can be used with the OpenTabContainer
or directly with the default Dojo tab container..
idx.layout.OpenMenuTabController specializes
the ScrollingTabController drop down menu button and
number of tabs on the strip when the tab container opens.
The purpose of the base menu button was to let users select a
tab that may not be visible on the tab strip (scrolled out of view).
New/changed features include:
- Always show the drop down menu button (as opposed to only showing it when tabs are scrolled out of view).
- Let users add new items to the tab strip by selecting a drop down item - in addition to just letting them select an existing one.
- Restrict the number of initial tabs placed on the tab strip using the "numinit" user configurable value. (This parm is normalized to a minimum of 3 and a maximum of 10 tabs on the strip.) When the number of tabs on the strip exceeds "numinit" the open menu button must be used to add them. The "onAddChild" method is extended to store initial tab items that exceed "numinit". Note: user configures "numinit" using OpenTabContainer subclass of the Dojo TabContainer class.
- Position drop down menu button on the opposite end of the tab strip than current base menu button. New button is placed on far left when LTR and far right when RTL.
- Show the drop down menu as a styled "Open" button that is a different color when hovered or selected.
- Special styling of the drop down itself (pending).
Defined in: <idx\layout\OpenMenuTabContainer.js>.
Constructor Summary
Constructor Attributes | Constructor Name and Description |
---|---|
Field Summary
Field Attributes | Field Name and Description |
---|---|
<constant> |
Maximum # of tabs to show
|
<constant> |
Minimum # of tabs to show
|
NLS messages
|
|
Indicates # of tabs added/showing
in tab container
|
|
Indicates # of tabs to show initially.
|
|
Hashtable of pages to add with the id as the key
|
Method Summary
Method Attributes | Method Name and Description |
---|---|
Default constructor
Init data fields:
pane2add - {}
num - 0
|
|
onAddChild(page, insertIndex)
Extend base method to only add tabs up to limit
per "numinit".
|
|
Post process by adding in loadDropDown
extension for the menu button
Special processing .
|
|
Initializes globalization resource.
|
|
resize(dim)
Extend base by showing menu button on left for LTR
and right on RTL.
|
Field Detail
<constant> {int} MAX_NUM
Maximum # of tabs to show
- Default Value:
- 10
<constant> {int} MIN_NUM
Minimum # of tabs to show
- Default Value:
- 3
{Object} msg
NLS messages
{int} num
Indicates # of tabs added/showing
in tab container
- Default Value:
- 0(in constructor)
{int} numinit
Indicates # of tabs to show initially. Set on startup
from the tab container if available.
Normalized in controller to MIN_NUM if less than,
or MAX_NUM if greater than.
- Default Value:
- MIN_NUM (in constructor)
{Object} pane2add
Hashtable of pages to add with the id as the key
- Default Value:
- (in constructor)
Method Detail
constructor()
Default constructor
Init data fields:
pane2add - {}
num - 0
onAddChild(page, insertIndex)
Extend base method to only add tabs up to limit
per "numinit". Place extra tabs in "pane2add"
to only allow adding via drop down menu.
- Parameters:
- page
- insertIndex
- See:
- dijit.layout.ScrollingTabController.onAddChild
postCreate()
Post process by adding in loadDropDown
extension for the menu button
Special processing ... for "numinit"..
Resets user specified "numinit" to valid range if configured less than
min or greater than max # allowed tabs.
postMixInProperties()
Initializes globalization resource.
resize(dim)
Extend base by showing menu button on left for LTR
and right on RTL. Also unconditionally show the menu button.
- Parameters:
- dim
- See:
- dijit.layout.ScrollingTabController.resize