Fix #7123 - getting abra ready to test
[Pman.Xtuple] / Pman.Tab.XtupleSales.bjs
1 {
2     "id": "roo-file-297",
3     "name": "Pman.Tab.XtupleSales",
4     "parent": "Pman",
5     "title": "Pman.Tab.XtupleSales",
6     "path": "/home/alan/gitlive/web.xtuple/Pman/Xtuple/Pman.Tab.XtupleSales.bjs",
7     "items": [
8         {
9             "listeners": {
10                 "|activate": "function () {\n   \n    \n    if (typeof(Pman.Login) != 'undefined') {\n         var db = baseURL.split('.php').shift().substr(-2,2)\n    \n        this.setTitle('Sales (' + Pman.Login.authUser.dbname +')');\n        \n    }\n    \n    (function() {\n         var c= _this.layout.getRegion('center');\n         c.showPanel(c.getActivePanel());\n    \n             }).defer(100);\n}"
11             },
12             "region": "center",
13             "title": "Sales",
14             "xtype": "NestedLayoutPanel",
15             "|xns": "Roo",
16             "items": [
17                 {
18                     "xtype": "BorderLayout",
19                     "|xns": "Roo",
20                     "*prop": "layout",
21                     "items": [
22                         {
23                             "xtype": "LayoutRegion",
24                             "|xns": "Roo",
25                             "*prop": "east",
26                             "title": "last edited",
27                             "collapsible": true,
28                             "width": "150",
29                             "split": true
30                         },
31                         {
32                             "xtype": "LayoutRegion",
33                             "|xns": "Roo",
34                             "*prop": "center",
35                             "tabPosition": "top"
36                         },
37                         {
38                             "listeners": {
39                                 "|activate": "function() {\n    _this.panel = this;\n    if (_this.grid) {\n        _this.grid.footer.onClick('first');\n    }\n}"
40                             },
41                             "background": true,
42                             "fitContainer": true,
43                             "fitToframe": true,
44                             "region": "east",
45                             "tableName": "events",
46                             "title": "events",
47                             "xtype": "GridPanel",
48                             "|xns": "Roo",
49                             "items": [
50                                 {
51                                     "listeners": {
52                                         "|render": "function() \n{\n    _this.grid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\n    if (_this.panel.active) {\n       this.footer.onClick('first');\n    }\n}",
53                                         "|rowdblclick": "function (_self, rowIndex, e)\n{\n    _this.dialog = Pman.Dialog.XtupleSalesOrder;\n    \n    data = this.getDataSource().getAt(rowIndex).data;\n    \n    _this.dialog.show( \n        { cohead_id : data.on_id_cohead_id } , \n        function() {\n            _this.grid.footer.onClick('first');\n            Pman.Tab.XtupleSalesOrder.grid.footer.onClick('refresh');\n            \n        }\n    ); \n}\n"
54                                     },
55                                     "*prop": "grid",
56                                     ".builderCfg": "{\"cols\":[{\"table\":\"events\",\"column\":\"on_id\",\"columnshort\":\"on_id\",\"ctype\":\"int4\",\"desc\":\"\",\"use\":1,\"use_ex\":1,\"title\":\"\"}],\"cols_ex\":[\"on_id\"],\"table\":\"events\",\"xtype\":\"GridPanel\",\"|xns\":\"Roo\"}",
57                                     "autoExpandColumn": "on_id",
58                                     "loadMask": true,
59                                     "xtype": "Grid",
60                                     "|xns": "Roo.grid",
61                                     "items": [
62                                         {
63                                             "listeners": {
64                                                 "beforeload": "function (_self, options)\n{\n    options.params._join = 'cohead';\n    options.params.on_table = 'cohead';\n    options.params._join_cols   = 'cohead_number,cohead_id';\n    options.params.sort = '';\n    options.params.person_id = Pman.Login.authUser.id;\n    \n     /// on_table=cohead\n        //   &_join=cohead\n        //   &_join_cols=cohead_number\n        //    &_columns=on_id_cohead_number,event_when << this is ignored at present.\n        // max(event_when) is not supported... by any query yet..\n        \n}"
65                                             },
66                                             "*prop": "dataSource",
67                                             ".builderCfg": "{\"cols\":[{\"table\":\"events\",\"column\":\"on_id\",\"columnshort\":\"on_id\",\"ctype\":\"int4\",\"desc\":\"\",\"use\":1,\"use_ex\":1,\"title\":\"\"}],\"cols_ex\":[\"on_id\"],\"table\":\"events\",\"xtype\":\"GridPanel\",\"|xns\":\"Roo\"}",
68                                             "remoteSort": true,
69                                             "xtype": "Store",
70                                             "|xns": "Roo.data",
71                                             "items": [
72                                                 {
73                                                     "*prop": "proxy",
74                                                     "xtype": "HttpProxy",
75                                                     "method": "GET",
76                                                     "|url": "baseURL + '/Roo/events.php'",
77                                                     "|xns": "Roo.data"
78                                                 },
79                                                 {
80                                                     "|xns": "Roo.data",
81                                                     "xtype": "JsonReader",
82                                                     "totalProperty": "total",
83                                                     "root": "data",
84                                                     ".builderCfg": "{\"cols\":[{\"table\":\"events\",\"column\":\"on_id\",\"columnshort\":\"on_id\",\"ctype\":\"int4\",\"desc\":\"\",\"use\":1,\"use_ex\":1,\"title\":\"\"}],\"cols_ex\":[\"on_id\"],\"table\":\"events\",\"xtype\":\"GridPanel\",\"|xns\":\"Roo\"}",
85                                                     "*prop": "reader",
86                                                     "id": "id",
87                                                     "|fields": "[\n    {\n        'name': 'on_id',\n        'type': 'int'\n    }\n]"
88                                                 }
89                                             ]
90                                         },
91                                         {
92                                             "*prop": "footer",
93                                             "displayInfo": true,
94                                             "displayMsg": ".",
95                                             "emptyMsg": ".",
96                                             "pageSize": 25,
97                                             "xtype": "PagingToolbar",
98                                             "|xns": "Roo"
99                                         },
100                                         {
101                                             "*prop": "colModel[]",
102                                             ".builderCfg": "{\"table\":\"events\",\"column\":\"on_id\",\"columnshort\":\"on_id\",\"ctype\":\"int4\",\"desc\":\"\",\"use\":1,\"use_ex\":1,\"title\":\"\"}",
103                                             "dataIndex": "on_id_cohead_number",
104                                             "header": "on",
105                                             "width": 75,
106                                             "xtype": "ColumnModel",
107                                             "|renderer": "function(v) { return String.format('{0}', v); }",
108                                             "|xns": "Roo.grid"
109                                         }
110                                     ]
111                                 }
112                             ]
113                         }
114                     ]
115                 }
116             ]
117         }
118     ],
119     "permname": "",
120     "modOrder": "002"
121 }