1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-16 11:37:58 +02:00
Sonarr/UI/Release/DownloadReportCell.js

34 lines
728 B
JavaScript
Raw Normal View History

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