Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
BeHub-web
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dominik Rosiek
BeHub-web
Commits
c0d40359
Commit
c0d40359
authored
Nov 22, 2015
by
Rafal
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
f4e659d3
53ef33c1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
65 additions
and
7 deletions
+65
-7
map.js
BeHub/Hub/static/js/map.js
+37
-3
maps.html
BeHub/Hub/templates/user_panel/content/maps.html
+28
-4
No files found.
BeHub/Hub/static/js/map.js
View file @
c0d40359
...
@@ -34,7 +34,7 @@ Map.prototype.addMarker = function(data){
...
@@ -34,7 +34,7 @@ Map.prototype.addMarker = function(data){
title
:
data
.
title
,
title
:
data
.
title
,
beacon
:
data
.
beacon
beacon
:
data
.
beacon
}).
addListener
(
'click'
,
function
()
{
}).
addListener
(
'click'
,
function
()
{
self
.
showInfo
(
this
)
self
.
showInfo
(
this
.
beacon
)
})
})
self
.
markers
.
push
(
marker
)
self
.
markers
.
push
(
marker
)
...
@@ -55,6 +55,40 @@ Map.prototype.getAllBeacons = function(){
...
@@ -55,6 +55,40 @@ Map.prototype.getAllBeacons = function(){
})
})
}
}
Map
.
prototype
.
showInfo
=
function
(
marker
){
Map
.
prototype
.
showInfo
=
function
(
beacon
){
alert
(
'marker klikniety'
+
marker
.
beacon
.
uuid
)
$
(
"#myModalLabel"
).
text
([
beacon
.
name
,
" ("
,
beacon
.
uuid
,
")"
].
join
(
""
))
$
(
"#modal-content"
).
html
([
'<div class="col-md-6">'
,
'description:'
,
'</div>'
,
'<div class="col-md-6">'
,
beacon
.
description
,
'</div>'
,
'<div class="col-md-6">'
,
'name:'
,
'</div>'
,
'<div class="col-md-6">'
,
beacon
.
name
,
'</div>'
,
'<div class="col-md-6">'
,
'uuid:'
,
'</div>'
,
'<div class="col-md-6">'
,
beacon
.
uuid
,
'</div>'
,
'<div class="col-md-6">'
,
'longitude:'
,
'</div>'
,
'<div class="col-md-6">'
,
beacon
.
longitude
,
'</div>'
,
'<div class="col-md-6">'
,
'latitude:'
,
'</div>'
,
'<div class="col-md-6">'
,
beacon
.
latitude
,
'</div>'
,
'<div class="clearfix"></div>'
].
join
(
""
))
$
(
"#myModal"
).
modal
(
"show"
);
// alert('marker klikniety' + marker.beacon.uuid)
}
}
\ No newline at end of file
BeHub/Hub/templates/user_panel/content/maps.html
View file @
c0d40359
...
@@ -4,9 +4,33 @@
...
@@ -4,9 +4,33 @@
<script>
<script>
var
map
;
var
map
;
function
startMap
(){
$
(
document
).
ready
(
function
(){
map
=
new
Map
();
$
(
'a[data-toggle="tab"]'
).
on
(
'shown.bs.tab'
,
function
(
e
)
{
};
var
target
=
$
(
e
.
target
).
attr
(
"href"
)
// activated tab
if
(
target
==
"#map"
&&
!
map
){
map
=
new
Map
();
}
});
});
</script>
</script>
<script
async
defer
<script
async
defer
src=
"https://maps.googleapis.com/maps/api/js?key=AIzaSyAaYyVEcLFqwKP_VnzfRSIMkWWWrLtMiGQ&signed_in=true&callback=startMap"
></script>
src=
"https://maps.googleapis.com/maps/api/js?key=AIzaSyAaYyVEcLFqwKP_VnzfRSIMkWWWrLtMiGQ&signed_in=true"
></script>
<!-- Modal -->
<div
class=
"modal fade"
id=
"myModal"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
>
<div
class=
"modal-dialog"
role=
"document"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-label=
"Close"
><span
aria-hidden=
"true"
>
×
</span></button>
<h4
class=
"modal-title"
id=
"myModalLabel"
>
Modal title
</h4>
</div>
<div
class=
"modal-body"
id=
"modal-content"
>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
Close
</button>
<button
type=
"button"
class=
"btn btn-primary"
>
Save changes
</button>
</div>
</div>
</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