OLD | NEW |
1 'use strict'; | 1 'use strict'; |
2 /** | 2 /** |
3 * The charm panel view(s). | 3 * The charm panel view(s). |
4 * | 4 * |
5 * @module views | 5 * @module views |
6 */ | 6 */ |
7 | 7 |
8 YUI.add('juju-charm-panel', function(Y) { | 8 YUI.add('juju-charm-panel', function(Y) { |
9 | 9 |
10 var views = Y.namespace('juju.views'), | 10 var views = Y.namespace('juju.views'), |
(...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1049 } | 1049 } |
1050 } | 1050 } |
1051 | 1051 |
1052 Y.Object.each(panels, function(panel) { | 1052 Y.Object.each(panels, function(panel) { |
1053 subscriptions.push(panel.on('changePanel', setPanel)); | 1053 subscriptions.push(panel.on('changePanel', setPanel)); |
1054 }); | 1054 }); |
1055 // The panel starts with the "charmsSearchPanel" visible. | 1055 // The panel starts with the "charmsSearchPanel" visible. |
1056 setPanel({name: 'charms'}); | 1056 setPanel({name: 'charms'}); |
1057 | 1057 |
1058 // Update position if we resize the window. | 1058 // Update position if we resize the window. |
1059 Y.on('windowresize', function(e) { | 1059 subscriptions.push(Y.on('windowresize', function(e) { |
1060 if (isPanelVisible) { | 1060 if (isPanelVisible) { |
1061 updatePanelPosition(); | 1061 updatePanelPosition(); |
1062 } | 1062 } |
1063 }); | 1063 })); |
1064 | 1064 |
1065 /** | 1065 /** |
1066 * Hide the charm panel. | 1066 * Hide the charm panel. |
1067 * Set isPanelVisible to false. | 1067 * Set isPanelVisible to false. |
1068 * | 1068 * |
1069 * @method hide | 1069 * @method hide |
1070 * @return {undefined} Mutates only. | 1070 * @return {undefined} Mutates only. |
1071 */ | 1071 */ |
1072 function hide() { | 1072 function hide() { |
1073 if (isPanelVisible) { | 1073 if (isPanelVisible) { |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1222 } | 1222 } |
1223 }; | 1223 }; |
1224 | 1224 |
1225 // Exposed for testing. | 1225 // Exposed for testing. |
1226 views.filterEntries = filterEntries; | 1226 views.filterEntries = filterEntries; |
1227 | 1227 |
1228 }, '0.1.0', { | 1228 }, '0.1.0', { |
1229 requires: [ | 1229 requires: [ |
1230 'view', | 1230 'view', |
1231 'juju-view-utils', | 1231 'juju-view-utils', |
| 1232 'juju-templates', |
1232 'node', | 1233 'node', |
1233 'handlebars', | 1234 'handlebars', |
1234 'event-hover', | 1235 'event-hover', |
1235 'transition', | 1236 'transition', |
1236 'event-key', | 1237 'event-key', |
1237 'event-outside', | 1238 'event-outside', |
1238 'widget-anim', | 1239 'widget-anim', |
1239 'overlay', | 1240 'overlay', |
1240 'dom-core', | 1241 'dom-core', |
1241 'juju-models', | 1242 'juju-models', |
1242 'event-resize', | 1243 'event-resize', |
1243 'gallery-ellipsis' | 1244 'gallery-ellipsis' |
1244 ] | 1245 ] |
1245 }); | 1246 }); |
OLD | NEW |