2013-07-10 05:02:51 +00:00
|
|
|
|
'use strict';
|
2013-02-14 18:01:30 +00:00
|
|
|
|
|
2013-06-24 23:41:59 +00:00
|
|
|
|
define(
|
|
|
|
|
[
|
|
|
|
|
'app',
|
|
|
|
|
'marionette',
|
2013-07-24 04:16:52 +00:00
|
|
|
|
], function (App, Marionette) {
|
2013-06-24 23:41:59 +00:00
|
|
|
|
return Marionette.ItemView.extend({
|
|
|
|
|
template: 'Series/Index/List/ItemTemplate',
|
2013-02-14 18:01:30 +00:00
|
|
|
|
|
2013-06-24 23:41:59 +00:00
|
|
|
|
ui: {
|
|
|
|
|
'progressbar': '.progress .bar'
|
|
|
|
|
},
|
2013-02-14 18:01:30 +00:00
|
|
|
|
|
2013-06-24 23:41:59 +00:00
|
|
|
|
events: {
|
|
|
|
|
'click .x-edit' : 'editSeries',
|
|
|
|
|
'click .x-remove': 'removeSeries'
|
|
|
|
|
},
|
2013-02-14 18:01:30 +00:00
|
|
|
|
|
2013-06-24 23:41:59 +00:00
|
|
|
|
editSeries: function () {
|
2013-07-24 04:16:52 +00:00
|
|
|
|
App.vent.trigger(App.Commands.EditSeriesCommand, {series: this.model});
|
2013-06-24 23:41:59 +00:00
|
|
|
|
},
|
2013-02-14 18:01:30 +00:00
|
|
|
|
|
2013-06-24 23:41:59 +00:00
|
|
|
|
removeSeries: function () {
|
2013-07-24 04:16:52 +00:00
|
|
|
|
App.vent.trigger(App.Commands.DeleteSeriesCommand, {series: this.model});
|
2013-06-24 23:41:59 +00:00
|
|
|
|
}
|
|
|
|
|
});
|
2013-02-14 18:01:30 +00:00
|
|
|
|
});
|