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,71 +2,71 @@
|
|||
|
||||
define(['app', 'Calendar/CalendarItemView'], function (app) {
|
||||
NzbDrone.Calendar.CalendarCollectionView = Backbone.Marionette.CompositeView.extend({
|
||||
itemView: NzbDrone.Calendar.CalendarItemView,
|
||||
itemView : NzbDrone.Calendar.CalendarItemView,
|
||||
itemViewContainer: '#events',
|
||||
template: 'Calendar/CalendarCollectionTemplate',
|
||||
className: 'row',
|
||||
template : 'Calendar/CalendarCollectionTemplate',
|
||||
className : 'row',
|
||||
|
||||
ui: {
|
||||
calendar: '#calendar'
|
||||
},
|
||||
|
||||
initialize: function (context, action, query, collection) {
|
||||
initialize : function (context, action, query, collection) {
|
||||
this.collection = collection;
|
||||
this.calendar = new NzbDrone.Calendar.CalendarCollection();
|
||||
},
|
||||
onCompositeCollectionRendered: function() {
|
||||
onCompositeCollectionRendered: function () {
|
||||
$(this.ui.calendar).fullCalendar({
|
||||
allDayDefault: false,
|
||||
allDayDefault : false,
|
||||
ignoreTimezone: false,
|
||||
weekMode: 'variable',
|
||||
timeFormat: 'h(:mm)tt',
|
||||
header: {
|
||||
left: 'prev,next today',
|
||||
weekMode : 'variable',
|
||||
timeFormat : 'h(:mm)tt',
|
||||
header : {
|
||||
left : 'prev,next today',
|
||||
center: 'title',
|
||||
right: 'month,basicWeek'
|
||||
right : 'month,basicWeek'
|
||||
},
|
||||
buttonText: {
|
||||
buttonText : {
|
||||
prev: '<i class="icon-arrow-left"></i>',
|
||||
next: '<i class="icon-arrow-right"></i>'
|
||||
},
|
||||
events: this.getEvents,
|
||||
eventRender: function (event, element) {
|
||||
events : this.getEvents,
|
||||
eventRender : function (event, element) {
|
||||
$(element).addClass(event.statusLevel);
|
||||
$(element).children('.fc-event-inner').addClass(event.statusLevel);
|
||||
|
||||
element.popover({
|
||||
title: '{seriesTitle} - {season}x{episode} - {episodeTitle}'.assign({
|
||||
seriesTitle: event.seriesTitle,
|
||||
season: event.seasonNumber,
|
||||
episode: event.episodeNumber.pad(2),
|
||||
title : '{seriesTitle} - {season}x{episode} - {episodeTitle}'.assign({
|
||||
seriesTitle : event.seriesTitle,
|
||||
season : event.seasonNumber,
|
||||
episode : event.episodeNumber.pad(2),
|
||||
episodeTitle: event.episodeTitle
|
||||
}),
|
||||
content: event.overview,
|
||||
content : event.overview,
|
||||
placement: 'bottom',
|
||||
trigger: 'manual'
|
||||
trigger : 'manual'
|
||||
});
|
||||
},
|
||||
eventMouseover: function(event, jsEvent, view){
|
||||
eventMouseover: function (event, jsEvent, view) {
|
||||
$(this).popover('show');
|
||||
},
|
||||
eventMouseout: function(event, jsEvent, view){
|
||||
eventMouseout : function (event, jsEvent, view) {
|
||||
$(this).popover('hide');
|
||||
}
|
||||
});
|
||||
|
||||
NzbDrone.Calendar.CalendarCollectionView.Instance = this;
|
||||
$(this.ui.calendar).fullCalendar('addEventSource', this.calendar.toJSON());
|
||||
},
|
||||
getEvents: function(start, end, callback){
|
||||
},
|
||||
getEvents : function (start, end, callback) {
|
||||
var bbView = NzbDrone.Calendar.CalendarCollectionView.Instance;
|
||||
|
||||
var startDate = Date.create(start).format(Date.ISO8601_DATETIME);
|
||||
var endDate = Date.create(end).format(Date.ISO8601_DATETIME);
|
||||
|
||||
bbView.calendar.fetch({
|
||||
data:{ start: startDate, end: endDate },
|
||||
success:function (calendarCollection) {
|
||||
data : { start: startDate, end: endDate },
|
||||
success: function (calendarCollection) {
|
||||
callback(calendarCollection.toJSON());
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue