+++ /dev/null
-<html>\r
-<head>\r
- <title>The source code</title>\r
- <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />\r
- <script type="text/javascript" src="../resources/prettify/prettify.js"></script>\r
-</head>\r
-<body onload="prettyPrint();">\r
- <pre class="prettyprint lang-js">Ext.onReady(function(){\r
- // basic tabs 1, built from existing content\r
- var tabs = new Ext.TabPanel({\r
- renderTo: 'tabs1',\r
- width:450,\r
- activeTab: 0,\r
- frame:true,\r
- defaults:{autoHeight: true},\r
- items:[\r
- {contentEl:'script', title: 'Short Text'},\r
- {contentEl:'markup', title: 'Long Text'}\r
- ]\r
- });\r
-\r
- // second tabs built from JS\r
- var tabs2 = new Ext.TabPanel({\r
- renderTo: document.body,\r
- activeTab: 0,\r
- width:600,\r
- height:250,\r
- plain:true,\r
- defaults:{autoScroll: true},\r
- items:[{\r
- title: 'Normal Tab',\r
- html: "My content was added during construction."\r
- },{\r
- title: 'Ajax Tab 1',\r
- autoLoad:'ajax1.htm'\r
- },{\r
- title: 'Ajax Tab 2',\r
- autoLoad: {url: 'ajax2.htm', params: 'foo=bar&wtf=1'}\r
- },{\r
- title: 'Event Tab',\r
- listeners: {activate: handleActivate},\r
- html: "I am tab 4's content. I also have an event listener attached."\r
- },{\r
- title: 'Disabled Tab',\r
- disabled:true,\r
- html: "Can't see me cause I'm disabled"\r
- }\r
- ]\r
- });\r
-\r
- function handleActivate(tab){\r
- alert(tab.title + ' was activated.');\r
- }\r
-});</pre> \r
-</body>\r
-</html>
\ No newline at end of file