Bug Tracker

Changes between Initial Version and Version 1 of Ticket #1789


Ignore:
Timestamp:
Oct 10, 2007, 5:25:38 AM (15 years ago)
Author:
klaus
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1789 – Description

    initial v1  
    1 There is no possibility to initialize an empty tabset (e.g. to add all tabs dynamically. Small fix in tabify() method (line 183) make things better:
     1There is no possibility to initialize an empty tabset (e.g. to add all tabs dynamically.
     2
     3Small fix in tabify() method (line 183) make things better:
    24
    35{{{
     
    57}}}
    68
     9Lines 362-373 of ui.tabs.js (add method):
     10
     11{{{
     12 if (url.indexOf('#') == 0) { // ajax container is created by tabify automatically
     13  var $container = $(url);
     14  // try to find an existing element before creating a new one
     15  $container = ($container.length && $container || $('<div id="' + url.replace('#', '') + '" class="' + o.containerClass + ' ' + o.hideClass + '"></div>'))
     16    [method](position > 0 ? this.$containers[position - 1] : $(this.source));
     17}
     18var $foo = $('<li><a href="' + url + '"><span>' + text + '</span></a></li>');
     19if(position > 0) $foo[method](this.$tabs.slice(position - 1, position).parents('li:eq(0)'));
     20else {
     21  $foo.appendTo($(this.source));
     22  $container.removeClass('ui-tabs-hide');
     23}
     24}}}
     25
    726Basically we've to check if this.$tabs array is not empty...