Issues

ZF-9024: ZendX_Application_Resource_Jquery: disabling ui component disables jquery

Description

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();

}

Comments

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

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