Roo.form.HtmlEditor.ToolbarContext.store.js
authorAlan Knowles <alan@roojs.com>
Tue, 20 Aug 2013 08:43:26 +0000 (16:43 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 20 Aug 2013 08:43:26 +0000 (16:43 +0800)
Roo.form.HtmlEditor.ToolbarContext.store.js

index 20c4b24..47fa5bb 100644 (file)
@@ -1,3 +1,39 @@
 Roo.form.HtmlEditor.ToolbarContext.store = {
-   'font-'
+   'font-family' : {
+            xtype : 'Store',
+             // load using HTTP
+            proxy: {
+               xtype : 'HttpProxy',
+               url: baseURL + '/Roo/core_enum.html',
+               method: 'GET'
+            },
+             reader : {
+                xtype: 'JsonReader',
+                xns: Roo.data,
+                id : 'id',
+                root : 'data',
+                totalProperty : 'total',
+                fields : [
+                    { name:'id','type':'int'},
+                    { name : 'name' , mapping: 'val'} ,
+                    { name:'display_name', mapping: 'display'}
+                ]
+            },
+           listeners : {
+               beforeload : function(st,o)
+               {
+                   // compnay myst be set..
+                    o.params.etype = 'HtmlEditor.font-family'
+                    o.params.active = 1;
+               },
+               loadexception : Pman.loadException
+           
+           },
+           sortInfo: {
+               field: 'display_name', direction: 'ASC'
+           }
+                },
+    
+    
+   }
 }
\ No newline at end of file