DataObjects/Builder_tables.php
[Pman.Builder] / Pman.Tab.BuilderPalette.bjs
1 {
2     "id": "roo-file-196",
3     "name": "Pman.Tab.BuilderPalette",
4     "parent": "Pman.Tab.BuilderTab",
5     "title": "Pman.Tab.BuilderPalette",
6     "path": "/home/edward/gitlive/Pman.Builder/Pman.Tab.BuilderPalette.bjs",
7     "items": [
8         {
9             "listeners": {
10                 "|activate": "function() {\n    _this.panel = this;\n    if (_this.grid) {\n       _this.grid.ds.load({})\n    }\n}"
11             },
12             "background": true,
13             "fitContainer": true,
14             "fitToframe": true,
15             "region": "east",
16             "tableName": "palette",
17             "title": "palette",
18             "xtype": "GridPanel",
19             "|xns": "Roo",
20             "items": [
21                 {
22                     "listeners": {
23                         "|render": "function() \n{\n    _this.grid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\n    if (_this.panel.active) {\n       this.ds.load({})\n    }\n    if (_this.ss) {\n        return;\n    }\n    _this.ss =   Roo.util.CSS.createStyleSheet(\n'.pman-builder-palete-hide { display: none; } ' + \"\\n\" \n, Roo.id())\n    \n    \n    \n}",
24                         "rowclass": "function (gridview, rowcfg)\n{\n    var sn = Pman.Builder.Tree.currentNodeType();\n  //  Roo.log(rowcfg);\n    if (!sn) {\n        sn = '*top';\n    }\n    var cls = 'pman-builder-palete-hide';\n   \n \n    Roo.each(rowcfg.record.json.parents, function(n) {\n        if (n == sn || n.split(':').shift() == sn) \n            cls = '';\n            return true;\n        }\n     );\n     //Roo.log(cls);\n     rowcfg.rowClass = cls;\n    // what is the currently selected element..\n \n}"
25                     },
26                     "*prop": "grid",
27                     "autoExpandColumn": "name",
28                     "ddGroup": "component",
29                     "enableDrag": true,
30                     "loadMask": true,
31                     "xtype": "Grid",
32                     "|xns": "Roo.grid",
33                     "items": [
34                         {
35                             "*prop": "dataSource",
36                             "xtype": "Store",
37                             "remoteSort": true,
38                             "|sortInfo": "{ field : 'name', direction: 'ASC' }",
39                             "|xns": "Roo.data",
40                             "items": [
41                                 {
42                                     "*prop": "proxy",
43                                     "method": "GET",
44                                     "xtype": "HttpProxy",
45                                     "|url": "baseURL + '/Builder/Palette.php'",
46                                     "|xns": "Roo.data"
47                                 },
48                                 {
49                                     "*prop": "reader",
50                                     "id": "id",
51                                     "root": "data",
52                                     "totalProperty": "total",
53                                     "xtype": "JsonReader",
54                                     "|fields": "[\n    \n    {\n        'name': 'name',\n        'type': 'string'\n    }\n]",
55                                     "|xns": "Roo.data"
56                                 }
57                             ]
58                         },
59                         {
60                             "*prop": "colModel[]",
61                             "dataIndex": "name",
62                             "header": "Name",
63                             "width": 200,
64                             "xtype": "ColumnModel",
65                             "|renderer": "function(v) { return String.format('{0}', v); }",
66                             "|xns": "Roo.grid"
67                         },
68                         {
69                             "*prop": "sm",
70                             "singleSelect": true,
71                             "xtype": "RowSelectionModel",
72                             "|xns": "Roo.grid"
73                         }
74                     ]
75                 }
76             ]
77         }
78     ],
79     "permname": "",
80     "modOrder": "001"
81 }