Pman.Dialog.CoreAutoSavePreview.bjs
[Pman.Core] / Pman.Dialog.CoreAutoSavePreview.bjs
index 90a4532..356ced2 100644 (file)
@@ -1,5 +1,5 @@
 {
-    "id": "roo-file-348",
+    "id": "roo-file-208",
     "name": "Pman.Dialog.CoreAutoSavePreview",
     "parent": "",
     "title": "",
@@ -25,7 +25,7 @@
                 {
                     "*prop": "west",
                     "split": true,
-                    "width": 300,
+                    "width": 200,
                     "xtype": "LayoutRegion",
                     "|xns": "Roo"
                 },
                     "fitContainer": true,
                     "fitToframe": true,
                     "region": "west",
-                    "tableName": "Events",
-                    "title": "Events",
+                    "tableName": "Images",
+                    "title": "Images",
                     "xtype": "GridPanel",
                     "|xns": "Roo",
                     "items": [
                         {
                             "listeners": {
-                                "|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}"
+                                "|render": "function() \n{\n    _this.grid = this; \n    \n    if (_this.panel.active) {\n       this.footer.onClick('first');\n    }\n}",
+                                "|rowdblclick": "function (_self, rowIndex, e)\n{\n\n}\n"
                             },
                             "*prop": "grid",
-                            "autoExpandColumn": "remarks",
+                            "autoExpandColumn": "filename",
                             "loadMask": true,
                             "xtype": "Grid",
                             "|xns": "Roo.grid",
                             "items": [
                                 {
-                                    "listeners": {
-                                        "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}"
-                                    },
                                     "*prop": "sm",
                                     "singleSelect": true,
                                     "xtype": "RowSelectionModel",
                                     "|xns": "Roo.grid"
                                 },
                                 {
-                                    "listeners": {
-                                        "|beforeload": "function (_self, o)\n{\n    Roo.log(_this.data);\n    o.params = o.parmas || {};\n    o.action = 'AUTOSAVE'\n}"
-                                    },
                                     "*prop": "dataSource",
-                                    "remoteSort": true,
                                     "xtype": "Store",
-                                    "|sortInfo": "{ field: 'event_when', direction: 'DESC'}",
+                                    "remoteSort": true,
+                                    "|sortInfo": "{ field : 'filename', direction: 'ASC' }",
                                     "|xns": "Roo.data",
                                     "items": [
-                                        {
-                                            "|xns": "Roo.data",
-                                            "xtype": "JsonReader",
-                                            "totalProperty": "total",
-                                            "root": "data",
-                                            "*prop": "reader",
-                                            "id": "id",
-                                            "|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]"
-                                        },
                                         {
                                             "*prop": "proxy",
                                             "xtype": "HttpProxy",
                                             "method": "GET",
-                                            "|url": "baseURL + '/Roo/Events.php'",
-                                            "listeners": {},
+                                            "|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": true,
-                                    "displayMsg": "{0} - {1} of {2}",
-                                    "emptyMsg": "Nothing found",
+                                    "displayInfo": false,
                                     "pageSize": 25,
                                     "xtype": "PagingToolbar",
                                     "|xns": "Roo"
                                     "header": "Date",
                                     "width": 100,
                                     "xtype": "ColumnModel",
-                                    "|renderer": "function(v) { return v ? v.dateFormat('d/m/Y H:i') : ''; }",
-                                    "|xns": "Roo.grid"
-                                },
-                                {
-                                    "*prop": "colModel[]",
-                                    "dataIndex": "on_table",
-                                    "header": "Affected",
-                                    "width": 100,
-                                    "xtype": "ColumnModel",
-                                    "|renderer": "function(v) {                     \n    return String.format('{0})', v ? v : '');  \n}",
+                                    "|renderer": "function(v) { return String.format('{0}', v ? v.format('Y-m-d H:i:s') : ''); }",
                                     "|xns": "Roo.grid"
                                 }
                             ]
                     ]
                 },
                 {
-                    "|xns": "Roo",
-                    "xtype": "ContentPanel"
+                    "listeners": {
+                        "render": "function (_self)\n{\n    _this.viewPanel = _self;\n}"
+                    },
+                    "background": false,
+                    "fitContainer": true,
+                    "fitToFrame": true,
+                    "region": "center",
+                    "xtype": "ContentPanel",
+                    "|xns": "Roo"
                 },
                 {
                     "listeners": {