From: Alan Knowles Date: Fri, 14 Jan 2011 07:55:03 +0000 (+0800) Subject: Pman.Tab.AdminContacts.bjs X-Git-Url: http://git.roojs.org/?p=Pman.Admin;a=commitdiff_plain;h=147bc6c57ee4297c7846964b08de69050b7a88e3 Pman.Tab.AdminContacts.bjs --- diff --git a/Pman.Tab.AdminContacts.bjs b/Pman.Tab.AdminContacts.bjs index ee56d1e..4f11ff6 100644 --- a/Pman.Tab.AdminContacts.bjs +++ b/Pman.Tab.AdminContacts.bjs @@ -35,7 +35,7 @@ "items": [ { "listeners": { - "beforeload": "function (_self, o)\n{\n \n o.params['!company_id_comptype'] = 'OWNER';\n o.params['query[search]'] = _this.searchBox.getValue();\n \n if (!_this.activeButton) {return; false;}\n \n \n o.params.active = _this.activeButton.pressed ? 0 : 1;\n if (!Pman.Tab.AdminContactsGroup) { \n return false;\n }\n \n \n if (Pman.Tab.AdminContactsGroup && Pman.Tab.AdminContactsGroup.grid) {\n var tms = Pman.Tab.ContactsGroup.grid.getLeftSelections();\n \n if (tms.length) {\n o.params['query[in_group]'] = tms[0].data.id;\n o.params['query[type]'] = 2; // group type..\n }\n }\n //o.params['query[name]'] = _this.searchBox.getValue();\n \n \n}", + "beforeload": "function (_self, o)\n{\n \n o.params['!company_id_comptype'] = 'OWNER';\n o.params['query[search]'] = _this.searchBox.getValue();\n \n if (!_this.activeButton) {return; false;}\n \n \n o.params.active = _this.activeButton.pressed ? 0 : 1;\n if (!Pman.Tab.AdminContactsGroup) { \n return false;\n }\n \n \n if (Pman.Tab.AdminContactsGroup && Pman.Tab.AdminContactsGroup.grid) {\n var tms = Pman.Tab.ContactsGroup.grid.getSelectionModel().getSelected();\n \n if (!tms) {\n return;\n }\n o.params['query[in_group]'] = tms.data.id;\n o.params['query[type]'] = 2; // group type..\n \n }\n //o.params['query[name]'] = _this.searchBox.getValue();\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/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}" }, "*prop": "dataSource",