Improve slider ranges #50

Merged
bilal.catic merged 3 commits from improve-slider-ranges into master 2019-10-16 15:35:22 +02:00
2 changed files with 40 additions and 8 deletions

View File

@@ -32,6 +32,38 @@ const GARDEN_SIZE_SLIDER_OPTIONS = {
tooltips: true
};
const LAND_SIZE_SLIDER_OPTIONS = {
start: [5000, 15000],
range: {
min: [0],
max: [100000]
},
step: 100,
connect: true,
tooltips: true
};
const GARAGE_SIZE_SLIDER_OPTIONS = {
start: [10, 20],
range: {
min: [0],
max: [150]
},
step: 2,
connect: true,
tooltips: true
};
const GARAGE_PRICE_SLIDER_OPTIONS = {
start: [2000, 10000],
range: {
min: [0],
max: [100000]
},
step: 500,
connect: true,
tooltips: true
};
const AD_TYPE = {
AD_TYPE_SALE: "SALE",
AD_TYPE_RENT: "RENT"
@@ -65,7 +97,7 @@ const AD_CATEGORY = {
title: "Zemljište",
hasGardenSize: false,
priceSliderOptions: PRICE_SLIDER_OPTIONS,
sizeSliderOptions: HOME_SIZE_SLIDER_OPTIONS
sizeSliderOptions: LAND_SIZE_SLIDER_OPTIONS
},
APARTMENT: {
id: "APARTMENT",
@@ -78,8 +110,8 @@ const AD_CATEGORY = {
id: "GARAGE",
title: "Garaža",
hasGardenSize: false,
priceSliderOptions: PRICE_SLIDER_OPTIONS,
sizeSliderOptions: HOME_SIZE_SLIDER_OPTIONS
priceSliderOptions: GARAGE_PRICE_SLIDER_OPTIONS,
sizeSliderOptions: GARAGE_SIZE_SLIDER_OPTIONS
},
COTTAGE: {
id: "COTTAGE",

View File

@@ -5,15 +5,15 @@
module.exports = function(environments, status) {
environments = environments || ["production"];
status = status || 301;
console.log("New force SSL ");
console.log("\tenvs : ", environments);
console.log("\tstatus: ", status);
console.log("\tENV : ", process.env.NODE_ENV);
// console.log("New force SSL ");
// console.log("\tenvs : ", environments);
// console.log("\tstatus: ", status);
// console.log("\tENV : ", process.env.NODE_ENV);
return function(req, res, next) {
if (environments.indexOf(process.env.NODE_ENV) >= 0) {
if (req.headers["x-forwarded-proto"] !== "https") {
const urlToRedirectTo = `https://${req.hostname}${req.originalUrl}`;
console.log("\tRedirect :", urlToRedirectTo);
// console.log("\tRedirect :", urlToRedirectTo);
res.redirect(status, urlToRedirectTo);
} else {
next();