]> git.wh0rd.org - tt-rss.git/blame - lib/dijit/layout/TabContainer.js
remove call-by-reference to comply with php 5.4
[tt-rss.git] / lib / dijit / layout / TabContainer.js
CommitLineData
2f01fe57 1/*
81bea17a 2 Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
2f01fe57
AD
3 Available via Academic Free License >= 2.1 OR the modified BSD license.
4 see: http://dojotoolkit.org/license for details
5*/
6
7
81bea17a
AD
8if(!dojo._hasResource["dijit.layout.TabContainer"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
9dojo._hasResource["dijit.layout.TabContainer"] = true;
2f01fe57
AD
10dojo.provide("dijit.layout.TabContainer");
11dojo.require("dijit.layout._TabContainerBase");
12dojo.require("dijit.layout.TabController");
13dojo.require("dijit.layout.ScrollingTabController");
81bea17a
AD
14
15
16dojo.declare("dijit.layout.TabContainer",
17 dijit.layout._TabContainerBase,
18 {
19 // summary:
20 // A Container with tabs to select each child (only one of which is displayed at a time).
21 // description:
22 // A TabContainer is a container that has multiple panes, but shows only
23 // one pane at a time. There are a set of tabs corresponding to each pane,
24 // where each tab has the name (aka title) of the pane, and optionally a close button.
25
26 // useMenu: [const] Boolean
27 // True if a menu should be used to select tabs when they are too
28 // wide to fit the TabContainer, false otherwise.
29 useMenu: true,
30
31 // useSlider: [const] Boolean
32 // True if a slider should be used to select tabs when they are too
33 // wide to fit the TabContainer, false otherwise.
34 useSlider: true,
35
36 // controllerWidget: String
37 // An optional parameter to override the widget used to display the tab labels
38 controllerWidget: "",
39
40 _makeController: function(/*DomNode*/ srcNode){
41 // summary:
42 // Instantiate tablist controller widget and return reference to it.
43 // Callback from _TabContainerBase.postCreate().
44 // tags:
45 // protected extension
46
47 var cls = this.baseClass + "-tabs" + (this.doLayout ? "" : " dijitTabNoLayout"),
48 TabController = dojo.getObject(this.controllerWidget);
49
50 return new TabController({
51 id: this.id + "_tablist",
52 dir: this.dir,
53 lang: this.lang,
54 tabPosition: this.tabPosition,
55 doLayout: this.doLayout,
56 containerId: this.id,
57 "class": cls,
58 nested: this.nested,
59 useMenu: this.useMenu,
60 useSlider: this.useSlider,
61 tabStripClass: this.tabStrip ? this.baseClass + (this.tabStrip ? "":"No") + "Strip": null
62 }, srcNode);
63 },
64
65 postMixInProperties: function(){
66 this.inherited(arguments);
67
68 // Scrolling controller only works for horizontal non-nested tabs
69 if(!this.controllerWidget){
70 this.controllerWidget = (this.tabPosition == "top" || this.tabPosition == "bottom") && !this.nested ?
71 "dijit.layout.ScrollingTabController" : "dijit.layout.TabController";
72 }
73 }
74});
75
2f01fe57 76}