Pman.Tab.AdminOffice.bjs
authorAlan Knowles <alan@akbkhome.com>
Thu, 12 May 2011 08:21:52 +0000 (16:21 +0800)
committerAlan Knowles <alan@akbkhome.com>
Thu, 12 May 2011 08:21:52 +0000 (16:21 +0800)
Pman.Tab.AdminOffice.bjs

index 2c3624d..740489a 100644 (file)
                     "|xns": "Roo.grid",
                     "items": [
                         {
+                            "listeners": {
+                                "beforeload": "function (_self, o)\n{\n    try {\n        var sm = Pman.Tab.Companies.grid.getSelectionModel();\n        sm = sm.getSelected();\n        if (!sm || !sm.data.id) {\n            // mask??\n            return false;\n        }\n               \n        o.params.company_id = sm.data.id ;\n    } catch (e) {\n        return false;\n    }\n    \n }"
+                            },
                             "*prop": "dataSource",
-                            "xtype": "Store",
                             "remoteSort": true,
+                            "xtype": "Store",
                             "|sortInfo": "{ field : 'name', direction: 'ASC' }",
                             "|xns": "Roo.data",
                             "items": [