3 * Copyright(c) 2006-2010 Ext JS, LLC
5 * http://www.extjs.com/license
7 Ext.onReady(function(){
\r
9 // NOTE: This is an example showing simple state management. During development,
\r
10 // it is generally best to disable state management as dynamically-generated ids
\r
11 // can change across page loads, leading to unpredictable results. The developer
\r
12 // should ensure that stable state ids are set for stateful components in real apps.
\r
13 Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
\r
15 // create some portlet tools using built in Ext tool ids
\r
18 handler: function(){
\r
19 Ext.Msg.alert('Message', 'The Settings tool was clicked.');
\r
23 handler: function(e, target, panel){
\r
24 panel.ownerCt.remove(panel, true);
\r
28 var viewport = new Ext.Viewport({
\r
40 cmargins:'35 5 5 5',
\r
46 html: Ext.example.shortBogusMarkup,
\r
53 html: Ext.example.shortBogusMarkup,
\r
64 style:'padding:10px 0 10px 10px',
\r
66 title: 'Grid in a Portlet',
\r
69 items: new SampleGrid([0, 2, 3])
\r
71 title: 'Another Panel 1',
\r
73 html: Ext.example.shortBogusMarkup
\r
77 style:'padding:10px 0 10px 10px',
\r
81 html: Ext.example.shortBogusMarkup
\r
83 title: 'Another Panel 2',
\r
85 html: Ext.example.shortBogusMarkup
\r
89 style:'padding:10px',
\r
93 html: Ext.example.shortBogusMarkup
\r
95 title: 'Another Panel 3',
\r
97 html: Ext.example.shortBogusMarkup
\r
102 * Uncomment this block to test handling of the drop event. You could use this
\r
103 * to save portlet position state for example. The event arg e is the custom
\r
104 * event defined in Ext.ux.Portal.DropZone.
\r
107 // 'drop': function(e){
\r
108 // Ext.Msg.alert('Portlet Dropped', e.panel.title + '<br />Column: ' +
\r
109 // e.columnIndex + '<br />Position: ' + e.position);
\r