Commit 675749a5 authored by Dominik Rosiek's avatar Dominik Rosiek

jest ok, better loading :)

parent 2e21528d
...@@ -56,5 +56,6 @@ Map.prototype.getAllBeacons = function(){ ...@@ -56,5 +56,6 @@ Map.prototype.getAllBeacons = function(){
} }
Map.prototype.showInfo = function(marker){ Map.prototype.showInfo = function(marker){
alert('marker klikniety' + marker.beacon.uuid) $("#myModal").modal("show");
// alert('marker klikniety' + marker.beacon.uuid)
} }
\ No newline at end of file
...@@ -4,9 +4,33 @@ ...@@ -4,9 +4,33 @@
<script> <script>
var map; var map;
function startMap(){ $(document).ready(function(){
$('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(); 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">&times;</span></button>
<h4 class="modal-title" id="myModalLabel">Modal title</h4>
</div>
<div class="modal-body">
hehe
</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>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment