Fixed a couple of things like (locate me, location edit)
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
const { currentSearchRequest } = require("../helpers/url");
|
const { currentSearchRequest } = require("../helpers/url");
|
||||||
|
|
||||||
const getLocation = async (req, res) => {
|
const getLocation = async (req, res) => {
|
||||||
const title = "U kojem naselju tražite nekretninu?";
|
const title = "Odaberite lokaciju";
|
||||||
const nextStep = req.query.nextStep || "/";
|
const nextStep = req.query.nextStep || "/";
|
||||||
|
|
||||||
res.render("location", {
|
res.render("location", {
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ const getQueryReviewData = searchRequest => {
|
|||||||
? realEstateTypeObject.title
|
? realEstateTypeObject.title
|
||||||
: "-";
|
: "-";
|
||||||
|
|
||||||
const locationTitle = "Location description - PLACEHOLDER";
|
const locationTitle = "Promjenite lokaciju";
|
||||||
const sizeTitle = `${sizeMin} - ${sizeMax} m2`;
|
const sizeTitle = `${sizeMin} - ${sizeMax} m2`;
|
||||||
const gardenSizeTitle = enableGardenSizeEdit
|
const gardenSizeTitle = enableGardenSizeEdit
|
||||||
? `${gardenSizeMin} - ${gardenSizeMax} m2`
|
? `${gardenSizeMin} - ${gardenSizeMax} m2`
|
||||||
@@ -39,11 +39,11 @@ const getQueryReviewData = searchRequest => {
|
|||||||
title: realEstateTypeTitle,
|
title: realEstateTypeTitle,
|
||||||
url: `/vrstanekretnine/${id}?nextStep=filteri`
|
url: `/vrstanekretnine/${id}?nextStep=filteri`
|
||||||
},
|
},
|
||||||
// {
|
{
|
||||||
// id: "location",
|
id: "location",
|
||||||
// title: locationTitle,
|
title: locationTitle,
|
||||||
// url: `/lokacija/${id}?nextStep=pregled`
|
url: `/lokacija/${id}?nextStep=pregled`
|
||||||
// },
|
},
|
||||||
{
|
{
|
||||||
id: "size",
|
id: "size",
|
||||||
title: sizeTitle,
|
title: sizeTitle,
|
||||||
@@ -59,7 +59,7 @@ const getQueryReviewData = searchRequest => {
|
|||||||
title: priceTitle,
|
title: priceTitle,
|
||||||
url: `/filteri/${id}?nextStep=pregled`
|
url: `/filteri/${id}?nextStep=pregled`
|
||||||
}
|
}
|
||||||
];
|
].filter((data) => data.title != "-");
|
||||||
};
|
};
|
||||||
|
|
||||||
const getQueryReview = async (req, res) => {
|
const getQueryReview = async (req, res) => {
|
||||||
|
|||||||
@@ -34,7 +34,8 @@
|
|||||||
margin-top: 100px;
|
margin-top: 100px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn, .btn-floating {
|
.btn,
|
||||||
|
.btn-floating {
|
||||||
background: #02adba;
|
background: #02adba;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
@@ -57,6 +58,7 @@ body {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
font-family: "Alte Haas Grotesk", serif;
|
font-family: "Alte Haas Grotesk", serif;
|
||||||
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
#floating-panel {
|
#floating-panel {
|
||||||
@@ -71,13 +73,24 @@ body {
|
|||||||
padding: 5px 5px 5px 10px;
|
padding: 5px 5px 5px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn:hover {
|
.btn-floating:hover,
|
||||||
background-color: white;
|
btn:hover {
|
||||||
color: #02adba;
|
background-color: #02adba;
|
||||||
border: 1px solid rgb(0, 173, 187);
|
border: 1px solid rgb(0, 173, 187);
|
||||||
}
|
}
|
||||||
|
|
||||||
h6.title {
|
h6.title {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
font-weight: bold; padding-top: 20px;
|
font-weight: bold;
|
||||||
}
|
padding-top: 20px;
|
||||||
|
font-size: 1.3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.locate-me-container {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font-size: 15px;
|
||||||
|
line-height: 1.5;
|
||||||
|
}
|
||||||
|
|||||||
@@ -50,6 +50,5 @@
|
|||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/noUiSlider/13.1.5/nouislider.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/noUiSlider/13.1.5/nouislider.min.js"></script>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/wnumb/1.1.0/wNumb.min.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/wnumb/1.1.0/wNumb.min.js"></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1,14 +1,13 @@
|
|||||||
<div class="row center-align">
|
<div class="row center-align">
|
||||||
|
<h3>
|
||||||
Područje na mapi će biti uključeno u pretragu. Namjestite mapu na ulice
|
Područje na mapi će biti uključeno u pretragu. Namjestite mapu na ulice
|
||||||
koje želite da budu vidljive.
|
koje želite da budu vidljive.
|
||||||
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row center-align">
|
<div class="row center-align">
|
||||||
<div class="col s9 m10 l11 xl11">
|
<div class="col s12 m12 l12 xl12">
|
||||||
<input id="autocompleteInput" placeholder="Lokacija..." type="text" />
|
<input id="autocompleteInput" placeholder="Unesite grad, naselje ili ulicu..." type="text" />
|
||||||
</div>
|
|
||||||
<div class="col s1 m1 l1 xl1">
|
|
||||||
<a id="locateMe" class="btn-floating waves-effect waves-light"><i class="material-icons right">gps_fixed</i></a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -100,6 +99,26 @@
|
|||||||
autocomplete.bindTo('bounds', map);
|
autocomplete.bindTo('bounds', map);
|
||||||
autocomplete.addListener('place_changed', onPlaceChanged);
|
autocomplete.addListener('place_changed', onPlaceChanged);
|
||||||
pacSelectFirst(inputElement);
|
pacSelectFirst(inputElement);
|
||||||
|
addLocateMeButton(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
function addLocateMeButton(map) {
|
||||||
|
var parent = document.createElement('div');
|
||||||
|
parent.className = "locate-me-container";
|
||||||
|
|
||||||
|
var a = document.createElement('a');
|
||||||
|
a.id = "locateMe";
|
||||||
|
a.className = "btn-floating";
|
||||||
|
|
||||||
|
var i = document.createElement('i');
|
||||||
|
i.innerText = "gps_fixed";
|
||||||
|
i.className = "material-icons right";
|
||||||
|
|
||||||
|
a.appendChild(i)
|
||||||
|
a.addEventListener("click", locateMe);
|
||||||
|
parent.appendChild(a)
|
||||||
|
|
||||||
|
map.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(parent)
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPlaceChanged() {
|
function onPlaceChanged() {
|
||||||
@@ -156,8 +175,7 @@
|
|||||||
|
|
||||||
$("#form-map-output").submit();
|
$("#form-map-output").submit();
|
||||||
});
|
});
|
||||||
document.getElementById("locateMe").addEventListener("click", locateMe);
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAna8ohfV2HBMcxGk_29vqxU5Z_bDickqg&language=bs&libraries=places&callback=initMap" async
|
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAna8ohfV2HBMcxGk_29vqxU5Z_bDickqg&language=bs&libraries=places&callback=initMap" async
|
||||||
defer></script>
|
defer></script>
|
||||||
Reference in New Issue
Block a user