source: trunk/web/addons/job_monarch/lib/extjs/examples/tabs/tabs-adv.js @ 619

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: 1006 bytes
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
9Ext.onReady(function(){
10
11    var tabs = new Ext.TabPanel({
12        renderTo:'tabs',
13        resizeTabs:true, // turn on tab resizing
14        minTabWidth: 115,
15        tabWidth:135,
16        enableTabScroll:true,
17        width:600,
18        height:250,
19        defaults: {autoScroll:true},
20        plugins: new Ext.ux.TabCloseMenu()
21    });
22
23    // tab generation code
24    var index = 0;
25    while(index < 7){
26        addTab();
27    }
28    function addTab(){
29        tabs.add({
30            title: 'New Tab ' + (++index),
31            iconCls: 'tabs',
32            html: 'Tab Body ' + (index) + '<br/><br/>'
33                    + Ext.example.bogusMarkup,
34            closable:true
35        }).show();
36    }
37
38    new Ext.Button({
39        text: 'Add Tab',
40        handler: addTab,
41        iconCls:'new-tab'
42    }).render(document.body, 'tabs');
43});
Note: See TracBrowser for help on using the repository browser.