Pman.Tab.AdminContacts.bjs
authorAlan Knowles <alan@roojs.com>
Tue, 28 Mar 2017 09:11:35 +0000 (17:11 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 28 Mar 2017 09:11:35 +0000 (17:11 +0800)
Pman.Tab.AdminContacts.js

Pman.Tab.AdminContacts.bjs
Pman.Tab.AdminContacts.js

index a5f06ab..93f34e0 100644 (file)
@@ -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",
index f02789a..235d884 100644 (file)
@@ -472,7 +472,7 @@ Pman.Tab.AdminContacts = new Roo.XComponent({
            // only used to change active status.
            
            new Pman.Request({
-               url : baseURL + '/Roo/core_person',
+               url : baseURL + '/Roo/Person.php',
                method :'POST',
                params : {
                    id : record.data.id,
@@ -499,7 +499,7 @@ Pman.Tab.AdminContacts = new Roo.XComponent({
      proxy : {
       xtype : 'HttpProxy',
       method : 'GET',
-      url : baseURL + '/Roo/core_person',
+      url : baseURL + '/Roo/Person.php',
       xns : Roo.data,
       '|xns' : 'Roo.data'
      },