mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -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
|
@ -2,20 +2,20 @@
|
|||
|
||||
define(['app', 'Upcoming/UpcomingItemView'], function (app) {
|
||||
NzbDrone.Upcoming.UpcomingCollectionView = Backbone.Marionette.CompositeView.extend({
|
||||
itemView: NzbDrone.Upcoming.UpcomingItemView,
|
||||
template: 'Upcoming/UpcomingCollectionTemplate',
|
||||
itemView : NzbDrone.Upcoming.UpcomingItemView,
|
||||
template : 'Upcoming/UpcomingCollectionTemplate',
|
||||
itemViewContainer: 'table',
|
||||
|
||||
ui: {
|
||||
yesterday: 'tbody#yesterday',
|
||||
today: 'tbody#today',
|
||||
tomorrow: 'tbody#tomorrow',
|
||||
two_days: 'tbody#two_days',
|
||||
yesterday : 'tbody#yesterday',
|
||||
today : 'tbody#today',
|
||||
tomorrow : 'tbody#tomorrow',
|
||||
two_days : 'tbody#two_days',
|
||||
three_days: 'tbody#three_days',
|
||||
four_days: 'tbody#four_days',
|
||||
five_days: 'tbody#five_days',
|
||||
six_days: 'tbody#six_days',
|
||||
later: 'tbody#later'
|
||||
four_days : 'tbody#four_days',
|
||||
five_days : 'tbody#five_days',
|
||||
six_days : 'tbody#six_days',
|
||||
later : 'tbody#later'
|
||||
},
|
||||
|
||||
initialize: function () {
|
||||
|
@ -23,7 +23,7 @@ define(['app', 'Upcoming/UpcomingItemView'], function (app) {
|
|||
this.collection.fetch();
|
||||
},
|
||||
|
||||
serializeData: function() {
|
||||
serializeData: function () {
|
||||
var viewData = {};
|
||||
viewData.two_days = Date.create().addDays(2).format('{Weekday}');
|
||||
viewData.three_days = Date.create().addDays(3).format('{Weekday}');
|
||||
|
@ -33,45 +33,45 @@ define(['app', 'Upcoming/UpcomingItemView'], function (app) {
|
|||
return viewData;
|
||||
},
|
||||
|
||||
appendHtml: function(collectionView, itemView, index){
|
||||
appendHtml: function (collectionView, itemView, index) {
|
||||
var date = Date.create(itemView.model.get('airTime'));
|
||||
|
||||
if (date.isYesterday()){
|
||||
if (date.isYesterday()) {
|
||||
collectionView.$(this.ui.yesterday).append(itemView.el);
|
||||
return;
|
||||
}
|
||||
|
||||
if (date.isToday()){
|
||||
if (date.isToday()) {
|
||||
collectionView.$(this.ui.today).append(itemView.el);
|
||||
return;
|
||||
}
|
||||
|
||||
if (date.isTomorrow()){
|
||||
if (date.isTomorrow()) {
|
||||
collectionView.$(this.ui.tomorrow).append(itemView.el);
|
||||
return;
|
||||
}
|
||||
|
||||
if (date.is(Date.create().addDays(2).short())){
|
||||
if (date.is(Date.create().addDays(2).short())) {
|
||||
collectionView.$(this.ui.two_days).append(itemView.el);
|
||||
return;
|
||||
}
|
||||
|
||||
if (date.is(Date.create().addDays(3).short())){
|
||||
if (date.is(Date.create().addDays(3).short())) {
|
||||
collectionView.$(this.ui.three_days).append(itemView.el);
|
||||
return;
|
||||
}
|
||||
|
||||
if (date.is(Date.create().addDays(4).short())){
|
||||
if (date.is(Date.create().addDays(4).short())) {
|
||||
collectionView.$(this.ui.four_days).append(itemView.el);
|
||||
return;
|
||||
}
|
||||
|
||||
if (date.is(Date.create().addDays(5).short())){
|
||||
if (date.is(Date.create().addDays(5).short())) {
|
||||
collectionView.$(this.ui.five_days).append(itemView.el);
|
||||
return;
|
||||
}
|
||||
|
||||
if (date.is(Date.create().addDays(6).short())){
|
||||
if (date.is(Date.create().addDays(6).short())) {
|
||||
collectionView.$(this.ui.six_days).append(itemView.el);
|
||||
return;
|
||||
}
|
||||
|
@ -81,8 +81,7 @@ define(['app', 'Upcoming/UpcomingItemView'], function (app) {
|
|||
//if (date.isBefore(Date.create().addDays(7))) return date.format('{Weekday}');
|
||||
},
|
||||
|
||||
onCompositeCollectionRendered: function()
|
||||
{
|
||||
onCompositeCollectionRendered: function () {
|
||||
//Might not need this :D
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue