mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-26 23:06:43 -04:00
UI Cleanup - Updated Cells subtree.
This commit is contained in:
@@ -4,18 +4,25 @@ var NzbDroneCell = require('./NzbDroneCell');
|
||||
module.exports = NzbDroneCell.extend({
|
||||
className : 'episode-progress-cell',
|
||||
template : 'Cells/EpisodeProgressCellTemplate',
|
||||
render : function(){
|
||||
|
||||
render : function() {
|
||||
|
||||
var episodeCount = this.model.get('episodeCount');
|
||||
var episodeFileCount = this.model.get('episodeFileCount');
|
||||
|
||||
var percent = 100;
|
||||
if(episodeCount > 0) {
|
||||
|
||||
if (episodeCount > 0) {
|
||||
percent = episodeFileCount / episodeCount * 100;
|
||||
}
|
||||
|
||||
this.model.set('percentOfEpisodes', percent);
|
||||
|
||||
this.templateFunction = Marionette.TemplateCache.get(this.template);
|
||||
var data = this.model.toJSON();
|
||||
var html = this.templateFunction(data);
|
||||
this.$el.html(html);
|
||||
|
||||
return this;
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user