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
82da056f
Commit
82da056f
authored
Mar 22, 2013
by
Tyler Hallada
Browse files
Fix bugs with generating the grid. Ignore .swo.
parent
19358427
Changes
2
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
82da056f
...
...
@@ -2,7 +2,7 @@
*.pot
*.py[cod]
*.db
*.sw
p
*.sw
[po]
*.log
*.env
venv
...
...
website/static/js/grid.js
View file @
82da056f
...
...
@@ -13,15 +13,17 @@ function open(id) {
$
.
ajax
({
url
:
'
/ajax/schedule/
'
,
}).
done
(
function
(
data
)
{
$
(
'
#grid
'
).
append
(
'
<div class="row"></div>
'
);
$
(
'
#grid
'
).
empty
();
$
(
'
#grid
'
).
html
(
'
<div class="row"></div>
'
);
$
.
each
(
data
.
data
,
function
(
idx
,
restaurant
)
{
//
Note: This assumes grid does not already exist. TODO do not assume.
//
Append the data into the Bootstrap scaffolding
if
(
$
(
'
#grid .row
'
).
last
().
children
().
length
<
4
)
{
$
(
'
#grid .row
'
).
append
(
$
(
'
#grid .row
'
).
last
().
append
(
'
<div class="span3 closed" id="
'
+
restaurant
.
id
+
'
">
'
+
restaurant
.
name
+
'
</div>
'
);
}
else
{
$
(
'
#grid
'
).
append
(
'
<div class="row"></div>
'
).
append
(
$
(
'
#grid
'
).
append
(
'
<div class="row"></div>
'
);
$
(
'
#grid .row
'
).
last
().
append
(
'
<div class="span3 closed" id="
'
+
restaurant
.
id
+
'
">
'
+
restaurant
.
name
+
'
</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