diff --git a/ajax/loadReserve.php b/ajax/loadReserve.php
index 58f772b..0985268 100644
--- a/ajax/loadReserve.php
+++ b/ajax/loadReserve.php
@@ -5,7 +5,7 @@ if($links_xml = simplexml_load_file('../'.links::LINKS_FILE)){
foreach($links as $label){
echo '
';
}
diff --git a/class/Links.php b/class/Links.php
index f37184f..292ed94 100644
--- a/class/Links.php
+++ b/class/Links.php
@@ -17,10 +17,10 @@ class links {
if($links_xml = simplexml_load_file(self::LINKS_FILE)){
$links = $links_xml->label;
foreach($links as $label){
- echo ''.$label['id'].'
- ';
+ //'.$label['id'].'
+ echo '
';
diff --git a/class/Mappy.php b/class/Mappy.php
new file mode 100644
index 0000000..130f4c3
--- /dev/null
+++ b/class/Mappy.php
@@ -0,0 +1,47 @@
+setParams($params);
+ echo '
+
+
+
+ ';
+ }
+
+ private function setParams($params){
+ $this->params = $params;
+ }
+
+ public static function start($params){
+
+ $mappy = new mappy($params);
+ }
+
+ public function setVisibility($visibility){
+ // Saving the position and z-index of the note:
+ $xmla = simplexml_load_file('../'.AccueilModules::CONFIG_FILE);
+
+ $path = $xmla->xpath("//item[@id='mappy']");
+ $path[0]->visibility = $visibility;
+
+ $xmla->asXML('../'.AccueilModules::CONFIG_FILE);
+
+ echo "ok";
+ }
+
+ public static function updateConfig($updated){
+ foreach ($updated as $what=>$withWhat){
+ if(in_array($what, self::$paramsList)){
+ call_user_func(array(get_class(), "set".ucfirst($what)), $withWhat);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/css/links.css b/css/links.css
index 028d916..e5d3484 100644
--- a/css/links.css
+++ b/css/links.css
@@ -71,6 +71,8 @@
}
ul.iconlist, ul#reserveiconlist {
+ display:block;
+ height:75px;
padding:5px;
list-style:none;
}
diff --git a/css/mappy.css b/css/mappy.css
new file mode 100644
index 0000000..4163442
--- /dev/null
+++ b/css/mappy.css
@@ -0,0 +1,2 @@
+#mymap{display:none;z-index:900;width:400px;height:400px;}
+#myAdress{float:right; margin:12px 10px 0 0;}
\ No newline at end of file
diff --git a/db/config.xml b/db/config.xml
index a10fc7c..99d4d8c 100644
--- a/db/config.xml
+++ b/db/config.xml
@@ -8,8 +8,8 @@
-
true
Paris
- 495
- 465
+ 605
+ 648
-
true
@@ -27,8 +27,8 @@
-
true
- 30
- -4
+ 32
+ -2
-
true
@@ -40,8 +40,19 @@
#000
+ -
+ false
+
+ -
+ true
+ 500
+ 10
+
+ -
+ true
+
diff --git a/js/jquery.links.js b/js/jquery.links.js
index 3233e70..851b208 100644
--- a/js/jquery.links.js
+++ b/js/jquery.links.js
@@ -20,19 +20,19 @@ $(document).ready(function(){
});
// Passage Reserve => Liste
- $('#reserveiconlist .item').live('click', function(e){
+ $('#reserveiconlist .iconitem').live('click', function(e){
e.preventDefault();
$.post("ajax/reserveToList.php", {reserve: $(this).attr('id')});
- $('.iconlist').last().append('- '+$(this).html()+'
');
+ $('.iconlist').last().append('- '+$(this).html()+'
');
$.fancybox.close();
});
//Passage Liste => Reserve
- $('.item').mouseover(function(){
+ $('.iconitem').mouseover(function(){
$(this).children('.deleteLink').show();
});
- $('.item').mouseout(function(){
+ $('.iconitem').mouseout(function(){
$(this).children('.deleteLink').hide();
});
diff --git a/js/mappy.js b/js/mappy.js
new file mode 100644
index 0000000..5223fac
--- /dev/null
+++ b/js/mappy.js
@@ -0,0 +1,34 @@
+
+$(document).ready(function(){
+ $('#menu-bar').append($('#myAdress'));
+ $('#myAdressField').keydown(function(e){
+ var code = (e.keyCode ? e.keyCode : e.which);
+ if(code == 13) {
+ var adress = $(this).val();
+ geocode(adress);
+ $('#mymap').show();
+ }
+ });
+});
+
+function geocode (addr)
+{
+ var geo = new Mappy.api.geolocation.Geocoder();
+ geo.geocode(addr, function (results)
+ {
+ var map = new Mappy.api.map.Map({
+ container:"#mymap"
+ });
+ var scalePosition = new Mappy.api.map.tools.ToolPosition('lb', new Mappy.api.types.Point(10, 0));
+ var scale = new Mappy.api.map.tools.Scale(scalePosition);
+ map.addTool(scale);
+ var latitude = results[0].Placemark.Point.coordinates[0];
+ var longitude = results[0].Placemark.Point.coordinates[1];
+ var markerLayer = new Mappy.api.map.layer.MarkerLayer(40);
+ map.addLayer(markerLayer);
+ var icon = new Mappy.api.ui.Icon(Mappy.api.ui.Icon.DEFAULT);
+ var marker = new Mappy.api.map.Marker(new Mappy.api.geo.Coordinates(latitude, longitude), icon);
+ markerLayer.addMarker(marker);
+ map.setCenter(new Mappy.api.geo.Coordinates(latitude,longitude),7);
+ });
+}
\ No newline at end of file