Pman.Dialog.CoreAutoSavePreview.bjs
[Pman.Core] / Pman.Dialog.CoreAutoSavePreview.bjs
1 {
2     "id": "roo-file-208",
3     "name": "Pman.Dialog.CoreAutoSavePreview",
4     "parent": "",
5     "title": "",
6     "path": "/home/edward/gitlive/Pman.Core/Pman.Dialog.CoreAutoSavePreview.bjs",
7     "items": [
8         {
9             "background": false,
10             "closable": false,
11             "collapsible": false,
12             "height": 500,
13             "modal": true,
14             "resizable": false,
15             "title": "Saved Version",
16             "width": 800,
17             "xtype": "LayoutDialog",
18             "|xns": "Roo",
19             "items": [
20                 {
21                     "*prop": "center",
22                     "xtype": "LayoutRegion",
23                     "|xns": "Roo"
24                 },
25                 {
26                     "*prop": "west",
27                     "split": true,
28                     "width": 200,
29                     "xtype": "LayoutRegion",
30                     "|xns": "Roo"
31                 },
32                 {
33                     "listeners": {
34                         "|activate": "function() {\n    _this.panel = this;\n    if (_this.grid) {\n        _this.grid.footer.onClick('first');\n    }\n}"
35                     },
36                     "background": false,
37                     "fitContainer": true,
38                     "fitToframe": true,
39                     "region": "west",
40                     "tableName": "Events",
41                     "title": "Events",
42                     "xtype": "GridPanel",
43                     "|xns": "Roo",
44                     "items": [
45                         {
46                             "listeners": {
47                                 "|render": "function() { \n    _this.grid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\n    if (_this.panel.active) {\n       this.footer.onClick('first');\n    }\n}"
48                             },
49                             "*prop": "grid",
50                             "autoExpandColumn": "event_when",
51                             "loadMask": true,
52                             "xtype": "Grid",
53                             "|xns": "Roo.grid",
54                             "items": [
55                                 {
56                                     "listeners": {
57                                         "afterselectionchange": "function (_self)\n{\n    \n    if (!this.getSelected()) {\n        _this.viewPanel.setContent(\"Nothing Selected\");\n        return;\n    }\n    \n    _this.viewPanel.setContent(\"data\");\n}"
58                                     },
59                                     "*prop": "sm",
60                                     "singleSelect": true,
61                                     "xtype": "RowSelectionModel",
62                                     "|xns": "Roo.grid"
63                                 },
64                                 {
65                                     "listeners": {
66                                         "|beforeload": "function (_self, o)\n{\n    Roo.log(_this.data);\n    o.params = o.parmas || {};\n    o.action = 'AUTOSAVE';\n    \n}"
67                                     },
68                                     "*prop": "dataSource",
69                                     "remoteSort": true,
70                                     "xtype": "Store",
71                                     "|sortInfo": "{ field: 'event_when', direction: 'DESC'}",
72                                     "|xns": "Roo.data",
73                                     "items": [
74                                         {
75                                             "|xns": "Roo.data",
76                                             "xtype": "JsonReader",
77                                             "totalProperty": "total",
78                                             "root": "data",
79                                             "*prop": "reader",
80                                             "id": "id",
81                                             "|fields": "[\n    {\n        'name': 'id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_name',\n        'type': 'string'\n    },\n    {\n        'name': 'event_when',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    },\n    {\n        'name': 'action',\n        'type': 'string'\n    },\n    {\n        'name': 'ipaddr',\n        'type': 'string'\n    },\n    {\n        'name': 'on_id',\n        'type': 'int'\n    },\n    {\n        'name': 'on_table',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id',\n        'type': 'int'\n    },\n    {\n        'name': 'remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_office_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_phone',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_fax',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_email',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_company_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_role',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_active',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_passwd',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_owner_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_lang',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_no_reset_sent',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_action_type',\n        'type': 'string'\n    },\n    {\n        'name': 'person_id_project_id',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_deleted_by',\n        'type': 'int'\n    },\n    {\n        'name': 'person_id_deleted_dt',\n        'type': 'date'\n    }\n]"
82                                         },
83                                         {
84                                             "*prop": "proxy",
85                                             "xtype": "HttpProxy",
86                                             "method": "GET",
87                                             "|url": "baseURL + '/Roo/Events.php'",
88                                             "listeners": {},
89                                             "|xns": "Roo.data"
90                                         }
91                                     ]
92                                 },
93                                 {
94                                     "*prop": "footer",
95                                     "displayInfo": true,
96                                     "displayMsg": "{0} - {1} of {2}",
97                                     "emptyMsg": "Nothing found",
98                                     "pageSize": 25,
99                                     "xtype": "PagingToolbar",
100                                     "|xns": "Roo"
101                                 },
102                                 {
103                                     "*prop": "colModel[]",
104                                     "dataIndex": "event_when",
105                                     "header": "Date",
106                                     "width": 100,
107                                     "xtype": "ColumnModel",
108                                     "|renderer": "function(v) { return v ? v.dateFormat('d/m/Y H:i') : ''; }",
109                                     "|xns": "Roo.grid"
110                                 }
111                             ]
112                         }
113                     ]
114                 },
115                 {
116                     "listeners": {
117                         "render": "function (_self)\n{\n    _this.viewPanel = _self;\n}"
118                     },
119                     "background": false,
120                     "fitContainer": true,
121                     "fitToFrame": true,
122                     "region": "center",
123                     "xtype": "ContentPanel",
124                     "|xns": "Roo"
125                 },
126                 {
127                     "listeners": {
128                         "|click": "function() {\n    _this.dialog.hide();\n}"
129                     },
130                     "*prop": "buttons[]",
131                     "text": "Cancel",
132                     "xtype": "Button",
133                     "|xns": "Roo"
134                 },
135                 {
136                     "listeners": {
137                         "|click": "function() {\n    _this.dialog.hide();\n}"
138                     },
139                     "*prop": "buttons[]",
140                     "text": "OK",
141                     "xtype": "Button",
142                     "|xns": "Roo"
143                 }
144             ]
145         }
146     ],
147     "permname": "",
148     "modOrder": "001"
149 }