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
665d560d
Commit
665d560d
authored
Oct 31, 2013
by
Renfred Harper
Browse files
Adjust construct grid formatting
parent
ef33fe4c
Changes
1
Hide whitespace changes
Inline
Side-by-side
website/static/js/grid.js
View file @
665d560d
...
...
@@ -39,12 +39,14 @@ function construct_grid(filtered_restaurants) {
if
(
restaurant
.
open
)
{
open_class
=
'
opened
'
;
}
// Append the data into the
Bootstrap
scaffolding
// Note that identical restaurants can be
num
be
r
ed
. If there is a number
in square brackets
//
N
ext to a restuarant name, the
number
will be formatted as
a subscrip
t.
// Append the data into the
grid
scaffolding
.
// Note that identical restaurants can be
la
be
l
ed
via location. If there text
in square brackets
//
n
ext to a restuarant name, the
text
will be formatted as
next to i
t.
$
(
'
#grid .row
'
).
append
(
'
<div class="col-sm-6 col-md-4 col-lg-3 grid-box" id="
'
+
restaurant
.
id
+
'
">
\
<div class="restaurant
'
+
open_class
+
'
">
'
+
restaurant
.
name
.
replace
(
/
?\[(
.+
)\]
/
,
'
<span class="building"> ($1)</span>
'
)
+
'
</div>
\
<div class="restaurant
'
+
open_class
+
'
">
'
+
restaurant
.
name
.
replace
(
/
?\[(
.+
)\]
/
,
'
<span class="building"> ($1)</span>
'
)
+
'
</div>
\
</div>
'
);
});
...
...
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