X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/d41dc04ad17d1d9125fb2cf72db2b4782dbe3a8c..f5240829880f87e0cf581c6a296e436fdef0ef80:/examples/tabs/tabs-example.js diff --git a/examples/tabs/tabs-example.js b/examples/tabs/tabs-example.js index f5b04a14..b1125b2e 100644 --- a/examples/tabs/tabs-example.js +++ b/examples/tabs/tabs-example.js @@ -1,55 +1,53 @@ -/* - * Ext JS Library 2.2.1 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -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.'); - } +/*! + * Ext JS Library 3.3.0 + * Copyright(c) 2006-2010 Ext JS, Inc. + * licensing@extjs.com + * http://www.extjs.com/license + */ +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.'); + } }); \ No newline at end of file