diff --git a/ground/views/indexTemplate.php b/ground/views/indexTemplate.php
index 8825d43..fab6f8a 100644
--- a/ground/views/indexTemplate.php
+++ b/ground/views/indexTemplate.php
@@ -7,7 +7,7 @@
-
Мой маршрут
-
+
-
-
+
diff --git a/public/css/style.css b/public/css/style.css
index 7d25c6d..4e41e23 100644
--- a/public/css/style.css
+++ b/public/css/style.css
@@ -23,14 +23,11 @@ div.add {cursor: pointer;}
#wayPoints .wayPoint {cursor: pointer; border: solid 1px #999; padding: 2px 5px; margin-bottom: 3px;}
#wayPoints .wayPoint span {font-weight: bold; color: red;}
-#routeWindow {display: none;position: absolute; top: 35px; right: 7px; left: auto; max-width: none; width: 345px; bottom: 55px;}
-#routeWindow .popover-content {overflow-y: scroll; bottom: 45px; position: absolute; top: 36px; width: 342px;}
-#routeWindow .buttons {bottom: 3px; position: absolute;}
#routes {margin-bottom: 10px; height: 200px; background-color: #ff9999;}
#routes .route {cursor: pointer; border: solid 1px #999; padding: 2px 5px; margin-bottom: 3px;}
#routes .route span {font-weight: bold; color: red;}
-
+/*Controls for BOX*/
div#control {width: 50px; position: absolute; top: 0; right: 0;bottom: 50px; color: white; font-size: 20px; padding-top: 10px;}
body.openBox div#control {right: 250px;}
div#control div {background-color: rgba(15, 15, 15, 0.65); border-radius: 8px 0 0 8px; width: auto; padding: 10px; margin-left: 10px; margin-bottom: 8px;}
@@ -42,8 +39,12 @@ div#control div._c {border-radius: 0; border-bottom: solid 1px #666; margin-bott
div#control div._b {border-radius: 0 0 0 8px;}
div#control div.space {height: 10px; background-color: transparent; padding: 0;}
-
+/*BOX*/
body.openBox div#box {display: block;}
div#box {width: 250px; display: none; position: absolute; top: 0; right: 0;bottom: 0px; border-left: 2px solid rgba(45, 45, 45, 0.8); padding: 0 7px;}
div#box #boxClose {position: absolute; right: 7px; top: 7px; color: #999; font-size: 18px; font-weight: bolder; cursor: pointer;}
-div#box div {display: none;}
\ No newline at end of file
+div#box div {display: none;}
+div#box div > div{display: block;}
+
+/*Leaflet FIX*/
+.leaflet-popup-content-wrapper .leaflet-popup-scrolled {border-bottom: none;border-top: none;}
\ No newline at end of file
diff --git a/public/js/main.js b/public/js/main.js
index 18c2fdd..5fa637b 100644
--- a/public/js/main.js
+++ b/public/js/main.js
@@ -156,7 +156,7 @@ function init() {
$("#wayPoints").disableSelection();
myMap.on('moveend', function(e) {
- if (!myMap._popup && $('#routeWindow').css('display') == 'none')
+ if (!myMap._popup && $('#boxRoute').css('display') == 'none')
{
history.pushState({}, document.title, "/?lat=" + myMap.getCenter().lat + "&lng=" + myMap.getCenter().lng + "&zoom=" + myMap.getZoom());
}
@@ -248,7 +248,7 @@ function showInfo(id)
description = description + '
';
marker.options.description = description;
- marker.bindPopup(marker.options.description, {maxWidth: 500}).openPopup();
+ marker.bindPopup(marker.options.description, {maxWidth: 500, maxHeight: 300}).openPopup();
}
});
}
@@ -558,7 +558,7 @@ function addToRoute(id)
console.log(points[id]);
$('#wayPoints').append('
× ' + points[id].options.title + '
');
myMap._popup._close();
- $('#routeWindow').show(200);
+ openBox('Route', true);
return true;
}
@@ -605,17 +605,18 @@ function editSetNewCoords()
setStatus(statusReHunting)
}
-function openBox(type)
+function openBox(type, keepOpen)
{
newTab = $('#box'+type).css('display') == 'none';
+ keepOpen = keepOpen == true;
- if (!newTab)
+ if (!newTab && !keepOpen)
{
return closeBox();
}
$('div','#control').removeClass('active');
- $('div','#box').css('display', 'none');
+ $('#box').children('div').css('display', 'none');
$('.boxButton'+type).addClass('active');
$('#box'+type).css('display', 'block');
@@ -626,7 +627,7 @@ function closeBox()
{
$('body').removeClass('openBox');
$('div','#control').removeClass('active');
- $('div','#box').css('display', 'none');
+ $('#box').children('div').css('display', 'none');
return true;
}