sync
[Pman.Admin] / Pman.Tab.AdminCompanies.js
index d33bf38..1f60652 100644 (file)
@@ -31,18 +31,20 @@ Pman.Tab.AdminCompanies = new Roo.XComponent({
   name     : "Pman.Tab.AdminCompanies",
   disabled : false, 
   permname : 'Admin.Companies', 
-  _tree : function()
+  _tree : function(_data)
   {
    var _this = this;
    var MODULE = this;
    return {
    xtype : 'NestedLayoutPanel',
+   background : true,
    region : 'center',
    title : _this._strings['edefbda3a2bdd979e42d8944b7325b79'] /* Companies */,
    xns : Roo,
    '|xns' : 'Roo',
    layout : {
     xtype : 'BorderLayout',
+    listeners : '',
     xns : Roo,
     '|xns' : 'Roo',
     center : {
@@ -190,9 +192,6 @@ Pman.Tab.AdminCompanies = new Roo.XComponent({
                     return;
                 }
                 
-                Roo.log(s);
-                return;
-                
                 Pman.Dialog.AdminCompanyMerge.show(s[0].data, function() {
                     _this.grid.footer.onClick('first');
                 }); 
@@ -259,7 +258,7 @@ Pman.Tab.AdminCompanies = new Roo.XComponent({
           listeners : {
            click : function()
             {
-                 Pman.genericDelete(_this, 'Companies'); 
+                Pman.genericDelete(_this, 'core_company'); 
             }
           },
           xns : Roo.Toolbar,
@@ -276,7 +275,7 @@ Pman.Tab.AdminCompanies = new Roo.XComponent({
           {
              o.params = o.params || {};
              try {
-                 o.params['query[name]'] = _this.searchBox.getValue();
+                 o.params['search[name]'] = _this.searchBox.getValue();
              } catch(e) { return false; }
           },
          load : function (_self, records, options)
@@ -291,7 +290,7 @@ Pman.Tab.AdminCompanies = new Roo.XComponent({
         proxy : {
          xtype : 'HttpProxy',
          method : 'GET',
-         url : baseURL + '/Roo/Companies.php',
+         url : baseURL + '/Roo/core_company',
          listeners : {
           load : function (This, o, arg)
            {
@@ -577,7 +576,7 @@ Pman.Tab.AdminCompanies = new Roo.XComponent({
        colModel : [
         {
          xtype : 'ColumnModel',
-         dataIndex : 'comptype',
+         dataIndex : 'comptype_id_display_name',
          header : _this._strings['a1fa27779242b4902f7ae3bdd5c6d508'] /* Type */,
          renderer : function (v,x ,r) {
              //return Pman.Dialog.Companies.comptypeListToString(r.data.isOwner ? 'OWNER' : v);