Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tvgids
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Taddeüs Kroes
tvgids
Commits
a5d3e50b
Commit
a5d3e50b
authored
10 years ago
by
Taddeüs Kroes
Browse files
Options
Downloads
Patches
Plain Diff
Removed some unnecessary parentheses
parent
1b801eef
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
guide.coffee
+16
-20
16 additions, 20 deletions
guide.coffee
with
16 additions
and
20 deletions
guide.coffee
+
16
−
20
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
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment