]>
git.wh0rd.org - tt-rss.git/blob - lib/dijit/layout/TabContainer.js.uncompressed.js
1 define("dijit/layout/TabContainer", [
2 "dojo/_base/lang", // lang.getObject
3 "dojo/_base/declare", // declare
6 "./ScrollingTabController"
7 ], function(lang
, declare
, _TabContainerBase
, TabController
, ScrollingTabController
){
10 // dijit/layout/TabContainer
13 return declare("dijit.layout.TabContainer", _TabContainerBase
, {
15 // A Container with tabs to select each child (only one of which is displayed at a time).
17 // A TabContainer is a container that has multiple panes, but shows only
18 // one pane at a time. There are a set of tabs corresponding to each pane,
19 // where each tab has the name (aka title) of the pane, and optionally a close button.
21 // See `StackContainer.ChildWidgetProperties` for details on the properties that can be set on
22 // children of a `TabContainer`.
24 // useMenu: [const] Boolean
25 // True if a menu should be used to select tabs when they are too
26 // wide to fit the TabContainer, false otherwise.
29 // useSlider: [const] Boolean
30 // True if a slider should be used to select tabs when they are too
31 // wide to fit the TabContainer, false otherwise.
34 // controllerWidget: Class
35 // An optional parameter to override the widget used to display the tab labels
38 _makeController: function(/*DomNode*/ srcNode
){
40 // Instantiate tablist controller widget and return reference to it.
41 // Callback from _TabContainerBase.postCreate().
43 // protected extension
45 // "string" branch for back-compat, remove for 2.0
46 var cls
= this.baseClass
+ "-tabs" + (this.doLayout
? "" : " dijitTabNoLayout"),
47 TabController
= typeof this.controllerWidget
== "string" ? lang
.getObject(this.controllerWidget
) :
48 this.controllerWidget
;
50 return new TabController({
51 id
: this.id
+ "_tablist",
52 ownerDocument
: this.ownerDocument
,
55 textDir
: this.textDir
,
56 tabPosition
: this.tabPosition
,
57 doLayout
: this.doLayout
,
61 useMenu
: this.useMenu
,
62 useSlider
: this.useSlider
,
63 tabStripClass
: this.tabStrip
? this.baseClass
+ (this.tabStrip
? "":"No") + "Strip": null
67 postMixInProperties: function(){
68 this.inherited(arguments
);
70 // Scrolling controller only works for horizontal non-nested tabs
71 if(!this.controllerWidget
){
72 this.controllerWidget
= (this.tabPosition
== "top" || this.tabPosition
== "bottom") && !this.nested
?
73 ScrollingTabController
: TabController
;