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": "Images",
41                     "title": "Images",
42                     "xtype": "GridPanel",
43                     "|xns": "Roo",
44                     "items": [
45                         {
46                             "listeners": {
47                                 "|render": "function() \n{\n    _this.grid = this; \n    \n    if (_this.panel.active) {\n       this.footer.onClick('first');\n    }\n}",
48                                 "|rowdblclick": "function (_self, rowIndex, e)\n{\n\n}\n"
49                             },
50                             "*prop": "grid",
51                             "autoExpandColumn": "filename",
52                             "loadMask": true,
53                             "xtype": "Grid",
54                             "|xns": "Roo.grid",
55                             "items": [
56                                 {
57                                     "listeners": {
58                                         "afterselectionchange": "function (_self)\n{\n    var selected = this.getSelected();\n    \n    if (!selected) {\n        _this.viewPanel.setContent(\"Nothing Selected\");\n        return;\n    }\n    Roo.log(selected);\n    _this.viewPanel.setContent(\"Data Selected\");\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    o.params = o.params || {};\n    \n    if(typeof(_this.data) == 'undefined'){\n        this.removeAll();\n        return false;\n    }\n    \n    o.params.action = 'AUTOSAVE';\n}"
68                                     },
69                                     "*prop": "dataSource",
70                                     "remoteSort": true,
71                                     "xtype": "Store",
72                                     "|sortInfo": "{ field : 'filename', direction: 'ASC' }",
73                                     "|xns": "Roo.data",
74                                     "items": [
75                                         {
76                                             "*prop": "proxy",
77                                             "xtype": "HttpProxy",
78                                             "method": "GET",
79                                             "|url": "baseURL + '/Roo/Images.php'",
80                                             "|xns": "Roo.data"
81                                         },
82                                         {
83                                             "*prop": "reader",
84                                             "id": "id",
85                                             "root": "data",
86                                             "totalProperty": "total",
87                                             "xtype": "JsonReader",
88                                             "|fields": "[\n    {\n        'name': 'id',\n        'type': 'int'\n    },\n    {\n        'name': 'event_when',\n        'type': 'string'\n    }\n]",
89                                             "|xns": "Roo.data"
90                                         }
91                                     ]
92                                 },
93                                 {
94                                     "*prop": "footer",
95                                     "displayInfo": false,
96                                     "pageSize": 25,
97                                     "xtype": "PagingToolbar",
98                                     "|xns": "Roo"
99                                 },
100                                 {
101                                     "*prop": "colModel[]",
102                                     "dataIndex": "event_when",
103                                     "header": "Date",
104                                     "width": 100,
105                                     "xtype": "ColumnModel",
106                                     "|renderer": "function(v) { return String.format('{0}', v ? v.format('Y-m-d H:i:s') : ''); }",
107                                     "|xns": "Roo.grid"
108                                 }
109                             ]
110                         }
111                     ]
112                 },
113                 {
114                     "listeners": {
115                         "render": "function (_self)\n{\n    _this.viewPanel = _self;\n}"
116                     },
117                     "background": false,
118                     "fitContainer": true,
119                     "fitToFrame": true,
120                     "region": "center",
121                     "xtype": "ContentPanel",
122                     "|xns": "Roo"
123                 },
124                 {
125                     "listeners": {
126                         "|click": "function() {\n    _this.dialog.hide();\n}"
127                     },
128                     "*prop": "buttons[]",
129                     "text": "Cancel",
130                     "xtype": "Button",
131                     "|xns": "Roo"
132                 },
133                 {
134                     "listeners": {
135                         "|click": "function() {\n    _this.dialog.hide();\n}"
136                     },
137                     "*prop": "buttons[]",
138                     "text": "OK",
139                     "xtype": "Button",
140                     "|xns": "Roo"
141                 }
142             ]
143         }
144     ],
145     "permname": "",
146     "modOrder": "001"
147 }