diff --git a/js/crep.js b/js/crep.js index ba3dd29..a3a6a73 100755 --- a/js/crep.js +++ b/js/crep.js @@ -4,7 +4,9 @@ function loadDoc(ev) { $.get(location + '?c', function (data) { mainContainer = $("#mainContainer") mainContainer.html(data) + // POST dynamiseLinks(mainContainer) + pageSpecific(location) }) return false } @@ -14,6 +16,30 @@ function dynamiseLinks(el) { $("a", el).click(loadDoc) } +function pageSpecific(location) { + if (location.indexOf('contact') >= 0) { + initializeMap() + } +} + $(document).ready(function () { dynamiseLinks(document) -}) \ No newline at end of file + pageSpecific(window.location.href) +}) + +function initializeMap() { + var mapCanvas = document.getElementById('map-canvas'); + mapCanvas.innerHTML = '' + var polytechPos = new google.maps.LatLng(50.6074998, 3.1373338); + var mapOptions = { + center: polytechPos, + zoom: 16, + mapTypeId: google.maps.MapTypeId.ROADMAP + } + var map = new google.maps.Map(mapCanvas, mapOptions) + var marker = new google.maps.Marker({ + position: polytechPos, + map: map, + title: "Polytech Lille" + }); +} \ No newline at end of file diff --git a/pages/contact.php b/pages/contact.php index 6018d97..4473a5f 100755 --- a/pages/contact.php +++ b/pages/contact.php @@ -6,25 +6,4 @@  
-
- + \ No newline at end of file -- libgit2 0.21.2