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
Christopher M Reffett
whats-open
Commits
66eda255
Commit
66eda255
authored
Sep 19, 2013
by
Renfred Harper
Browse files
Isolate update grid function
parent
a5eedf3d
Changes
1
Hide whitespace changes
Inline
Side-by-side
website/static/js/grid.js
View file @
66eda255
...
...
@@ -34,11 +34,8 @@ function construct_grid(filtered_restaurants) {
$
(
'
#footer
'
).
show
();
}
$
.
ajax
({
url
:
'
/ajax/schedule/
'
,
}).
done
(
function
(
data
)
{
restaurants
=
data
.
data
;
$
.
each
(
restaurants
,
function
(
idx
,
restaurant
)
{
function
update_grid
(
restaurants
)
{
$
.
each
(
restaurants
,
function
(
idx
,
restaurant
)
{
var
now
=
new
Date
();
var
date
=
new
Date
().
setHours
(
0
,
0
,
0
,
0
);
// JavaScript sets 0 to Sunday instead of Monday
...
...
@@ -103,5 +100,12 @@ $.ajax({
restaurant
.
open
=
false
;
});
});
}
$
.
ajax
({
url
:
'
/ajax/schedule/
'
,
}).
done
(
function
(
data
)
{
restaurants
=
data
.
data
;
update_grid
(
restaurants
);
construct_grid
(
restaurants
);
});
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