diff --git a/app/controllers/location.js b/app/controllers/location.js index e0bd4ca..afbf43f 100644 --- a/app/controllers/location.js +++ b/app/controllers/location.js @@ -1,7 +1,7 @@ const { currentSearchRequest } = require("../helpers/url"); const getLocation = async (req, res) => { - const title = "U kojem naselju tražite nekretninu?"; + const title = "Odaberite lokaciju"; const nextStep = req.query.nextStep || "/"; res.render("location", { diff --git a/app/controllers/queryReview.js b/app/controllers/queryReview.js index 1834dec..dca9ef3 100644 --- a/app/controllers/queryReview.js +++ b/app/controllers/queryReview.js @@ -26,7 +26,7 @@ const getQueryReviewData = searchRequest => { ? realEstateTypeObject.title : "-"; - const locationTitle = "Location description - PLACEHOLDER"; + const locationTitle = "Promjenite lokaciju"; const sizeTitle = `${sizeMin} - ${sizeMax} m2`; const gardenSizeTitle = enableGardenSizeEdit ? `${gardenSizeMin} - ${gardenSizeMax} m2` @@ -39,11 +39,11 @@ const getQueryReviewData = searchRequest => { title: realEstateTypeTitle, url: `/vrstanekretnine/${id}?nextStep=filteri` }, - // { - // id: "location", - // title: locationTitle, - // url: `/lokacija/${id}?nextStep=pregled` - // }, + { + id: "location", + title: locationTitle, + url: `/lokacija/${id}?nextStep=pregled` + }, { id: "size", title: sizeTitle, @@ -59,7 +59,7 @@ const getQueryReviewData = searchRequest => { title: priceTitle, url: `/filteri/${id}?nextStep=pregled` } - ]; + ].filter((data) => data.title != "-"); }; const getQueryReview = async (req, res) => { diff --git a/app/public/main.css b/app/public/main.css index 22d0201..ca398fa 100644 --- a/app/public/main.css +++ b/app/public/main.css @@ -34,7 +34,8 @@ margin-top: 100px; } -.btn, .btn-floating { +.btn, +.btn-floating { background: #02adba; font-weight: bold; } @@ -57,6 +58,7 @@ body { margin: 0; padding: 0; font-family: "Alte Haas Grotesk", serif; + box-sizing: border-box; } #floating-panel { @@ -71,13 +73,24 @@ body { padding: 5px 5px 5px 10px; } -.btn:hover { - background-color: white; - color: #02adba; +.btn-floating:hover, +btn:hover { + background-color: #02adba; border: 1px solid rgb(0, 173, 187); } h6.title { margin-top: 0; - font-weight: bold; padding-top: 20px; -} \ No newline at end of file + font-weight: bold; + padding-top: 20px; + font-size: 1.3rem; +} + +.locate-me-container { + margin-right: 10px; +} + +h3 { + font-size: 15px; + line-height: 1.5; +} diff --git a/app/views/layout.ejs b/app/views/layout.ejs index 1927bf5..774f047 100644 --- a/app/views/layout.ejs +++ b/app/views/layout.ejs @@ -50,6 +50,5 @@ - diff --git a/app/views/location.ejs b/app/views/location.ejs index 1ecd9cf..1e34de2 100644 --- a/app/views/location.ejs +++ b/app/views/location.ejs @@ -1,14 +1,13 @@
+

Područje na mapi će biti uključeno u pretragu. Namjestite mapu na ulice koje želite da budu vidljive. +

-
- -
-
- gps_fixed +
+
@@ -100,6 +99,26 @@ autocomplete.bindTo('bounds', map); autocomplete.addListener('place_changed', onPlaceChanged); 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() { @@ -156,8 +175,7 @@ $("#form-map-output").submit(); }); - document.getElementById("locateMe").addEventListener("click", locateMe); }); + defer> \ No newline at end of file