UI Cleanup - Updated System, Tags and Wanted subtrees.

This commit is contained in:
Taloth Saldono
2015-02-14 11:18:21 +01:00
parent d6079a701c
commit 32fc68b9df
46 changed files with 1008 additions and 643 deletions
+12 -9
View File
@@ -4,28 +4,31 @@ var UiSettings = require('../../Shared/UiSettingsModel');
module.exports = NzbDroneCell.extend({
className : 'next-execution-cell',
render : function(){
render : function() {
this.$el.empty();
var interval = this.model.get('interval');
var nextExecution = moment(this.model.get('nextExecution'));
if(interval === 0) {
if (interval === 0) {
this.$el.html('-');
}
else if(moment().isAfter(nextExecution)) {
} else if (moment().isAfter(nextExecution)) {
this.$el.html('now');
}
else {
} else {
var result = '<span title="{0}">{1}</span>';
var tooltip = nextExecution.format(UiSettings.longDateTime());
var text;
if(UiSettings.get('showRelativeDates')) {
if (UiSettings.get('showRelativeDates')) {
text = nextExecution.fromNow();
}
else {
} else {
text = nextExecution.format(UiSettings.shortDateTime());
}
this.$el.html(result.format(tooltip, text));
}
return this;
}
});