Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tvgids
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
tvgids
Commits
a5d3e50b
Commit
a5d3e50b
authored
Jun 09, 2014
by
Taddeüs Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed some unnecessary parentheses
parent
1b801eef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
20 deletions
+16
-20
guide.coffee
guide.coffee
+16
-20
No files found.
guide.coffee
View file @
a5d3e50b
...
...
@@ -39,15 +39,15 @@ load_stored_list = (name, def) ->
# Models & collections
#
Channel
=
Backbone
.
Model
.
extend
(
Channel
=
Backbone
.
Model
.
extend
defaults
:
id
:
null
name
:
'Some channel'
visible
:
true
programs
:
[]
)
Program
=
Backbone
.
Model
.
extend
(
Program
=
Backbone
.
Model
.
extend
defaults
:
id
:
null
title
:
'Some program'
...
...
@@ -57,9 +57,9 @@ Program = Backbone.Model.extend(
end
:
0
article_id
:
null
article_title
:
null
)
ChannelList
=
Backbone
.
Collection
.
extend
(
ChannelList
=
Backbone
.
Collection
.
extend
model
:
Channel
#comparator: (a, b) -> parseInt(a.get('id')) - parseInt(b.get('id'))
...
...
@@ -106,13 +106,12 @@ ChannelList = Backbone.Collection.extend(
))
if
channel
?
$
(
'#loading-screen'
).
hide
()
)
)
#
# Views
#
ChannelView
=
Backbone
.
View
.
extend
(
ChannelView
=
Backbone
.
View
.
extend
tagName
:
'div'
className
:
'channel'
...
...
@@ -130,9 +129,9 @@ ChannelView = Backbone.View.extend(
toggleVisible
:
->
@
$el
.
toggle
(
@
model
.
get
(
'visible'
))
)
ProgramView
=
Backbone
.
View
.
extend
(
ProgramView
=
Backbone
.
View
.
extend
tagName
:
'div'
className
:
'program'
...
...
@@ -176,9 +175,9 @@ ProgramView = Backbone.View.extend(
@
stopListening
(
Clock
,
'tick'
)
else
@
$el
.
addClass
(
'current'
)
)
ChannelLabelsView
=
Backbone
.
View
.
extend
(
ChannelLabelsView
=
Backbone
.
View
.
extend
el
:
$
(
'#channel-labels'
)
initialize
:
(
options
)
->
...
...
@@ -198,9 +197,9 @@ ChannelLabelsView = Backbone.View.extend(
toggleVisible
:
(
channel
)
->
@
$
(
'#label-'
+
channel
.
get
(
'id'
)).
toggle
(
channel
.
get
(
'visible'
))
)
ProgramDetailsView
=
Backbone
.
View
.
extend
(
ProgramDetailsView
=
Backbone
.
View
.
extend
el
:
$
(
'#program-details'
)
template
:
_
.
template
(
$
(
'#details-template'
).
html
())
...
...
@@ -242,9 +241,9 @@ ProgramDetailsView = Backbone.View.extend(
alignMiddle
:
->
height
=
@
$
(
'.content'
).
outerHeight
()
@
$
(
'.content'
).
css
(
marginTop
:
"-
#{
height
/
2
}
px"
)
)
AppView
=
Backbone
.
View
.
extend
(
AppView
=
Backbone
.
View
.
extend
el
:
$
(
'#guide'
)
events
:
...
...
@@ -314,13 +313,12 @@ AppView = Backbone.View.extend(
@
trigger
(
'scroll'
,
@
$el
.
scrollTop
()
-
@
prevScrollTop
)
@
prevScrollTop
=
@
$el
.
scrollTop
()
@
$
(
'.timeline'
).
css
(
'top'
,
(
@
$el
.
scrollTop
()
+
37
)
+
'px'
)
)
#
# Main
#
Settings
=
new
(
Backbone
.
Model
.
extend
(
Settings
=
new
do
Backbone
.
Model
.
extend
defaults
:
day
:
0
favourite_channels
:
load_stored_list
(
STORAGE_CHANNELS
,
DEFAULT_CHANNELS
)
...
...
@@ -341,12 +339,10 @@ Settings = new (Backbone.Model.extend(
isFavouriteProgram
:
(
title
)
->
_
.
contains
(
@
get
(
'favourite_programs'
),
title
)
))()
Clock
=
new
(
->
Clock
=
new
do
->
_
.
extend
(
@
,
Backbone
.
Events
)
setInterval
((
=>
@
trigger
(
'tick'
)),
60
*
60
*
1000
/
HOUR_WIDTH
)
)()
Channels
=
new
ChannelList
()
App
=
new
AppView
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment