Improve slider ranges #50
@@ -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",
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user