Pman.Dialog.CoreAutoSavePreview.bjs
[Pman.Core] / Pman.Dialog.CoreAutoSavePreview.bjs
index 9bc917c..148fbed 100644 (file)
                     "|xns": "Roo",
                     "items": [
                         {
+                            "listeners": {
+                                "|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",
-                            "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"
-                            },
+                            "xtype": "Grid",
                             "|xns": "Roo.grid",
                             "items": [
                                 {
+                                    "listeners": {
+                                        "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}"
+                                    },
+                                    "*prop": "sm",
+                                    "singleSelect": true,
+                                    "xtype": "RowSelectionModel",
+                                    "|xns": "Roo.grid"
+                                },
+                                {
+                                    "listeners": {
+                                        "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}"
+                                    },
                                     "*prop": "dataSource",
-                                    "xtype": "Store",
                                     "remoteSort": true,
+                                    "xtype": "Store",
                                     "|sortInfo": "{ field : 'filename', direction: 'ASC' }",
                                     "|xns": "Roo.data",
                                     "items": [
@@ -81,7 +93,6 @@
                                 {
                                     "*prop": "footer",
                                     "displayInfo": false,
-                                    "emptyMsg": "No Images found",
                                     "pageSize": 25,
                                     "xtype": "PagingToolbar",
                                     "|xns": "Roo"