ZF-9024: ZendX_Application_Resource_Jquery: disabling ui component disables jquery

Issue Type: Bug Created: 2010-01-30T10:58:14.000+0000 Last Updated: 2010-09-12T04:14:38.000+0000 Status: Resolved Fix version(s): - 1.10.7 (28/Jul/10)

Reporter: mbecker (mbecker) Assignee: Benjamin Eberlei (beberlei) Tags: - ZendX_JQuery

Related issues: - ZF-9980

Attachments: - Jquery.php


First of all, in the "_parseOptions" function the last if statement is out of the foreach statement, therefore the variable $key shouldn't be used. So the correct code should be:

if ((isset($options['uienable']) && (bool) $options['uienable']) || (isset($options['ui_enable']) && (bool) $options['ui_enable']) || (!isset($options['ui_enable']) && !isset($options['uienable']))) { $this->_view->JQuery()->uiEnable(); } else { $this->_view->JQuery()->uiDisable();


I use the following config:

resources.jquery.version = 1.4

resources.jquery.ui_enable = false

But this disables not only the ui component of jquery, also the jquery lib itself is not loaded. So my suggestion is to add a extra flag for config files called "resources.jquery.enable". So the if statement mentioned above could be used with little customizing:

if ((isset($options['enable']) && (bool) $options['enable'])) { $this->_view->JQuery()->enable();



Posted by mbecker (mbecker) on 2010-01-30T11:01:16.000+0000

The code in the issue is not readable, so I add the class with changes I've made.

Posted by Ramon Henrique Ornelas (ramon) on 2010-09-12T04:13:52.000+0000

This already was fixed by [~freak] with r22500 in version 1.10.7 see ZF-9980.

Have you found an issue?

See the Overview section for more details.


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

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