|
|
/*This file is part of Ext JS 3.4
Copyright (c) 2011-2013 Sencha Inc
Contact: http://www.sencha.com/contact
GNU General Public License UsageThis file may be used under the terms of the GNU General Public License version 3.0 aspublished by the Free Software Foundation and appearing in the file LICENSE included in thepackaging of this file.
Please review the following information to ensure the GNU General Public License version 3.0requirements will be met: http://www.gnu.org/copyleft/gpl.html.
If you are unsure which license is appropriate for your use, please contact the sales departmentat http://www.sencha.com/contact.
Build date: 2013-04-03 15:07:25*/Ext.onReady(function(){ // basic tabs 1, built from existing content
var tabs = new Ext.TabPanel({ renderTo: 'tabs1', width:450, activeTab: 0, frame:true, defaults:{autoHeight: true}, items:[ {contentEl:'script', title: 'Short Text'}, {contentEl:'markup', title: 'Long Text'} ] });
// second tabs built from JS
var tabs2 = new Ext.TabPanel({ renderTo: document.body, activeTab: 0, width:600, height:250, plain:true, defaults:{autoScroll: true}, items:[{ title: 'Normal Tab', html: "My content was added during construction." },{ title: 'Ajax Tab 1', autoLoad:'ajax1.htm' },{ title: 'Ajax Tab 2', autoLoad: {url: 'ajax2.htm', params: 'foo=bar&wtf=1'} },{ title: 'Event Tab', listeners: {activate: handleActivate}, html: "I am tab 4's content. I also have an event listener attached." },{ title: 'Disabled Tab', disabled:true, html: "Can't see me cause I'm disabled" } ] });
function handleActivate(tab){ alert(tab.title + ' was activated.'); }});
|