-2

I would like to add a toolbar to a tab, but I cannot find anything regarding that in the documentation. I understand a tab is basically a panel. Is it possible to access that and add the toolbar?

My goal is to have a toolbar in each tab with for example a submit button that submits a form in the tab.

I am using the following code to add the tabs:

 function addTab(title, url){
    if ($('#main-tabs').tabs('exists', title)){
        $('#main-tabs').tabs('select', title);
    } else {
        var content = '<iframe scrolling="auto" frameborder="0"  src="'+url+'" style="width:100%;height:100%;"></iframe>';
        $('#main-tabs').tabs('add',{
            title:title,
            content:content,
            closable:true
        });
    }
    }

Thanks in advance!

Michael

skorge
  • 11
  • 3

1 Answers1

0

jeasyui has a toolbar function within the tabs. It's good enough for my purpose so I'll go with that for now.

$('#tt').tabs({
tools:[{
    iconCls:'icon-add',
    handler:function(){
        alert('add')
    }
},{
    iconCls:'icon-save',
    handler:function(){
        alert('save')
    }
}]

});

skorge
  • 11
  • 3