Pman.Tab.AdminContactsGroupRight.bjs
authorChris <chris@roojs.com>
Thu, 13 Sep 2012 05:32:11 +0000 (13:32 +0800)
committerChris <chris@roojs.com>
Thu, 13 Sep 2012 05:32:11 +0000 (13:32 +0800)
Pman.Tab.AdminContactsGroupRight.js

Pman.Tab.AdminContactsGroupRight.bjs
Pman.Tab.AdminContactsGroupRight.js

index 011a059..c0b39d0 100644 (file)
@@ -35,7 +35,7 @@
                         {
                             "listeners": {
                                 "beforeload": "function (_self, o)\n{\n    if (!o.params) {\n        o.params = {}\n    }\n    var s = Pman.Tab.Groups.grid.getSelectionModel().getSelections();\n    if (!s.length) {\n        o.params.group_id = -1;\n    } else {\n        o.params.group_id = s[0].data.id;\n    }\n    if (o.params.group_id < 0) {\n        _this.grid.getView().el.mask(\"You can not set permissions for that group\");\n        return false;\n    }\n    _this.grid.getView().el.unmask();\n    return true;\n  \n}",
-                                "update": "function (_self, record, operation)\n{\n    if (operation != 'commit') {\n        return;\n    }\n    // only used to change active status.\n    \n    new Pman.Request({\n        url : baseURL + '/Roo/Person.php',\n        method :'POST',\n        params : {\n            id : record.data.id,\n            active: record.data.active\n            \n        },\n        success : function() {\n            // do nothing\n            \n            _this.grid.ds.remove(record);\n            \n        },\n        failure : function() \n        {\n            Roo.MessageBox.alert(\"Error\", \"saving failed\", function() {\n                _this.grid.footer.onClick('first');\n            });\n        }\n    });\n}"
+                                "update": "function (_self, record, operation)\n{\n    if (operation != 'commit') {\n        return;\n    }\n    // only used to change active status.\n    \n    new Pman.Request({\n        url : baseURL + '/Roo/GroupRights.php',\n        method :'POST',\n        params : {\n            id : record.data.id,\n            active: record.data.active\n            \n        },\n        success : function() {\n            // do nothing\n            \n            _this.grid.ds.remove(record);\n            \n        },\n        failure : function() \n        {\n            Roo.MessageBox.alert(\"Error\", \"saving failed\", function() {\n                _this.grid.footer.onClick('first');\n            });\n        }\n    });\n}"
                             },
                             "*prop": "dataSource",
                             "remoteSort": true,
index 674174c..93f3b23 100644 (file)
@@ -109,7 +109,7 @@ Pman.Tab.AdminContactsGroupRight = new Roo.XComponent({
                             // only used to change active status.
                             
                             new Pman.Request({
-                                url : baseURL + '/Roo/Person.php',
+                                url : baseURL + '/Roo/GroupRights.php',
                                 method :'POST',
                                 params : {
                                     id : record.data.id,