sonarr-repo-only/UI/Release/DownloadReportCell.js

34 lines
722 B
JavaScript
Raw Normal View History

2013-06-22 06:24:24 +00:00
'use strict';
2013-06-15 05:28:35 +00:00
define(['app','backgrid'], function () {
NzbDrone.Release.DownloadReportCell = Backgrid.Cell.extend({
2013-06-22 06:24:24 +00:00
className: 'download-report-cell',
events: {
'click': '_onClick'
},
_onClick: function () {
var self = this;
2013-06-22 06:24:24 +00:00
this.$el.html('<i class ='icon-spinner icon-spin' />');
this.model.save()
.always(function () {
2013-06-22 06:24:24 +00:00
self.$el.html('<i class ='icon-download-alt' />');
});
},
render: function () {
2013-06-22 06:24:24 +00:00
this.$el.html('<i class ='icon-download-alt' />');
return this;
}
});
return NzbDrone.Release.DownloadReportCell;
});