blob: bc5f68916179935d9c4025bdef3d855e64a04885 (
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
|
define([
'backbone.marionette',
'./create-view',
'./templates'
], function (Marionette, CreateView) {
return Marionette.ItemView.extend({
template: Templates['metrics-header'],
events: {
'click #metrics-create': 'onCreateClick'
},
onCreateClick: function (e) {
e.preventDefault();
this.createMetric();
},
createMetric: function () {
new CreateView({
collection: this.collection,
domains: this.options.domains,
types: this.options.types,
app: this.options.app
}).render();
}
});
});
|