Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#4376 closed bug (notabug)

ui.tags add method not consistent with _tabify

Reported by: biaggi Owned by:
Priority: minor Milestone: 1.8
Component: ui.tabs Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:


Despite you can use any html code in the tabs with the tabTemplate option, the _tabify method is looking for ul to insert new tabs when add method is called.

You can reproduce this error using the tabTemplate example:

A workaround is to extend the class and overwrite that method updating that two lines with the html element you choose.

A good solution i guess would be to parse the tabTemplate option to get from there the element you need to look for.

Best regards

Change History (3)

comment:1 Changed 14 years ago by klaus.hartl

Resolution: invalid
Status: newclosed

The tab template option is for a single tab element, while the ul is a requirement and cannot be set in that template.

comment:2 Changed 14 years ago by biaggi

What i mean is tabTemplate option in ui.tabs.js and lines 74 and 75 in that file:

		this.list = this.element.children('ul:first');
		this.lis = $('li:has(a[href])', this.list);

are incompatible, there is a clear inconsistence in the tabs because if you can change the single tab but cant change the container the html generated is not a valid page.

If we follow the example described in this page:

We will get an invalid html code (<ul><div></div></ul>) is not a html valid code.

Related with #3758. Maybe in that ticket is better explained.

comment:3 Changed 14 years ago by rdworth

Note: See TracTickets for help on using tickets.