Upgrade to ExtJS 4.0.0 - Released 04/26/2011
[extjs.git] / examples / forum / classes / Main.js
diff --git a/examples/forum/classes/Main.js b/examples/forum/classes/Main.js
new file mode 100644 (file)
index 0000000..4d08ef7
--- /dev/null
@@ -0,0 +1,36 @@
+Ext.define('ForumBrowser.Main', {
+    extend: 'Ext.container.Viewport',
+    
+    initComponent: function(){
+        Ext.apply(this, {
+            layout: 'border',
+            itemId: 'main',
+            items: [{
+                xtype: 'forumlist',
+                region: 'west',
+                width: 300,
+                title: 'Forums',
+                split: true,
+                margins: '5 0 5 5'
+            }, {
+                region: 'center',
+                xtype: 'tabpanel',
+                margins: '5 5 5 0',
+                minWidth: 400,
+                border: false,
+                tabBar: {
+                    border: true
+                },
+                items: {
+                    itemId: 'topic',
+                    xtype: 'topiccontainer'
+                }
+            }]
+        });
+        this.callParent();
+    },
+    
+    loadForum: function(rec){
+        this.down('#topic').loadForum(rec);
+    }  
+});