ZF-11256: ZendX_JQuery_View_Helper_Slider does not work with array-ized compound elements like date[year]


When creating array-style compound form elements with names/ids like date[year], date[month], date[day] there is an issue with converting the element ID and appending "-slider". The generated


div> holds the ID "date-year]-slider" when providing ID "date[year]". Because of this append failing jQuery can't find the Element and is therefore not creating the rest of the markup. While investigating I noticed _normalizedId's relatively weird operations on the ID parameter (HtmlElement.php). Maybe this method needs to be revised too (replace that trim() with replace()?), but for now I could fix it by just "normalizing" the IDs where necessary in the Slider.php view helper code before any append.

Line 71: $sliderUpdateFn .= $this->getChangeCallback($jqh, /FIXED/$this->_normalizeId($sliderHiddenId), /*FIXED*/$this->_normalizeId($attribs['id']), $i);

Line 82: $attribs['id'] = /FIXED/$this->_normalizeId($attribs['id'])."-slider";

However I can't confirm that this won't have any negative impact in another szenario.


No comments to display