mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
client side code webstorm code cleanup.
This commit is contained in:
parent
375f887539
commit
445ea4f344
94 changed files with 4355 additions and 4243 deletions
|
@ -1,46 +1,51 @@
|
|||
define(['app'], function (app) {
|
||||
NzbDrone.Calendar.CalendarModel = Backbone.Model.extend({
|
||||
mutators: {
|
||||
title: function () {
|
||||
title : function () {
|
||||
return this.get('seriesTitle');
|
||||
},
|
||||
allDay: function(){
|
||||
allDay : function () {
|
||||
return false;
|
||||
},
|
||||
day: function() {
|
||||
day : function () {
|
||||
return Date.create(this.get('start')).format('{dd}');
|
||||
},
|
||||
month: function(){
|
||||
month : function () {
|
||||
return Date.create(this.get('start')).format('{MON}');
|
||||
},
|
||||
startTime: function(){
|
||||
startTime : function () {
|
||||
var start = Date.create(this.get('start'));
|
||||
|
||||
if (start.format('{mm}') === '00')
|
||||
if (start.format('{mm}') === '00') {
|
||||
return start.format('{h}{tt}');
|
||||
}
|
||||
|
||||
return start.format('{h}.{mm}{tt}');
|
||||
},
|
||||
paddedEpisodeNumber: function(){
|
||||
paddedEpisodeNumber: function () {
|
||||
return this.get('episodeNumber');
|
||||
},
|
||||
statusLevel: function() {
|
||||
statusLevel : function () {
|
||||
var status = this.get('status');
|
||||
var currentTime = Date.create();
|
||||
var start = Date.create(this.get('start'));
|
||||
var end = Date.create(this.get('end'));
|
||||
|
||||
if (currentTime.isBetween(start, end))
|
||||
if (currentTime.isBetween(start, end)) {
|
||||
return 'warning';
|
||||
}
|
||||
|
||||
if (start.isBefore(currentTime) || status === 'Missing')
|
||||
if (start.isBefore(currentTime) || status === 'Missing') {
|
||||
return 'danger';
|
||||
}
|
||||
|
||||
if (status === 'Ready') return 'success';
|
||||
if (status === 'Ready') {
|
||||
return 'success';
|
||||
}
|
||||
|
||||
return 'primary';
|
||||
},
|
||||
bestDateString: function () {
|
||||
bestDateString : function () {
|
||||
return bestDateString(this.get('start'));
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue