Hey everybody. Thought you would all be interested in a little fix I came across when I was unable to use the CJuiSlider helper class to properly build a slider with a fixed min/max to show a fill bar for input.
in framework/zii/widgets/jui change lines 111-115 to the following:
The class, as far I can tell, does not provide a way to set the range min or max which makes the control “fill” to start from the beginning or end. This means the only option was to have a slider with only a handle and not a progressively filled bar. The documentation of the control allows for “range” to not only be set to true/false but also a string of ‘min’ or ‘max’ so that the bar can be provided with a fill bar anchored to the max or min. I could not find a way to accomplish this without modifying the provided helper class which I did and am sharing the modification with all of you.
Anyways, I did end up finding a problem with my previous submission. Here is an update to fix it:
I found 1 problem with my quickfix that prevented the single attribute behavior of setting the range to ‘min’ or ‘max’ from happening. I added a boolean to flip when it ran through my previously submitted code. This is used on line 144 such that: