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.9 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 | |
---|
11 | var spot = new Ext.Spotlight({ |
---|
12 | easing: 'easeOut', |
---|
13 | duration: .3 |
---|
14 | }); |
---|
15 | |
---|
16 | var DemoPanel = Ext.extend(Ext.Panel, { |
---|
17 | title: 'Demo Panel', |
---|
18 | frame: true, |
---|
19 | width: 200, |
---|
20 | height: 150, |
---|
21 | html: 'Some panel content goes here!', |
---|
22 | bodyStyle: 'padding:10px 15px;', |
---|
23 | |
---|
24 | toggle: function(on){ |
---|
25 | this.buttons[0].setDisabled(!on); |
---|
26 | } |
---|
27 | }); |
---|
28 | |
---|
29 | var p1, p2, p3; |
---|
30 | var updateSpot = function(id){ |
---|
31 | if(typeof id == 'string'){ |
---|
32 | spot.show(id); |
---|
33 | }else if (!id && spot.active){ |
---|
34 | spot.hide(); |
---|
35 | } |
---|
36 | p1.toggle(id==p1.id); |
---|
37 | p2.toggle(id==p2.id); |
---|
38 | p3.toggle(id==p3.id); |
---|
39 | }; |
---|
40 | |
---|
41 | new Ext.Panel({ |
---|
42 | renderTo: Ext.getBody(), |
---|
43 | layout: 'table', |
---|
44 | id: 'demo-ct', |
---|
45 | border: false, |
---|
46 | layoutConfig: { |
---|
47 | columns: 3 |
---|
48 | }, |
---|
49 | items: [p1 = new DemoPanel({ |
---|
50 | id: 'panel1', |
---|
51 | buttons: [{ |
---|
52 | text: 'Next Panel', |
---|
53 | handler: updateSpot.createDelegate(this, ['panel2']) |
---|
54 | }] |
---|
55 | }), |
---|
56 | p2 = new DemoPanel({ |
---|
57 | id: 'panel2', |
---|
58 | buttons: [{ |
---|
59 | text: 'Next Panel', |
---|
60 | handler: updateSpot.createDelegate(this, ['panel3']) |
---|
61 | }] |
---|
62 | }), |
---|
63 | p3 = new DemoPanel({ |
---|
64 | id: 'panel3', |
---|
65 | buttons: [{ |
---|
66 | text: 'Done', |
---|
67 | handler: updateSpot.createDelegate(this, [false]) |
---|
68 | }] |
---|
69 | })] |
---|
70 | }); |
---|
71 | |
---|
72 | new Ext.Button({ |
---|
73 | text: 'Start', |
---|
74 | renderTo: 'start-ct', |
---|
75 | handler: updateSpot.createDelegate(this, ['panel1']) |
---|
76 | }); |
---|
77 | |
---|
78 | updateSpot(false); |
---|
79 | }); |
---|
Note: See
TracBrowser
for help on using the repository browser.