src/main/webapp/jquery-easyui-1.3.3/src/jquery.tabs.js
/**
     * update tab panel, param has following properties:
     * tab: the tab panel to be updated
     * options: the tab panel options
     */
update tab panel, param has following properties:
tab: the tab panel to be updated
options: the tab panel options
update tab panel param has following properties : tab : the tab panel to be updated options : the tab panel options
function updateTab(container, param) {
        var selectHis = $.data(container, 'tabs').selectHis;
        var pp = param.tab;	
        var oldTitle = pp.panel('options').title;
        pp.panel($.extend({}, param.options, {
            iconCls: (param.options.icon ? param.options.icon : undefined)
        }));
        var opts = pp.panel('options');	
        var tab = opts.tab;
        var s_title = tab.find('span.tabs-title');
        var s_icon = tab.find('span.tabs-icon');
        s_title.html(opts.title);
        s_icon.attr('class', 'tabs-icon');
        tab.find('a.tabs-close').remove();
        if (opts.closable) {
            s_title.addClass('tabs-closable');
            var a_close = $('<a href="javascript:void(0)" class="tabs-close"></a>').appendTo(tab);
            a_close.bind('click.tabs', {p: pp}, function (e) {
                if ($(this).parent().hasClass('tabs-disabled')) {
                    return;
                }
                closeTab(container, getTabIndex(container, e.data.p));
                return false;
            });
        } else {
            s_title.removeClass('tabs-closable');
        }
        if (opts.iconCls) {
            s_title.addClass('tabs-with-icon');
            s_icon.addClass(opts.iconCls);
        } else {
            s_title.removeClass('tabs-with-icon');
        }
        if (oldTitle != opts.title) {
            for (var i = 0; i < selectHis.length; i++) {
                if (selectHis[i] == oldTitle) {
                    selectHis[i] = opts.title;
                }
            }
        }
        tab.find('span.tabs-p-tool').remove();
        if (opts.tools) {
            var p_tool = $('<span class="tabs-p-tool"></span>').insertAfter(tab.find('a.tabs-inner'));
            if (typeof opts.tools == 'string') {
                $(opts.tools).children().appendTo(p_tool);
            } else {
                for (var i = 0; i < opts.tools.length; i++) {
                    var t = $('<a href="javascript:void(0)"></a>').appendTo(p_tool);
                    t.addClass(opts.tools[i].iconCls);
                    if (opts.tools[i].handler) {
                        t.bind('click', {handler: opts.tools[i].handler}, function (e) {
                            if ($(this).parents('li').hasClass('tabs-disabled')) {
                                return;
                            }
                            e.data.handler.call(this);
                        });
                    }
                }
            }
            var pr = p_tool.children().length * 12;
            if (opts.closable) {
                pr += 8;
            } else {
                pr -= 3;
                p_tool.css('right', '5px');
            }
            s_title.css('padding-right', pr + 'px');
        }
        setScrollers(container);
        $.data(container, 'tabs').options.onUpdate.call(container, opts.title, getTabIndex(container, pp));
    }
function updateTab ( container , param ) { var selectHis = $ . data ( container , 'tabs' ) . selectHis ; var pp = param . tab ; var oldTitle = pp . panel ( 'options' ) . title ; pp . panel ( $ . extend ( { } , param . options , { iconCls : ( param . options . icon ? param . options . icon : undefined ) } ) ) ; var opts = pp . panel ( 'options' ) ; var tab = opts . tab ; var s_title = tab . find ( 'span.tabs-title' ) ; var s_icon = tab . find ( 'span.tabs-icon' ) ; s_title . html ( opts . title ) ; s_icon . attr ( 'class' , 'tabs-icon' ) ; tab . find ( 'a.tabs-close' ) . remove ( ) ; if ( opts . closable ) { s_title . addClass ( 'tabs-closable' ) ; var a_close = $ ( '<a href="javascript:void(0)" class="tabs-close"></a>' ) . appendTo ( tab ) ; a_close . bind ( 'click.tabs' , { p : pp } , function ( e ) { if ( $ ( this ) . parent ( ) . hasClass ( 'tabs-disabled' ) ) { return ; } closeTab ( container , getTabIndex ( container , e . data . p ) ) ; return false ; } ) ; } else { s_title . removeClass ( 'tabs-closable' ) ; } if ( opts . iconCls ) { s_title . addClass ( 'tabs-with-icon' ) ; s_icon . addClass ( opts . iconCls ) ; } else { s_title . removeClass ( 'tabs-with-icon' ) ; } if ( oldTitle != opts . title ) { for ( var i = 0 ; i < selectHis . length ; i ++ ) { if ( selectHis [ i ] == oldTitle ) { selectHis [ i ] = opts . title ; } } } tab . find ( 'span.tabs-p-tool' ) . remove ( ) ; if ( opts . tools ) { var p_tool = $ ( '<span class="tabs-p-tool"></span>' ) . insertAfter ( tab . find ( 'a.tabs-inner' ) ) ; if ( typeof opts . tools == 'string' ) { $ ( opts . tools ) . children ( ) . appendTo ( p_tool ) ; } else { for ( var i = 0 ; i < opts . tools . length ; i ++ ) { var t = $ ( '<a href="javascript:void(0)"></a>' ) . appendTo ( p_tool ) ; t . addClass ( opts . tools [ i ] . iconCls ) ; if ( opts . tools [ i ] . handler ) { t . bind ( 'click' , { handler : opts . tools [ i ] . handler } , function ( e ) { if ( $ ( this ) . parents ( 'li' ) . hasClass ( 'tabs-disabled' ) ) { return ; } e . data . handler . call ( this ) ; } ) ; } } } var pr = p_tool . children ( ) . length * 12 ; if ( opts . closable ) { pr += 8 ; } else { pr -= 3 ; p_tool . css ( 'right' , '5px' ) ; } s_title . css ( 'padding-right' , pr + 'px' ) ; } setScrollers ( container ) ; $ . data ( container , 'tabs' ) . options . onUpdate . call ( container , opts . title , getTabIndex ( container , pp ) ) ; }
update tab panel, param has following properties:
 tab: the tab panel to be updated
 options: the tab panel options
update tab panel param has following properties : tab : the tab panel to be updated options : the tab panel options
// the tab panel // get the tab panel options //						t.bind('click', eval(opts.tools[i].handler)); //		setProperties(container);