range slider to filter a list

Dear,

I found a great slider
http://refreshless.com/nouislider/

Witch from what I have seen/tested so far, seems a little bit more flexible then the one proposed in Fabrik download section. (only for forms ?)

For example a very important option is decimals 0.01 witch I am not sure but seems not possible with the Fabrik slider plugin , please correct me if I am wrong.( read from the forums)

I have managed to integrate the nouislider by changing the element.php file
and adding some var to get the $_post so that the slider retains the values after posting, script in the fabrik template, and loading the js lib with the joomla template.

the way I used it will make Fabrik updates problematique in the future.

now the questions comes :)

1) it is possible to add decimals to the current Fabrik plugin and to add it in the list filtering also?
if not
2) do you have some guide line documentation for the creation of a Fabrik plugin in list.
3) what would it take for you or one of your colleagues to make it for me and the community ?

Best Regards
Manuel
 
Last edited:
The only guidelines for writing plugins are looking at the code of other plugins. :)

I haven't looked at the slider code in a couple of years, as I recall it uses the built in Mootools Slider class, so it's something we'll have to rebuild at some point, and not something I'm wild about putting any more effort into.

Assuming you are talking about using this as a range filter, that's not a trivial thing to do. Probably not as hard as the radius filter was to build, but not entirely trivial. If you are seriously interested, I could take a look at what I think it would take to build a replacement slider element, and add the slider as a range filter, for which we'd charge an hourly rate.

-- hugh
 
Dear Hugh
Ok , I got your point, I am a bit limited $$ wise, but interested if it remains in my possibilities , let me know how much it would be ?
Thanks

Best Regards
Manuel
 
Sorry, I'm a bit swamped atm. I'm still figuring out how a slider could be used in a filter. How would you see the options and UI working? Especially the administration side. It's not a simple 'select it as a filter type', as it has to be configured with end points and steps, which vary with the element type being filtered.


Sent from my HTC One using Tapatalk
 
hum that is a good question , will need extra coffee :)

I would like these options:
1) search by range on element " fields" (Price from 1 to 1000000 and size 0.01 to 100.00).
2) that the min and max are taken from the element row data "min value and max values".
3) the choice of steps with or without decimals is important 0.01
4) values after the filter submission is keept.
5) position of the slider in the filter page. ( before what element)
6) that there is a box on the both sides of the slid that display the current selected value.

eventually but really not necessary ,
1)the option to the limit the range selection so that the return from the query does not become to huge.
2) that I could at a unit label

I will post right now on the test site an working example of what I have done so fare, its not a plug in but it does the job i need .
Has mentioned in a previous post I had to change the range part of element.php, the templates Joomla to load the js lib and the template bootstrap list to retain the posted var and slider loading.

I would like the same thing but in a plugin to insure future updates of Fabrik without having to tweak files every time I do .


My 1st thoughts for something more general community orientated :

Admin

selection of the possible elements

selection of type of sliders
a) 1 handle ( single value )
b) 2 handles ( ranged values )

Selection of min and max .
a) Auto "taken from the element column it self ( its biggest value and smallest value)"
b) manually set

Selection of type of values
a) numerical with decimals or not and how many decimal
b) Alphanumeric ( like the checkbox filter add values and labels)


selection of scall /pips or display box on both sides of the slider with ( min / max) values

the position of the slider in the filter list

I will add more ideas if i get them :)

Best Regards
Manuel
 
Last edited:
Nope.

BTW, is there anything specific with the noUiSlider you need which the jQuery widget? I'm not religious about it, but I do try and avoid 3rd party dependencies where possible, as each one we add increases the maintenance for Fabrik.

It looks good, I just haven't used it or the jQuery one enough to have an opinion.

-- hugh
 
You are using noUiSlider, as opposed to the jQuery slider:

http://api.jqueryui.com/slider/

Wherever possible, we prefer to use widgets which are part of one of the main frameworks, rather than needing to maintain another code library as part of Fabrik.

We will use 3rd party widgets where they provide necessary functionality not provided by the "built in" ones, so I just need to understand what noUiSlider provides that the jQuery one doesn't.

-- hugh
 
Ho , I used it cause it was easy, lots of examples and the looks was nice, but if I can get somthing similar to what u saw on my page with jquery I would be very happy 2 , and like you said one js lib less to load :)



Best Regards
Manuel
 
Last edited:
See the URL I gave you for the API. Broadly similar to noUiSlider.

I'm not going to have time to look at this for at least another week, I'm slammed busy atm.

-- hugh
 
Dear Hugh

Any time this week ? I just need a figure and a devtime , to see if its ok to have you make a plug in or just keep it the way it is , and update the core files every time Fabrik is updated .

Thanks
Best Regards
Manuel
 
Any chance you can publish your changes as a branch on a fork in github?

That would save me a lot of dev time, as it's work you've already done.

-- hugh
 
Dear Hugh

I have followed your instruction

I forked Fabrik and added the modif I made , I also updated the code to use jquery -ui instead of nouislider as per your request

hope I did it right as it s the 1st time I use github

let me know how I did :)

Thanks
Best Regards
Manuel
 
FYI

had some problems with mootools and jquery

must add jQuery.ui.slider.prototype.widgetEventPrefix = 'slider';

in both library its called slider :)

in the files elements.php where I made the changes, I added some comments

hope that it will make your life easier , took me some time to fine out and drove me crazy :) I had my quota of coffee for the coming month :)

best Regards
Manuel
 
You'll have to point me at your repo on github.

Yeah, the Mootools vs jQuery thing can be a major pain. It's a shame we followed J!'s roadmap in the first place, and wrote all our code in what was then the official J! JS framework. Then they did an about face, dropped Moo and moved to jQuery. So now we have about 50,000+ lines of Mootools we're going to have to rewrite as jQuery at some point. We've started, and have a jQuery branch in github, but it's going to be a long, slow, painful process.

I'll take a look once I have that github repo URL, and can free up some time.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top