2 * Ext JS Library 2.2.1
\r
3 * Copyright(c) 2006-2009, Ext JS, LLC.
\r
4 * licensing@extjs.com
\r
6 * http://extjs.com/license
\r
9 Ext.onReady(function(){
\r
11 var spot = new Ext.Spotlight({
\r
16 var DemoPanel = Ext.extend(Ext.Panel, {
\r
17 title: 'Demo Panel',
\r
21 html: 'Some panel content goes here!',
\r
22 bodyStyle: 'padding:10px 15px;',
\r
24 toggle: function(on){
\r
25 this.buttons[0].setDisabled(!on);
\r
30 var updateSpot = function(id){
\r
31 if(typeof id == 'string'){
\r
33 }else if (!id && spot.active){
\r
36 p1.toggle(id==p1.id);
\r
37 p2.toggle(id==p2.id);
\r
38 p3.toggle(id==p3.id);
\r
42 renderTo: Ext.getBody(),
\r
49 items: [p1 = new DemoPanel({
\r
53 handler: updateSpot.createDelegate(this, ['panel2'])
\r
56 p2 = new DemoPanel({
\r
60 handler: updateSpot.createDelegate(this, ['panel3'])
\r
63 p3 = new DemoPanel({
\r
67 handler: updateSpot.createDelegate(this, [false])
\r
74 renderTo: 'start-ct',
\r
75 handler: updateSpot.createDelegate(this, ['panel1'])
\r