ZF-5841: Slider View Helper forces slider back to zero.
Description
See also ZF-5810: View helper is creating incorrect parameters.
In the Callback function assigned to the slider's change event:
function zfjSliderUpdateagerange(e, ui) { $("#hidden_field").attr("value", $("#slider").slider("value", 0)); }
This resets the sldiers value to zero -- rather than getting it to pass to the hidden field as is intended.
What's needed is this:
function zfjSliderUpdateagerange(e, ui) { $("#hidden_field").attr("value", $("#slider").slider("value")); }
Slider.php r11941 line 81 -- eliminate the %d (but there's obviously some (s)printf action going on somewhere which might mean it will be missed...
Comments
Posted by Benjamin Eberlei (beberlei) on 2009-03-02T23:45:58.000+0000
Confirmed. The API of the slider changed from jQuery UI 1.5 to 1.6, which is madness. I have to find a workaround, which is working for both versions.
Posted by Benjamin Eberlei (beberlei) on 2009-03-02T23:46:26.000+0000
Using UI 1.5.3, should "fix" the issue for now :-)
Posted by Yanick Rochon (yanick) on 2009-03-19T14:13:37.000+0000
Actually, it does not help. The problem is described in this issue : http://framework.zend.com/issues/browse/ZF-6048
Posted by Benjamin Eberlei (beberlei) on 2009-06-11T01:26:25.000+0000
Bug is fixed in trunk and merged back into 1.8 release branch.
Use:
to decide which javascript generation mode should be enabled for the request. The Slider then generates the correct Javascript depending on your library version.