Upgrade to ExtJS 4.0.0 - Released 04/26/2011
[extjs.git] / examples / app / nested-loading / app / view / book / SideBar.js
diff --git a/examples/app/nested-loading/app/view/book/SideBar.js b/examples/app/nested-loading/app/view/book/SideBar.js
new file mode 100644 (file)
index 0000000..02f64c5
--- /dev/null
@@ -0,0 +1,34 @@
+/**
+ * The sidebar view for the application. Used to display a list of books.
+ * @extends Ext.view.View
+ */
+Ext.define('Books.view.book.SideBar', {
+    alias: 'widget.booksidebar',
+    extend: 'Ext.view.View',
+    
+    initComponent: function() {
+        Ext.apply(this, {
+            id: 'sidebar',
+            
+            dock: 'left',
+            width: 180,
+            border: false,
+            cls: 'sidebar-list',
+            
+            selModel: {
+                deselectOnContainerClick: false
+            },
+            
+            store: '',
+            itemSelector: '.product',
+            tpl: new Ext.XTemplate(
+                '<div class="sidebar-title">Books</div>',
+                '<tpl for=".">',
+                    '<div class="product">{name}</div>',
+                '</tpl>'
+            )
+        });
+                
+        this.callParent(arguments);
+    }
+});
\ No newline at end of file