LEFT | RIGHT |
1 'use strict'; | 1 'use strict'; |
2 | 2 |
3 | 3 |
4 /** | 4 /** |
5 * browser-charm-container provides a container used for categorizing charm | 5 * browser-charm-container provides a container used for categorizing charm |
6 * tokens. | 6 * tokens. |
7 * | 7 * |
8 * @namespace juju | 8 * @namespace juju |
9 * @module widgets | 9 * @module widgets |
10 * @submodule browser | 10 * @submodule browser |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 }, | 63 }, |
64 | 64 |
65 /** | 65 /** |
66 * Toggles between the _showAll condition and the _hideSomeChildern | 66 * Toggles between the _showAll condition and the _hideSomeChildern |
67 * condition. | 67 * condition. |
68 * | 68 * |
69 * @method _toggleExpand | 69 * @method _toggleExpand |
70 */ | 70 */ |
71 _toggleExpand: function(e) { | 71 _toggleExpand: function(e) { |
72 var invisible = this.get('contentBox').one('.yui3-charmtoken-hidden'), | 72 var invisible = this.get('contentBox').one('.yui3-charmtoken-hidden'), |
73 expander = e.currentTarget; | 73 expander = e.currentTarget, |
| 74 more = expander.one('.more'), |
| 75 less = expander.one('.less'); |
74 if (invisible) { | 76 if (invisible) { |
75 this._showAll(); | 77 this._showAll(); |
76 expander.one('.more').addClass('hidden'); | 78 more.addClass('hidden'); |
77 expander.one('.less').removeClass('hidden'); | 79 less.removeClass('hidden'); |
78 } else { | 80 } else { |
79 this._hideSomeChildren(); | 81 this._hideSomeChildren(); |
80 expander.one('.less').addClass('hidden'); | 82 less.addClass('hidden'); |
81 expander.one('.more').removeClass('hidden'); | 83 more.removeClass('hidden'); |
82 } | 84 } |
83 }, | 85 }, |
84 | 86 |
85 /** | 87 /** |
86 * Sets up events and binds them to listeners. | 88 * Sets up events and binds them to listeners. |
87 * | 89 * |
88 * @method bindUI | 90 * @method bindUI |
89 */ | 91 */ |
90 bindUI: function() { | 92 bindUI: function() { |
91 if (this.get('extra') > 0) { | 93 if (this.get('extra') > 0) { |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 'array', | 187 'array', |
186 'base-build', | 188 'base-build', |
187 'browser-charm-token', | 189 'browser-charm-token', |
188 'handlebars', | 190 'handlebars', |
189 'juju-templates', | 191 'juju-templates', |
190 'juju-view-utils', | 192 'juju-view-utils', |
191 'widget', | 193 'widget', |
192 'widget-parent' | 194 'widget-parent' |
193 ] | 195 ] |
194 }); | 196 }); |
LEFT | RIGHT |