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                             "*prop": "grid",
47                             "xtype": "Grid",
48                             "autoExpandColumn": "filename",
49                             "loadMask": true,
50                             "listeners": {
51                                 "|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}",
52                                 "|rowdblclick": "function (_self, rowIndex, e)\n{\n    if (!_this.dialog) return;\n    _this.dialog.show( this.getDataSource().getAt(rowIndex).data, function() {\n        _this.grid.footer.onClick('first');\n    }); \n}\n"
53                             },
54                             "|xns": "Roo.grid",
55                             "items": [
56                                 {
57                                     "*prop": "dataSource",
58                                     "xtype": "Store",
59                                     "remoteSort": true,
60                                     "|sortInfo": "{ field : 'filename', direction: 'ASC' }",
61                                     "|xns": "Roo.data",
62                                     "items": [
63                                         {
64                                             "*prop": "proxy",
65                                             "xtype": "HttpProxy",
66                                             "method": "GET",
67                                             "|url": "baseURL + '/Roo/Images.php'",
68                                             "|xns": "Roo.data"
69                                         },
70                                         {
71                                             "*prop": "reader",
72                                             "id": "id",
73                                             "root": "data",
74                                             "totalProperty": "total",
75                                             "xtype": "JsonReader",
76                                             "|fields": "[\n    {\n        'name': 'id',\n        'type': 'int'\n    },\n    {\n        'name': 'event_when',\n        'type': 'string'\n    }\n]",
77                                             "|xns": "Roo.data"
78                                         }
79                                     ]
80                                 },
81                                 {
82                                     "*prop": "footer",
83                                     "xtype": "PagingToolbar",
84                                     "pageSize": 25,
85                                     "displayInfo": true,
86                                     "displayMsg": "Displaying Images{0} - {1} of {2}",
87                                     "emptyMsg": "No Images found",
88                                     "|xns": "Roo"
89                                 },
90                                 {
91                                     "*prop": "colModel[]",
92                                     "dataIndex": "event_when",
93                                     "header": "Date",
94                                     "width": 100,
95                                     "xtype": "ColumnModel",
96                                     "|renderer": "function(v) { return String.format('{0}', v ? v.format('Y-m-d H:i:s') : ''); }",
97                                     "|xns": "Roo.grid"
98                                 }
99                             ]
100                         }
101                     ]
102                 },
103                 {
104                     "listeners": {
105                         "render": "function (_self)\n{\n    _this.viewPanel = _self;\n}"
106                     },
107                     "background": false,
108                     "fitContainer": true,
109                     "fitToFrame": true,
110                     "region": "center",
111                     "xtype": "ContentPanel",
112                     "|xns": "Roo"
113                 },
114                 {
115                     "listeners": {
116                         "|click": "function() {\n    _this.dialog.hide();\n}"
117                     },
118                     "*prop": "buttons[]",
119                     "text": "Cancel",
120                     "xtype": "Button",
121                     "|xns": "Roo"
122                 },
123                 {
124                     "listeners": {
125                         "|click": "function() {\n    _this.dialog.hide();\n}"
126                     },
127                     "*prop": "buttons[]",
128                     "text": "OK",
129                     "xtype": "Button",
130                     "|xns": "Roo"
131                 }
132             ]
133         }
134     ],
135     "permname": "",
136     "modOrder": "001"
137 }