'use strict'; define( [ 'backgrid' ], function (Backgrid) { return Backgrid.Cell.extend({ className: 'download-report-cell', events: { 'click': '_onClick' }, _onClick: function () { var self = this; this.$el.html(''); var promise = this.model.save(); promise.done(function () { self.$el.html(''); }); promise.fail(function () { self.$el.html(''); }); }, render: function () { this.$el.html(''); if (this.model.get('downloadAllowed')) { this.$el.html(''); } return this; } }); });