Zend Framework

jQuery UI TabContainer rendering incorrectly

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.7.3
  • Fix Version/s: 1.7.5
  • Component/s: ZendX_JQuery
  • Labels:
    None

Description

There's a bug in the jQuery UI TabContainer helper that makes the tabs not render correctly.

Screenshot of tabs:

Full Size

The problem is the addition of child element in the javascript function, as shown in the below diff that fixed the problem.

ZendX/JQuery/View/Helper/TabContainer.php
// Diff output
122c122
<         $js = sprintf('%s("#%s > ul").tabs(%s);',
---
>         $js = sprintf('%s("#%s").tabs(%s);',

Screenshot after diff:

Full Size

Issue Links

Activity

Hide
Benjamin Eberlei added a comment -

Changed assignment to me.

Show
Benjamin Eberlei added a comment - Changed assignment to me.
Hide
Benjamin Eberlei added a comment -

Hello Brian,

can you tell me the jQuery UI Version that you are using?

Show
Benjamin Eberlei added a comment - Hello Brian, can you tell me the jQuery UI Version that you are using?
Hide
Benjamin Eberlei added a comment -

Schedulded for the next release (Either 1.8 or 1.7.5)

Show
Benjamin Eberlei added a comment - Schedulded for the next release (Either 1.8 or 1.7.5)
Hide
Laura Dean added a comment -

Hi, I am trying to get this component working for subforms and mine does not display with tabs.

It does work with the following diff (and without the diff noted previously):

93c93
< $list = '<ul class="ui-tabs-nav">'.PHP_EOL;

> $list = '<div id="ui-tabs-nav"><ul>'.PHP_EOL;

133c133
< . '</div>'.PHP_EOL;

> . '</div></div>'.PHP_EOL;

I am using the following JQuery includes:
<script type="text/javascript" src="http://jqueryui.com/jquery-1.3.1.js"></script>
<script type="text/javascript" src="http://jqueryui.com/ui/ui.core.js"></script>
<script type="text/javascript" src="http://jqueryui.com/ui/ui.tabs.js"></script>

The screenshots look like they were taken from the example at http://www.zendframework.com/manual/en/zendx.jquery.form.html

I was trying to get that example working before implementing with my own forms and am wondering if the rest of the example is available somewhere (headers, javascript, css stylesheet).

Show
Laura Dean added a comment - Hi, I am trying to get this component working for subforms and mine does not display with tabs. It does work with the following diff (and without the diff noted previously): 93c93 < $list = '<ul class="ui-tabs-nav">'.PHP_EOL; — > $list = '<div id="ui-tabs-nav"><ul>'.PHP_EOL; 133c133 < . '</div>'.PHP_EOL; — > . '</div></div>'.PHP_EOL; I am using the following JQuery includes: <script type="text/javascript" src="http://jqueryui.com/jquery-1.3.1.js"></script> <script type="text/javascript" src="http://jqueryui.com/ui/ui.core.js"></script> <script type="text/javascript" src="http://jqueryui.com/ui/ui.tabs.js"></script> The screenshots look like they were taken from the example at http://www.zendframework.com/manual/en/zendx.jquery.form.html I was trying to get that example working before implementing with my own forms and am wondering if the rest of the example is available somewhere (headers, javascript, css stylesheet).
Hide
Benjamin Eberlei added a comment -

@Laura: which UI version and which stylesheet are you using?

Show
Benjamin Eberlei added a comment - @Laura: which UI version and which stylesheet are you using?
Hide
Laura Dean added a comment -

Here are the contents of my jquerytest.phtml (jquerytestAction in the controller is taken directly from http://www.zendframework.com/manual/en/zendx.jquery.form.html):

----------------------------------------------------------------------------------------------------------
<title>jQuery UI Tabs - Default functionality</title>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.js"></script>
<script type="text/javascript" src="http://jqueryui.com/jquery-1.3.1.js"></script>
<script type="text/javascript" src="http://jqueryui.com/ui/ui.core.js"></script>
<script type="text/javascript" src="http://jqueryui.com/ui/ui.tabs.js"></script>

<link type="text/css" href="http://jqueryui.com/themes/base/ui.all.css" rel="stylesheet" />
<link type="text/css" href="http://jqueryui.com/demos/demos.css" rel="stylesheet" />

<script type="text/javascript">
$(function() {
$("#ui-tabs-nav").tabs();
});
</script>

<?=$this->form ?>
----------------------------------------------------------------------------------------------------------

I did also try adding this line with same functional results (different styling):
<link type="text/css" href="http://jqueryui.com/repository/tags/latest/themes/flora/flora.all.css" rel="stylesheet" />

ZendX is from the Zend 1.7.4 release.

(Sorry for the slow replay, was expecting the issue tracker to email me... will have to look for that setting...)

Show
Laura Dean added a comment - Here are the contents of my jquerytest.phtml (jquerytestAction in the controller is taken directly from http://www.zendframework.com/manual/en/zendx.jquery.form.html): ---------------------------------------------------------------------------------------------------------- <title>jQuery UI Tabs - Default functionality</title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.js"></script> <script type="text/javascript" src="http://jqueryui.com/jquery-1.3.1.js"></script> <script type="text/javascript" src="http://jqueryui.com/ui/ui.core.js"></script> <script type="text/javascript" src="http://jqueryui.com/ui/ui.tabs.js"></script> <link type="text/css" href="http://jqueryui.com/themes/base/ui.all.css" rel="stylesheet" /> <link type="text/css" href="http://jqueryui.com/demos/demos.css" rel="stylesheet" /> <script type="text/javascript"> $(function() { $("#ui-tabs-nav").tabs(); }); </script> <?=$this->form ?> ---------------------------------------------------------------------------------------------------------- I did also try adding this line with same functional results (different styling): <link type="text/css" href="http://jqueryui.com/repository/tags/latest/themes/flora/flora.all.css" rel="stylesheet" /> ZendX is from the Zend 1.7.4 release. (Sorry for the slow replay, was expecting the issue tracker to email me... will have to look for that setting...)
Hide
Laura Dean added a comment -

Okay, I get it... should have been $("#tabContainer").tabs() in the javascript...

I still think it would be useful to add this to the example, along with the javascript and stylesheet includes.

Show
Laura Dean added a comment - Okay, I get it... should have been $("#tabContainer").tabs() in the javascript... I still think it would be useful to add this to the example, along with the javascript and stylesheet includes.

People

Vote (0)
Watch (3)

Dates

  • Created:
    Updated:
    Resolved: