Last change
on this file since 619 was
619,
checked in by ramonb, 15 years ago
|
lib/:
- added new AJAX dependancies: ExtJS, pChart, Lightbox2
|
File size:
1.5 KB
|
Line | |
---|
1 | /* |
---|
2 | * Ext JS Library 2.2.1 |
---|
3 | * Copyright(c) 2006-2009, Ext JS, LLC. |
---|
4 | * licensing@extjs.com |
---|
5 | * |
---|
6 | * http://extjs.com/license |
---|
7 | */ |
---|
8 | |
---|
9 | Ext.onReady(function(){ |
---|
10 | // basic tabs 1, built from existing content |
---|
11 | var tabs = new Ext.TabPanel({ |
---|
12 | renderTo: 'tabs1', |
---|
13 | width:450, |
---|
14 | activeTab: 0, |
---|
15 | frame:true, |
---|
16 | defaults:{autoHeight: true}, |
---|
17 | items:[ |
---|
18 | {contentEl:'script', title: 'Short Text'}, |
---|
19 | {contentEl:'markup', title: 'Long Text'} |
---|
20 | ] |
---|
21 | }); |
---|
22 | |
---|
23 | // second tabs built from JS |
---|
24 | var tabs2 = new Ext.TabPanel({ |
---|
25 | renderTo: document.body, |
---|
26 | activeTab: 0, |
---|
27 | width:600, |
---|
28 | height:250, |
---|
29 | plain:true, |
---|
30 | defaults:{autoScroll: true}, |
---|
31 | items:[{ |
---|
32 | title: 'Normal Tab', |
---|
33 | html: "My content was added during construction." |
---|
34 | },{ |
---|
35 | title: 'Ajax Tab 1', |
---|
36 | autoLoad:'ajax1.htm' |
---|
37 | },{ |
---|
38 | title: 'Ajax Tab 2', |
---|
39 | autoLoad: {url: 'ajax2.htm', params: 'foo=bar&wtf=1'} |
---|
40 | },{ |
---|
41 | title: 'Event Tab', |
---|
42 | listeners: {activate: handleActivate}, |
---|
43 | html: "I am tab 4's content. I also have an event listener attached." |
---|
44 | },{ |
---|
45 | title: 'Disabled Tab', |
---|
46 | disabled:true, |
---|
47 | html: "Can't see me cause I'm disabled" |
---|
48 | } |
---|
49 | ] |
---|
50 | }); |
---|
51 | |
---|
52 | function handleActivate(tab){ |
---|
53 | alert(tab.title + ' was activated.'); |
---|
54 | } |
---|
55 | }); |
---|
Note: See
TracBrowser
for help on using the repository browser.