X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=Pman.Tab.AdminContacts.bjs;fp=Pman.Tab.AdminContacts.bjs;h=93f34e01dce73397603e19578fdced0083c4385f;hb=afb789499880c6858204558788d8070727d92a5a;hp=a5f06ab2d7cd780fe5ae70f763737e9768bd1bd8;hpb=e358845a2737e353ec079038a05ccbb702a4b904;p=Pman.Admin diff --git a/Pman.Tab.AdminContacts.bjs b/Pman.Tab.AdminContacts.bjs index a5f06ab..93f34e0 100644 --- a/Pman.Tab.AdminContacts.bjs +++ b/Pman.Tab.AdminContacts.bjs @@ -62,7 +62,7 @@ "items" : [ { "listeners" : { - "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/core_person',\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/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}", "beforeload" : "function (_self, o)\n{\n if(!_this.active_company_button.pressed){\n o.params['!company_id_comptype'] = 'OWNER';\n }\n \n o.params['query[search]'] = _this.searchBox.getValue();\n \n if (!_this.activeButton) {return; false;}\n \n if (_this.companyCombo && _this.companyCombo.getValue()) {\n o.params.company_id = _this.companyCombo.getValue();\n }\n \n \n o.params.active = _this.activeButton.pressed ? 0 : 1;\n \n if(_this.active_company_button.pressed){\n o.params.company_id = 0;\n }\n \n var c = Pman.Tab.AdminContactsManager.layout.getRegion('west').getActivePanel();\n \n if (!c) { \n return false;\n }\n \n var tms = c.grid.getSelectionModel().getSelected();\n \n if (!tms) {\n return false;\n }\n \n if(c.tableName == 'Groups'){\n o.params['query[in_group]'] = tms.data.id;\n o.params['query[type]'] = 2; // group type..\n }else{\n o.params['query[in_country]'] = (tms.data.country*1 == -1) ? '' : tms.data.country;\n o.params['query[in_group]'] = 0;\n o.params['query[type]'] = 2;\n }\n /*\n if (Pman.Tab.AdminContactsGroup && Pman.Tab.AdminContactsGroup.grid) {\n \n \n \n }\n \n if(Pman.Tab.AdminCountries && Pman.Tab.AdminCountries.grid){\n var tms = Pman.Tab.AdminCountries.grid.getSelectionModel().getSelected();\n \n if (!tms) {\n return false;\n }\n \n }\n */\n //o.params['query[name]'] = _this.searchBox.getValue();\n \n}" }, "xtype" : "Store", @@ -72,7 +72,7 @@ "* prop" : "dataSource", "items" : [ { - "$ url" : "baseURL + '/Roo/core_person'", + "$ url" : "baseURL + '/Roo/Person.php'", "method" : "GET", "xtype" : "HttpProxy", "$ xns" : "Roo.data",