Pman.Dialog.CoreAutoSavePreview.bjs
[Pman.Core] / Pman.Dialog.CoreAutoSavePreview.bjs
index 03b8286..9bc917c 100644 (file)
@@ -1,5 +1,5 @@
 {
-    "id": "roo-file-348",
+    "id": "roo-file-208",
     "name": "Pman.Dialog.CoreAutoSavePreview",
     "parent": "",
     "title": "",
             "items": [
                 {
                     "*prop": "center",
-                    "titlebar": false,
                     "xtype": "LayoutRegion",
                     "|xns": "Roo"
                 },
                 {
                     "*prop": "west",
                     "split": true,
-                    "width": 300,
+                    "width": 200,
                     "xtype": "LayoutRegion",
                     "|xns": "Roo"
                 },
+                {
+                    "listeners": {
+                        "|activate": "function() {\n    _this.panel = this;\n    if (_this.grid) {\n        _this.grid.footer.onClick('first');\n    }\n}"
+                    },
+                    "background": false,
+                    "fitContainer": true,
+                    "fitToframe": true,
+                    "region": "west",
+                    "tableName": "Images",
+                    "title": "Images",
+                    "xtype": "GridPanel",
+                    "|xns": "Roo",
+                    "items": [
+                        {
+                            "*prop": "grid",
+                            "xtype": "Grid",
+                            "autoExpandColumn": "filename",
+                            "loadMask": true,
+                            "listeners": {
+                                "|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}",
+                                "|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"
+                            },
+                            "|xns": "Roo.grid",
+                            "items": [
+                                {
+                                    "*prop": "dataSource",
+                                    "xtype": "Store",
+                                    "remoteSort": true,
+                                    "|sortInfo": "{ field : 'filename', direction: 'ASC' }",
+                                    "|xns": "Roo.data",
+                                    "items": [
+                                        {
+                                            "*prop": "proxy",
+                                            "xtype": "HttpProxy",
+                                            "method": "GET",
+                                            "|url": "baseURL + '/Roo/Images.php'",
+                                            "|xns": "Roo.data"
+                                        },
+                                        {
+                                            "*prop": "reader",
+                                            "id": "id",
+                                            "root": "data",
+                                            "totalProperty": "total",
+                                            "xtype": "JsonReader",
+                                            "|fields": "[\n    {\n        'name': 'id',\n        'type': 'int'\n    },\n    {\n        'name': 'event_when',\n        'type': 'string'\n    }\n]",
+                                            "|xns": "Roo.data"
+                                        }
+                                    ]
+                                },
+                                {
+                                    "*prop": "footer",
+                                    "displayInfo": false,
+                                    "emptyMsg": "No Images found",
+                                    "pageSize": 25,
+                                    "xtype": "PagingToolbar",
+                                    "|xns": "Roo"
+                                },
+                                {
+                                    "*prop": "colModel[]",
+                                    "dataIndex": "event_when",
+                                    "header": "Date",
+                                    "width": 100,
+                                    "xtype": "ColumnModel",
+                                    "|renderer": "function(v) { return String.format('{0}', v ? v.format('Y-m-d H:i:s') : ''); }",
+                                    "|xns": "Roo.grid"
+                                }
+                            ]
+                        }
+                    ]
+                },
+                {
+                    "listeners": {
+                        "render": "function (_self)\n{\n    _this.viewPanel = _self;\n}"
+                    },
+                    "background": false,
+                    "fitContainer": true,
+                    "fitToFrame": true,
+                    "region": "center",
+                    "xtype": "ContentPanel",
+                    "|xns": "Roo"
+                },
                 {
                     "listeners": {
                         "|click": "function() {\n    _this.dialog.hide();\n}"