Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.10.0
-
Fix Version/s: 1.10.7
-
Component/s: ZendX_JQuery
-
Labels:None
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();
}
—
Attachments
Issue Links
| This issue duplicates: | ||||
| ZF-9980 | uienable and/or ui_enable in ZendX_Application_Resource_JQuery buggy |
|
|
|
The code in the issue is not readable, so I add the class with changes I've made.