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
Zoheb Lokhandwala
whats-open
Commits
23815e54
Commit
23815e54
authored
Oct 13, 2013
by
Renfred Harper
Browse files
Hide info-next div when empty
parent
07289d34
Changes
1
Hide whitespace changes
Inline
Side-by-side
website/static/js/info.js
View file @
23815e54
...
...
@@ -61,11 +61,11 @@ $(document).ready(function() {
$
(
'
#info-status
'
).
html
(
'
<b>Status:</b> Open
'
);
var
closing
=
Date
.
parse
(
restaurant
.
current
.
end_time
);
// Print the time the restaurant closes in local format with the seconds removed via regex
$
(
'
#info-next
'
).
html
(
'
<b>Open Till:</b>
'
+
closing
.
toLocaleTimeString
().
replace
(
/
(\d
+:
\d{2})(
:
\d
+
)
/
,
"
$1
"
));
$
(
'
#info-next
'
).
html
(
'
<b>Open Till:</b>
'
+
closing
.
toLocaleTimeString
().
replace
(
/
(\d
+:
\d{2})(
:
\d
+
)
/
,
"
$1
"
))
.
show
()
;
}
else
{
$
(
'
#info-status
'
).
html
(
'
<b>Status:</b> Closed
'
);
$
(
'
#info-next
'
).
html
(
""
);
$
(
'
#info-next
'
).
empty
().
hide
()
}
// Display all open times for the main schedule
var
open_times
=
restaurant
.
main_schedule
.
open_times
;
...
...
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