Pman.Dialog.CoreAutoSavePreview.bjs
[Pman.Core] / Pman.Dialog.CoreAutoSavePreview.bjs
1 {
2     "id": "roo-file-348",
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                     "titlebar": false,
23                     "xtype": "LayoutRegion",
24                     "|xns": "Roo"
25                 },
26                 {
27                     "*prop": "west",
28                     "split": true,
29                     "width": 300,
30                     "xtype": "LayoutRegion",
31                     "|xns": "Roo"
32                 },
33                 {
34                     "listeners": {
35                         "|activate": "function() {\n    _this.panel = this;\n    if (_this.grid) {\n        _this.grid.footer.onClick('first');\n    }\n}"
36                     },
37                     "background": false,
38                     "fitContainer": true,
39                     "fitToframe": true,
40                     "region": "west",
41                     "tableName": "Events",
42                     "title": "Events",
43                     "xtype": "GridPanel",
44                     "|xns": "Roo",
45                     "items": [
46                         {
47                             "listeners": {
48                                 "|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}"
49                             },
50                             "*prop": "grid",
51                             "autoExpandColumn": "remarks",
52                             "loadMask": true,
53                             "xtype": "Grid",
54                             "|xns": "Roo.grid",
55                             "items": [
56                                 {
57                                     "listeners": {
58                                         "afterselectionchange": "function (_self)\n{\n    // load detail log in _this.viewPanel;\n    if (!this.getSelected()) {\n        this.viewPanel.setContent(\"Nothing Selected\");\n        return;\n    }\n    var id = this.getSelected().data.id;\n    _this.viewPanel.load( { url : baseURL + \"/Admin/EventView/\" + id + \".html\" });\n    \n}"
59                                     },
60                                     "*prop": "sm",
61                                     "singleSelect": true,
62                                     "xtype": "RowSelectionModel",
63                                     "|xns": "Roo.grid"
64                                 },
65                                 {
66                                     "listeners": {
67                                         "|beforeload": "function (_self, o)\n{\n    Roo.log(_this.data);\n    o.params = o.parmas || {};\n    o.action = 'AUTOSAVE'\n}"
68                                     },
69                                     "*prop": "dataSource",
70                                     "remoteSort": true,
71                                     "xtype": "Store",
72                                     "|sortInfo": "{ field: 'event_when', direction: 'DESC'}",
73                                     "|xns": "Roo.data",
74                                     "items": [
75                                         {
76                                             "|xns": "Roo.data",
77                                             "xtype": "JsonReader",
78                                             "totalProperty": "total",
79                                             "root": "data",
80                                             "*prop": "reader",
81                                             "id": "id",
82                                             "|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]"
83                                         },
84                                         {
85                                             "*prop": "proxy",
86                                             "xtype": "HttpProxy",
87                                             "method": "GET",
88                                             "|url": "baseURL + '/Roo/Events.php'",
89                                             "listeners": {},
90                                             "|xns": "Roo.data"
91                                         }
92                                     ]
93                                 },
94                                 {
95                                     "*prop": "footer",
96                                     "displayInfo": true,
97                                     "displayMsg": "{0} - {1} of {2}",
98                                     "emptyMsg": "Nothing found",
99                                     "pageSize": 25,
100                                     "xtype": "PagingToolbar",
101                                     "|xns": "Roo"
102                                 },
103                                 {
104                                     "*prop": "colModel[]",
105                                     "dataIndex": "event_when",
106                                     "header": "Date",
107                                     "width": 100,
108                                     "xtype": "ColumnModel",
109                                     "|renderer": "function(v) { return v ? v.dateFormat('d/m/Y H:i') : ''; }",
110                                     "|xns": "Roo.grid"
111                                 },
112                                 {
113                                     "*prop": "colModel[]",
114                                     "dataIndex": "on_table",
115                                     "header": "Affected",
116                                     "width": 100,
117                                     "xtype": "ColumnModel",
118                                     "|renderer": "function(v) {                     \n    return String.format('{0})', v ? v : '');  \n}",
119                                     "|xns": "Roo.grid"
120                                 }
121                             ]
122                         }
123                     ]
124                 },
125                 {
126                     "|xns": "Roo",
127                     "xtype": "ContentPanel"
128                 },
129                 {
130                     "listeners": {
131                         "|click": "function() {\n    _this.dialog.hide();\n}"
132                     },
133                     "*prop": "buttons[]",
134                     "text": "Cancel",
135                     "xtype": "Button",
136                     "|xns": "Roo"
137                 },
138                 {
139                     "listeners": {
140                         "|click": "function() {\n    _this.dialog.hide();\n}"
141                     },
142                     "*prop": "buttons[]",
143                     "text": "OK",
144                     "xtype": "Button",
145                     "|xns": "Roo"
146                 }
147             ]
148         }
149     ],
150     "permname": "",
151     "modOrder": "001"
152 }