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',
|
|
|
|
|
'Series/Edit/EditSeriesView',
|
|
|
|
|
'Series/Delete/DeleteSeriesView'
|
2013-02-15 02:40:29 +00:00
|
|
|
|
|
2013-06-24 23:41:59 +00:00
|
|
|
|
], function (App, Marionette, EditSeriesView, DeleteSeriesView) {
|
|
|
|
|
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 () {
|
|
|
|
|
var view = new EditSeriesView({ model: this.model});
|
|
|
|
|
App.modalRegion.show(view);
|
|
|
|
|
},
|
2013-02-14 18:01:30 +00:00
|
|
|
|
|
2013-06-24 23:41:59 +00:00
|
|
|
|
removeSeries: function () {
|
|
|
|
|
var view = new DeleteSeriesView({ model: this.model });
|
|
|
|
|
App.modalRegion.show(view);
|
|
|
|
|
}
|
|
|
|
|
});
|
2013-02-14 18:01:30 +00:00
|
|
|
|
});
|