Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
whats-open
Commits
cb69072d
Commit
cb69072d
authored
Nov 24, 2013
by
Renfred Harper
Browse files
Rename restaurant current attribute
parent
8a1da07c
Changes
1
Hide whitespace changes
Inline
Side-by-side
website/static/js/grid.js
View file @
cb69072d
...
...
@@ -90,12 +90,12 @@ function update_grid(restaurants) {
if
(
day
===
end_day
)
{
if
(
now
<=
Date
.
parse
(
time
.
end_time
))
{
restaurant
.
open
=
true
;
restaurant
.
current
=
time
;
restaurant
.
current
_time
=
time
;
return
false
;
}
}
else
{
restaurant
.
open
=
true
;
restaurant
.
current
=
time
;
restaurant
.
current
_time
=
time
;
return
false
;
}
...
...
@@ -105,25 +105,25 @@ function update_grid(restaurants) {
if
(
day
===
start_day
)
{
if
(
now
>=
Date
.
parse
(
time
.
start_time
))
{
restaurant
.
open
=
true
;
restaurant
.
current
=
time
;
restaurant
.
current
_time
=
time
;
return
false
;
}
}
else
{
restaurant
.
open
=
true
;
restaurant
.
current
=
time
;
restaurant
.
current
_time
=
time
;
return
false
;
}
}
}
else
if
(
start_day
<
end_day
)
{
if
(
day
>
start_day
&&
day
<
end_day
)
{
restaurant
.
open
=
true
;
restaurant
.
current
=
time
;
restaurant
.
current
_time
=
time
;
return
false
;
}
}
else
if
(
start_day
>
end_day
)
{
if
(
day
>
start_day
||
day
<
end_day
)
{
restaurant
.
open
=
true
;
restaurant
.
current
=
time
;
restaurant
.
current
_time
=
time
;
return
false
;
}
}
...
...
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