fix #7318 - rename upload cropbox and panel tree
[roojs1] / examples / grid / viewpanel.js
index 2696f9f..b84f089 100644 (file)
@@ -30,7 +30,7 @@ Roo.onReady(function(){
     // the data store (created below)
     var cm = new Roo.grid.ColumnModel([{
            header: "Common Name",
-           dataIndex: 'common',
+           dataIndex: 'url',
            width: 220  /*,
            
            editor: new Ed(new fm.TextField({
@@ -43,17 +43,7 @@ Roo.onReady(function(){
 
     // this could be inline, but we want to define the Plant record
     // type so we can add records dynamically
-    var Plant = Roo.data.Record.create([
-           // the "name" below matches the tag name to read, except "availDate"
-           // which is mapped to the tag "availability"
-           {name: 'common', type: 'string'},
-           {name: 'botanical', type: 'string'},
-           {name: 'light'},
-           {name: 'price', type: 'float'},             // automatic date conversions
-           {name: 'availDate', mapping: 'availability', type: 'date', dateFormat: 'm/d/Y'},
-           {name: 'indoor', type: 'bool'}
-      ]);
-
+    // 
     // create the Data Store
     var ds = new Roo.data.Store({
         // load using HTTP
@@ -62,15 +52,14 @@ Roo.onReady(function(){
         
         // the return will be XML, so lets set up a reader
         reader: new Roo.data.JsonReader({
-            root: 'topics',
+            root: 'images',
             totalProperty: 'totalCount',
-            id: 'post_id'
+            id: 'id'
         }, [
-            {name: 'title', mapping: 'topic_title'},
-            {name: 'author', mapping: 'author'},
-            {name: 'totalPosts', mapping: 'topic_replies', type: 'int'},
-            {name: 'lastPost', mapping: 'post_time', type: 'date', dateFormat: 'timestamp'},
-            {name: 'excerpt', mapping: 'post_text'}
+            {name: 'name', type: 'string'},
+            {name: 'size', type: 'string'},
+            {name: 'lastmod', type: 'string'},
+            {name: 'url', type: 'string'}
         ])
     });
 
@@ -89,7 +78,7 @@ Roo.onReady(function(){
     var layout = Roo.BorderLayout.create({
         center: {
             margins:{left:3,top:3,right:3,bottom:3},
-            panels: [new Roo.GridPanel(grid)]
+            panels: [new Roo.panel.Grid(grid)]
         }
     }, 'grid-panel');
 
@@ -100,7 +89,7 @@ Roo.onReady(function(){
     
     var gridHead = grid.getView().getHeaderPanel(true);
     var tb = new Roo.Toolbar(gridHead, [{
-        text: 'Add Plant',
+        text: 'Add new',
         handler : function(){
             Roo.log('clicked');
         }