-Ext.onReady(function(){
-
- // NOTE: This is an example showing simple state management. During development,
- // it is generally best to disable state management as dynamically-generated ids
- // can change across page loads, leading to unpredictable results. The developer
- // should ensure that stable state ids are set for stateful components in real apps.
- Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
-
- // create some portlet tools using built in Ext tool ids
- var tools = [{
- id:'gear',
- handler: function(){
- Ext.Msg.alert('Message', 'The Settings tool was clicked.');
- }
- },{
- id:'close',
- handler: function(e, target, panel){
- panel.ownerCt.remove(panel, true);
- }
- }];
-
- var viewport = new Ext.Viewport({
- layout:'border',
- items:[{
- region:'west',
- id:'west-panel',
- title:'West',
- split:true,
- width: 200,
- minSize: 175,
- maxSize: 400,
- collapsible: true,
- margins:'35 0 5 5',
- cmargins:'35 5 5 5',
- layout:'accordion',
- layoutConfig:{
- animate:true
+// TODO: Fill in the content panel -- no AccordionLayout at the moment
+// TODO: Fix container drag/scroll support (waiting on Ext.lib.Anim)
+// TODO: Fix Ext.Tool scope being set to the panel header
+// TODO: Drag/drop does not cause a refresh of scroll overflow when needed
+// TODO: Grid portlet throws errors on destroy (grid bug)
+// TODO: Z-index issues during drag
+
+Ext.define('Ext.app.Portal', {
+
+ extend: 'Ext.container.Viewport',
+
+ uses: ['Ext.app.PortalPanel', 'Ext.app.PortalColumn', 'Ext.app.GridPortlet', 'Ext.app.ChartPortlet'],
+
+ getTools: function(){
+ return [{
+ xtype: 'tool',
+ type: 'gear',
+ handler: function(e, target, panelHeader, tool){
+ var portlet = panelHeader.ownerCt;
+ portlet.setLoading('Working...');
+ Ext.defer(function() {
+ portlet.setLoading(false);
+ }, 2000);
+ }
+ }];
+ },
+
+ initComponent: function(){
+ var content = '<div class="portlet-content">'+Ext.example.shortBogusMarkup+'</div>';
+
+ Ext.apply(this, {
+ id: 'app-viewport',
+ layout: {
+ type: 'border',
+ padding: '0 5 5 5' // pad the layout from the window edges