blob: a8f069c9dc0f2518c8028a7c4d28661f51507934 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
define(function () {
return Marionette.Controller.extend({
initialize: function (options) {
this.collection = options.collection;
this.state = options.state;
},
showInstalled: function () {
this.state.set({ section: 'installed' });
this.collection.fetchInstalled();
},
showUpdates: function () {
this.state.set({ section: 'updates' });
this.collection.fetchUpdates();
},
showAvailable: function () {
this.state.set({ section: 'available' });
this.collection.fetchAvailable();
},
showSystemUpgrades: function () {
this.state.set({ section: 'system' });
this.collection.fetchSystemUpgrades();
}
});
});
|