diff --git a/public/js/app.js b/public/js/app.js
index 4516645..19fd1bb 100644
--- a/public/js/app.js
+++ b/public/js/app.js
@@ -147,16 +147,14 @@ window.addEventListener('popstate', function(e)
if (e.state.hasOwnProperty('pointId'))
{
showInfo(e.state.pointId, false, true);
- } else
- if (e.state.hasOwnProperty('zoom'))
+ } else if (e.state.hasOwnProperty('zoom'))
{
lat = e.state.lat;
lng = e.state.lng;
zoom = e.state.zoom;
myMap.setView([lat, lng], zoom);
- } else
- if (e.state.hasOwnProperty('route'))
+ } else if (e.state.hasOwnProperty('route'))
{
loadRouteJSON(e.state.route);
}
@@ -251,9 +249,7 @@ function activateAddPoint()
$('#map').css('cursor', 'crosshair');
$('div#addHelper').slideDown(200);
setStatus(statusHunting)
- }
- else
- {
+ } else {
$('div#addHelper').hide(150);
$('#map').css('cursor', 'arrow');
setStatus(statusReady)
diff --git a/public/js/map.js b/public/js/map.js
index d8ba720..5a71fb5 100644
--- a/public/js/map.js
+++ b/public/js/map.js
@@ -87,8 +87,7 @@ function init(lat, lng) {
myMap.on('click', function (e) {
if (!myMap._popup) {
- if (status == statusHunting)
- {
+ if (status == statusHunting) {
$('div#addHelper').hide(150);
$('#addPointId').remove();
$('#addPointForm input:text').val('');
@@ -99,8 +98,7 @@ function init(lat, lng) {
$('#myModalLabel').text('Добавление новой точки');
$('#addPointModal').modal('show');
- } else if (status == statusReHunting)
- {
+ } else if (status == statusReHunting) {
resetStatus();
$('#addPointLat').val(e.latlng.lat);
@@ -109,8 +107,7 @@ function init(lat, lng) {
$('#myModalLabel').text('Редактирование точки');
$('#addPointModal').modal('show');
}
- }
- else {
+ } else {
closePopup();
}
});
@@ -121,15 +118,13 @@ function init(lat, lng) {
$("#extraParamsContainer").sortable();
myMap.on('moveend', function (e) {
- if (!myMap._popup && $('#boxRoute').css('display') == 'none' && status != statusMovingInHistory)
- {
+ if (!myMap._popup && status != statusMovingInHistory) {
document.title = 'Лучшие выходные — это выходные в путешествии! – wikipoints.ru';
history.pushState({lat: myMap.getCenter().lat, lng: myMap.getCenter().lng, zoom: myMap.getZoom()}, document.title, "/?lat=" + myMap.getCenter().lat + "&lng=" + myMap.getCenter().lng + "&zoom=" + myMap.getZoom());
loadPointsInBounds();
}
- if (status == statusMovingInHistory)
- {
+ if (status == statusMovingInHistory) {
resetStatus();
}
});
diff --git a/views/article.php b/views/article.php
index 25526dd..f042864 100644
--- a/views/article.php
+++ b/views/article.php
@@ -21,6 +21,7 @@
+