Issues

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

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.

Using UI 1.5.3, should "fix" the issue for now :-)

Actually, it does not help. The problem is described in this issue : http://framework.zend.com/issues/browse/ZF-6048

Bug is fixed in trunk and merged back into 1.8 release branch.

Use:


$view->jQuery()->setUiVersion("1.7.2");
$view->jQuery()->setUiVersion("1.5.3");

to decide which javascript generation mode should be enabled for the request. The Slider then generates the correct Javascript depending on your library version.