| 1 |
define([ |
| 2 |
"dojo/_base/lang", |
| 3 |
"dojo/_base/declare", |
| 4 |
"./_TabContainerBase", |
| 5 |
"./TabController", |
| 6 |
"./ScrollingTabController" |
| 7 |
], function(lang, declare, _TabContainerBase, TabController, ScrollingTabController){ |
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
return declare("dijit.layout.TabContainer", _TabContainerBase, { |
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
useMenu: true, |
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
useSlider: true, |
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
controllerWidget: "", |
| 37 |
|
| 38 |
_makeController: function( srcNode){ |
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
var cls = this.baseClass + "-tabs" + (this.doLayout ? "" : " dijitTabNoLayout"), |
| 47 |
TabController = typeof this.controllerWidget == "string" ? lang.getObject(this.controllerWidget) : |
| 48 |
this.controllerWidget; |
| 49 |
|
| 50 |
return new TabController({ |
| 51 |
id: this.id + "_tablist", |
| 52 |
ownerDocument: this.ownerDocument, |
| 53 |
dir: this.dir, |
| 54 |
lang: this.lang, |
| 55 |
textDir: this.textDir, |
| 56 |
tabPosition: this.tabPosition, |
| 57 |
doLayout: this.doLayout, |
| 58 |
containerId: this.id, |
| 59 |
"class": cls, |
| 60 |
nested: this.nested, |
| 61 |
useMenu: this.useMenu, |
| 62 |
useSlider: this.useSlider, |
| 63 |
tabStripClass: this.tabStrip ? this.baseClass + (this.tabStrip ? "":"No") + "Strip": null |
| 64 |
}, srcNode); |
| 65 |
}, |
| 66 |
|
| 67 |
postMixInProperties: function(){ |
| 68 |
this.inherited(arguments); |
| 69 |
|
| 70 |
|
| 71 |
if(!this.controllerWidget){ |
| 72 |
this.controllerWidget = (this.tabPosition == "top" || this.tabPosition == "bottom") && !this.nested ? |
| 73 |
ScrollingTabController : TabController; |
| 74 |
} |
| 75 |
} |
| 76 |
}); |
| 77 |
}); |