Issues

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

Issue Type: Bug Created: 2011-04-03T07:30:51.000+0000 Last Updated: 2011-04-03T07:30:51.000+0000 Status: Open Fix version(s): Reporter: Stev Frank (annih) Assignee: Benjamin Eberlei (beberlei) Tags: - ZendX_JQuery

  • View_Helper

Related issues: Attachments:

Description

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.

Comments

No comments to display

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts