I made some enhancements for the facetapi_slider module.
These are solutions for multiple issues, but because they are grouped together, I made a new issue.
- support for prefix and suffix (solution for #1496316: Prefix and Suffix from CCK field)
- support for rounding and slider step (solution for #1412110: rounding to integers causes poor precision for float-based sliders)
- possibility to enlarge the range
- better slider ui
- some code enhancements
there is still a problem with the initial value of the slider values, but it works.
After applying the patch, this should be the result:
http://spatial.mollux.be/facetapi-enhancements+search_api-integration-01...
http://spatial.mollux.be/facetapi-enhancements+search_api-integration-02...
I have tested it with search_api (I will make a separate issue with the patch) and search_api_location, and it works well :)
Can somebody with apachesolr experience confirm that it works well also?
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | 1682792-9.patch | 12.34 KB | nick_vh |
| #6 | Slider dont show.png | 501.57 KB | luo8 |
| #5 | 0001-patch-slider-enhancements-to-do-number-formatting.patch | 3.31 KB | devonwarren |
| #3 | facetapi_slider_enhancements_1682792_3.patch | 13.61 KB | mollux |
| #1 | facetapi_slider_enhancements_1682792_1.patch | 12.56 KB | mollux |
Comments
Comment #1
mollux commentedComment #2
nick_vhnewline error
not sure about convention, but shouldn't there be a space between the multiplication sign?
same with the plus?
same as ceil
does this fail if the step value is not present?
Comment #3
mollux commentedI added the spaces and removed the dpm's in patch.
$step defaults to 1 in the settings form, but you could intert nothing or 0 (devidebyzero error)
Best solution is to check on form submission that you add a value > 0?
Comment #4
nick_vhstill the newline thing
same here, I'd be afraid of braking this if this does not become more reliable. What happens if the value is empty?
Comment #5
devonwarren commentedI like the prefix addition however i was encountering some issues having the new values loaded in the slider by default and I wanted to have commas in the number displays as well. I have attached my modifications to your patch for those interested. Still needs some testing with different configurations. (this is my first patch so let me know if I did something wrong)
Comment #6
luo8 commentedHello,
after patch implemantation Slider didn't show me...check attached picture.
Comment #7
devonwarren commented@luo8: What browser version? If it fails to load the javascript must be failing early on. Do you have anything coming up in the browser console log?
Comment #8
luo8 commenteddevonwarren
I was tried to use Firefox,Internet Explorer and Chrome as well.I don't think that could be because of browser.
I was flash all caches as well.Its strange...
Comment #9
nick_vhRerolled and fixed some problems
Comment #10
nick_vhCommitted, thanks
Comment #12
luo8 commentedNick_vh,
I'm sorry module with patch not working for me...after price range selection nothing happen.