]>
git.proxmox.com Git - extjs.git/blob - extjs/build/examples/classic/core/spotlight-example.js
6 'Ext.layout.container.Table',
10 //Create a DemoPanel which is the base for each panel in the example
11 Ext
.define('DemoPanel', {
12 extend
: 'Ext.panel.Panel',
18 html
: 'Some panel content goes here!',
22 * Custom method which toggles a Ext.Button for the current panel on/off depending on the only argument
24 toggle: function(on
) {
25 var btns
= this.dockedItems
.last(),
26 btn
= btns
.items
.first();
34 Ext
.onReady(function() {
35 //Create the spotlight component
36 var spot
= Ext
.create('Ext.ux.Spotlight', {
44 * Method which changes the spotlight to be active on a spefied panel
46 var updateSpot = function(id
) {
47 if (typeof id
== 'string') {
49 } else if (!id
&& spot
.active
) {
53 p1
.toggle(id
== p1
.id
);
54 p2
.toggle(id
== p2
.id
);
55 p3
.toggle(id
== p3
.id
);
58 Ext
.widget('container', {
59 renderTo
: Ext
.getBody(),
69 p1
= Ext
.create('DemoPanel', {
78 }), p2
= Ext
.create('DemoPanel', {
87 }), p3
= Ext
.create('DemoPanel', {
99 //The start button, which starts everything
100 Ext
.create('Ext.button.Button', {
102 renderTo
: 'start-ct',
103 handler: function() {
104 updateSpot('panel1');