Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Shelter Database
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
CHARISM
Shelter Database
Commits
3eae8b3a
Commit
3eae8b3a
authored
Sep 06, 2016
by
Maarten van der Veen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes
parent
d7f7352e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
src/web/static/js/dashboard.js
src/web/static/js/dashboard.js
+7
-2
No files found.
src/web/static/js/dashboard.js
View file @
3eae8b3a
...
...
@@ -541,12 +541,17 @@ generateShelterList = function (data) {
$
(
'
#shelterList
'
).
empty
();
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
// get url from api data if pictures exist
var
url
=
''
;
if
(
typeof
(
data
[
i
].
shelterpicture
)
!==
'
undefined
'
&&
Object
.
keys
(
data
[
i
].
shelterpicture
).
length
>
0
){
url
=
data
[
i
].
shelterpicture
[
Object
.
keys
(
data
[
i
].
shelterpicture
[
0
])][
0
];
for
(
var
prop
in
data
[
i
].
shelterpicture
)
{
url
=
data
[
i
].
shelterpicture
[
prop
][
0
];
break
;
}
}
var
shelter
=
$
(
'
<div class="shelter"/>
'
).
appendTo
(
'
#shelterList
'
);
shelter
.
append
(
'
<div class="image" style="background-image: url(
'
+
url
+
'
)"></div>
'
+
shelter
.
append
(
'
<div class="image" style="background-image: url(
\'
/
'
+
url
+
'
\
'
)"></div>
'
+
'
<h4 class="title"><a href="/shelter/
'
+
data
[
i
].
db_id
+
'
">
'
+
data
[
i
].
nameofshelter
+
'
</a></h4>
'
+
'
<div class="country">
'
+
data
[
i
].
country
+
'
</div>
'
+
'
<div class="description"><p>
'
+
''
+
'
</p></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