Skip to content

Commit

Permalink
Merge pull request #268 from hasgeek/payrange-slider
Browse files Browse the repository at this point in the history
fix for #265
  • Loading branch information
shreyas-satish committed Apr 22, 2016
2 parents 25fb58f + 089ff6a commit a882d2f
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 8 deletions.
2 changes: 1 addition & 1 deletion hasjob/static/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ header #hgnav .fa {
width: 20em;
}
header #hgnav .header-section .pay-filter-dropdown {
width: 135%;
width: 190%;
left: 0;
right: auto;
}
Expand Down
28 changes: 22 additions & 6 deletions hasjob/static/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -548,18 +548,33 @@ window.Hasjob.PaySlider.toNumeric = function(str){
return str.slice(1).replace(/,/g, '');
};

window.Hasjob.PaySlider.range = function(currency){
if(currency === '$') {
return {
'min': [0, 5000],
'2%': [200000, 50000],
'10%': [1000000, 100000],
'max': [10000000, 100000]
}
}
else {
return {
'min': [0, 50000],
'10%': [1000000, 100000],
'max': [10000000, 100000]
}
}
};

window.Hasjob.PaySlider.prototype.init = function(){
this.slider = $(this.selector).noUiSlider({
start: [this.start, this.end],
step: 1,
connect: true,
behaviour: "tap",
range: {
'min': [0, 5000],
'5%': [100000, 10000],
'80%': [1000000, 50000],
'90%': [2000000, 100000],
'max': [10000000, 1000000],
'min': [0, 50000],
'10%': [1000000, 100000],
'max': [10000000, 100000]
},
format: window.wNumb({
decimals: 0,
Expand All @@ -578,6 +593,7 @@ window.Hasjob.PaySlider.prototype.resetSlider = function(currency) {

this.slider.noUiSlider({
start: [start, end],
range: Hasjob.PaySlider.range(window.Hasjob.Currency.prefix(currency)),
format: Hasjob.Currency.wNumbFormat(currency)
}, true);

Expand Down
3 changes: 2 additions & 1 deletion hasjob/static/sass/_header.sass
Original file line number Diff line number Diff line change
Expand Up @@ -235,11 +235,12 @@ header
padding: 10px 0 5px
min-height: 0


ul.multiselect-container
width: 20em

.pay-filter-dropdown
width: 135%
width: 190%
left: 0
right: auto

Expand Down

0 comments on commit a882d2f

Please sign in to comment.