You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
910 B
35 lines
910 B
var vent = require('vent');
|
|
var Marionette = require('marionette');
|
|
var CommandController = require('../../Commands/CommandController');
|
|
|
|
module.exports = Marionette.ItemView.extend({
|
|
ui : {
|
|
refresh : '.x-refresh'
|
|
},
|
|
|
|
events : {
|
|
'click .x-edit' : '_editArtist',
|
|
'click .x-refresh' : '_refreshArtist'
|
|
},
|
|
|
|
onRender : function() {
|
|
CommandController.bindToCommand({
|
|
element : this.ui.refresh,
|
|
command : {
|
|
name : 'refreshArtist',
|
|
artistId : this.model.get('id')
|
|
}
|
|
});
|
|
},
|
|
|
|
_editArtist : function() {
|
|
vent.trigger(vent.Commands.EditArtistCommand, { artist : this.model });
|
|
},
|
|
|
|
_refreshArtist : function() {
|
|
CommandController.Execute('refreshArtist', {
|
|
name : 'refreshArtist',
|
|
artistId : this.model.id
|
|
});
|
|
}
|
|
}); |