Commit a5d3e50b authored by Taddeüs Kroes's avatar Taddeüs Kroes

Removed some unnecessary parentheses

parent 1b801eef
...@@ -39,15 +39,15 @@ load_stored_list = (name, def) -> ...@@ -39,15 +39,15 @@ load_stored_list = (name, def) ->
# Models & collections # Models & collections
# #
Channel = Backbone.Model.extend( Channel = Backbone.Model.extend
defaults: defaults:
id: null id: null
name: 'Some channel' name: 'Some channel'
visible: true visible: true
programs: [] programs: []
)
Program = Backbone.Model.extend(
Program = Backbone.Model.extend
defaults: defaults:
id: null id: null
title: 'Some program' title: 'Some program'
...@@ -57,9 +57,9 @@ Program = Backbone.Model.extend( ...@@ -57,9 +57,9 @@ Program = Backbone.Model.extend(
end: 0 end: 0
article_id: null article_id: null
article_title: null article_title: null
)
ChannelList = Backbone.Collection.extend(
ChannelList = Backbone.Collection.extend
model: Channel model: Channel
#comparator: (a, b) -> parseInt(a.get('id')) - parseInt(b.get('id')) #comparator: (a, b) -> parseInt(a.get('id')) - parseInt(b.get('id'))
...@@ -106,13 +106,12 @@ ChannelList = Backbone.Collection.extend( ...@@ -106,13 +106,12 @@ ChannelList = Backbone.Collection.extend(
)) if channel? )) if channel?
$('#loading-screen').hide() $('#loading-screen').hide()
) )
)
# #
# Views # Views
# #
ChannelView = Backbone.View.extend( ChannelView = Backbone.View.extend
tagName: 'div' tagName: 'div'
className: 'channel' className: 'channel'
...@@ -130,9 +129,9 @@ ChannelView = Backbone.View.extend( ...@@ -130,9 +129,9 @@ ChannelView = Backbone.View.extend(
toggleVisible: -> toggleVisible: ->
@$el.toggle(@model.get('visible')) @$el.toggle(@model.get('visible'))
)
ProgramView = Backbone.View.extend(
ProgramView = Backbone.View.extend
tagName: 'div' tagName: 'div'
className: 'program' className: 'program'
...@@ -176,9 +175,9 @@ ProgramView = Backbone.View.extend( ...@@ -176,9 +175,9 @@ ProgramView = Backbone.View.extend(
@stopListening(Clock, 'tick') @stopListening(Clock, 'tick')
else else
@$el.addClass('current') @$el.addClass('current')
)
ChannelLabelsView = Backbone.View.extend(
ChannelLabelsView = Backbone.View.extend
el: $('#channel-labels') el: $('#channel-labels')
initialize: (options) -> initialize: (options) ->
...@@ -198,9 +197,9 @@ ChannelLabelsView = Backbone.View.extend( ...@@ -198,9 +197,9 @@ ChannelLabelsView = Backbone.View.extend(
toggleVisible: (channel) -> toggleVisible: (channel) ->
@$('#label-' + channel.get('id')).toggle(channel.get('visible')) @$('#label-' + channel.get('id')).toggle(channel.get('visible'))
)
ProgramDetailsView = Backbone.View.extend(
ProgramDetailsView = Backbone.View.extend
el: $('#program-details') el: $('#program-details')
template: _.template($('#details-template').html()) template: _.template($('#details-template').html())
...@@ -242,9 +241,9 @@ ProgramDetailsView = Backbone.View.extend( ...@@ -242,9 +241,9 @@ ProgramDetailsView = Backbone.View.extend(
alignMiddle: -> alignMiddle: ->
height = @$('.content').outerHeight() height = @$('.content').outerHeight()
@$('.content').css(marginTop: "-#{height / 2}px") @$('.content').css(marginTop: "-#{height / 2}px")
)
AppView = Backbone.View.extend(
AppView = Backbone.View.extend
el: $('#guide') el: $('#guide')
events: events:
...@@ -314,13 +313,12 @@ AppView = Backbone.View.extend( ...@@ -314,13 +313,12 @@ AppView = Backbone.View.extend(
@trigger('scroll', @$el.scrollTop() - @prevScrollTop) @trigger('scroll', @$el.scrollTop() - @prevScrollTop)
@prevScrollTop = @$el.scrollTop() @prevScrollTop = @$el.scrollTop()
@$('.timeline').css('top', (@$el.scrollTop() + 37) + 'px') @$('.timeline').css('top', (@$el.scrollTop() + 37) + 'px')
)
# #
# Main # Main
# #
Settings = new (Backbone.Model.extend( Settings = new do Backbone.Model.extend
defaults: defaults:
day: 0 day: 0
favourite_channels: load_stored_list(STORAGE_CHANNELS, DEFAULT_CHANNELS) favourite_channels: load_stored_list(STORAGE_CHANNELS, DEFAULT_CHANNELS)
...@@ -341,12 +339,10 @@ Settings = new (Backbone.Model.extend( ...@@ -341,12 +339,10 @@ Settings = new (Backbone.Model.extend(
isFavouriteProgram: (title) -> isFavouriteProgram: (title) ->
_.contains(@get('favourite_programs'), title) _.contains(@get('favourite_programs'), title)
))()
Clock = new (-> Clock = new do ->
_.extend(@, Backbone.Events) _.extend(@, Backbone.Events)
setInterval((=> @trigger('tick')), 60 * 60 * 1000 / HOUR_WIDTH) setInterval((=> @trigger('tick')), 60 * 60 * 1000 / HOUR_WIDTH)
)()
Channels = new ChannelList() Channels = new ChannelList()
App = new AppView() App = new AppView()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment