Zend Framework

ZendX_Application_Resource_Jquery: disabling ui component disables jquery

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Minor 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(); }

Issue Links

Activity

Hide
mbecker added a comment -

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

Show
mbecker added a comment - The code in the issue is not readable, so I add the class with changes I've made.
Hide
Ramon Henrique Ornelas added a comment -

This already was fixed by Dolf Schimmel (Freeaqingme) with r22500 in version 1.10.7 see ZF-9980.

Show
Ramon Henrique Ornelas added a comment - This already was fixed by Dolf Schimmel (Freeaqingme) with r22500 in version 1.10.7 see ZF-9980.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: