Skip to content
Newer
Older
100644 93 lines (69 sloc) 2.9 KB
fcc4fff @phiggins42 monster commit from moinconverter, which is always done prior to the …
phiggins42 authored
1 .. _dojox/widget/TitleGroup:
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored
2
149841c @phiggins42 mostly dojox.widget cleanups
phiggins42 authored
3 =======================
9dd52dc @phiggins42 mondo whitespace change
phiggins42 authored
4 dojox.widget.TitleGroup
5 =======================
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored
6
9dd52dc @phiggins42 mondo whitespace change
phiggins42 authored
7 :since: 1.6.0
149841c @phiggins42 mostly dojox.widget cleanups
phiggins42 authored
8
9 .. contents ::
10 :depth: 2
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored
11
9dd52dc @phiggins42 mondo whitespace change
phiggins42 authored
12 A container widget which delegates a connection between children :ref:`TitlePanes <dijit/TitlePane>`. Behaves similarly to an :ref:`AccordionContainer <dijit/layout/AccordionContainer>` though has a variable overall height and does not "dock" to other layout widgets, such as a :ref:`BorderContainer <dijit/layout/BorderContainer>`.
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored
13
9dd52dc @phiggins42 mondo whitespace change
phiggins42 authored
14 Examples
15 ========
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored
16
9a8ab5a @wkeese remove colons from level 3 headers
wkeese authored
17 A simple declarative example
18 ----------------------------
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored
19
9dd52dc @phiggins42 mondo whitespace change
phiggins42 authored
20 .. code-example::
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored
21
c15cbf2 @wkeese standardize spacing on directives like .. js
wkeese authored
22 .. css ::
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored
23
9dd52dc @phiggins42 mondo whitespace change
phiggins42 authored
24 @import "{{baseUrl}}dojox/widget/TitleGroup/TitleGroup.css";
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored
25
4cccd8a @wkeese .. javascript --> .. js
wkeese authored
26 .. js ::
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored
27
9dd52dc @phiggins42 mondo whitespace change
phiggins42 authored
28 dojo.require("dojox.widget.TitleGroup");
29 dojo.require("dijit.TitlePane");
30 dojo.require("dijit.form.Button");
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored
31
c15cbf2 @wkeese standardize spacing on directives like .. js
wkeese authored
32 .. html ::
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored
33
9dd52dc @phiggins42 mondo whitespace change
phiggins42 authored
34 <h2>Content before</h2>
35 <div id="titleGroupA" data-dojo-type="dojox.widget.TitleGroup">
459b3a1 @wkeese dojoType --> data-dojo-type
wkeese authored
36 <div data-dojo-type="dijit.TitlePane" open="true" title="Pane 1">Lorem</div>
37 <div data-dojo-type="dijit.TitlePane" open="false" title="Pane 2">Lorem <br> <div data-dojo-type="dijit.form.Button">click</div></div>
38 <div data-dojo-type="dijit.TitlePane" open="false" title="Pane 3"><p>Lorem</p><p>lorem</p></div>
39 <div data-dojo-type="dijit.TitlePane" open="false" title="Pane 4"><p>Lorem</p></div>
9dd52dc @phiggins42 mondo whitespace change
phiggins42 authored
40 </div>
41 <h2>Content after</h2>
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored
42
9a8ab5a @wkeese remove colons from level 3 headers
wkeese authored
43 Adding and removing children
44 ----------------------------
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored
45
9dd52dc @phiggins42 mondo whitespace change
phiggins42 authored
46 .. code-example::
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored
47
c15cbf2 @wkeese standardize spacing on directives like .. js
wkeese authored
48 .. css ::
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored
49
9dd52dc @phiggins42 mondo whitespace change
phiggins42 authored
50 @import "{{baseUrl}}dojox/widget/TitleGroup/TitleGroup.css";
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored
51
4cccd8a @wkeese .. javascript --> .. js
wkeese authored
52 .. js ::
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored
53
9dd52dc @phiggins42 mondo whitespace change
phiggins42 authored
54 dojo.require("dojox.widget.TitleGroup");
55 dojo.require("dijit.TitlePane");
56 dojo.require("dijit.form.Button");
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored
57
c15cbf2 @wkeese standardize spacing on directives like .. js
wkeese authored
58 .. html ::
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored
59
9dd52dc @phiggins42 mondo whitespace change
phiggins42 authored
60 <h2>Content before</h2>
61 <div data-dojo-type="dijit.form.Button">
62 click to add
63 <script type="dojo/method" data-dojo-event="onClick">
64 var group = dijit.byId("titleGroupB");
65 var tp = new dijit.TitlePane({ open:false, title: "Added " + dijit.registry.length });
66 group.addChild(tp);
67 </script>
68 </div>
69 <div data-dojo-type="dijit.form.Button">
70 pop one off
71 <script type="dojo/method" data-dojo-event="onClick">
72 dijit.registry.byClass("dijit.TitlePane").some(function(widget){
73 dijit.byId("titleGroupB").removeChild(widget);
74 widget.destroy();
75 return true; // only once
76 });
77 </script>
78 </div>
79 <div id="titleGroupB" style="width:500px" data-dojo-type="dojox.widget.TitleGroup">
459b3a1 @wkeese dojoType --> data-dojo-type
wkeese authored
80 <div data-dojo-type="dijit.TitlePane" open="true" title="Pane 1">
9dd52dc @phiggins42 mondo whitespace change
phiggins42 authored
81 Pane 1
82 </div>
83 </div>
84 <h2>Content after</h2>
85 <div id="graveyard"></div>
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored
86
80f0c17 @wkeese fixing headers
wkeese authored
87 See Also
88 ========
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored
89
9dd52dc @phiggins42 mondo whitespace change
phiggins42 authored
90 * :ref:`dijit.TitlePane <dijit/TitlePane>`
91 * :ref:`dijit.layout.AccordionContainer <dijit/layout/AccordionContainer>`
92 * `The original blog and motivation <http://www.sitepen.com/blog/2008/10/21/quick-fixes-and-dojo-support/>`_
Something went wrong with that request. Please try again.