Pman.Dialog.AdminCompanyMerge.bjs
[Pman.Admin] / Pman.Dialog.AdminCompanyMerge.js
index 717bde8..1b53937 100644 (file)
@@ -99,7 +99,7 @@ Pman.Dialog.AdminCompanyMerge = {
         xtype : 'Form',
         method : 'POST',
         style : 'margin: 10px;',
-        url : baseURL + '/Roo/Core_enum.php',
+        url : baseURL + '/Roo/Core_company.php',
         listeners : {
          actioncomplete : function (_self, action)
           {
@@ -114,10 +114,10 @@ Pman.Dialog.AdminCompanyMerge = {
                   _this.form.reset();
                   return;
               }
+              
               if (action.type == 'setdata') {
                   
-                   var title = _this.data.title  || _this.data.etype;
-                  _this.dialog.setTitle("Delete selected " + title + " and merge data with");
+                  _this.dialog.setTitle("Delete selected " + _this.data.name + " and merge data with");
                    
                  return;
               }
@@ -153,7 +153,7 @@ Pman.Dialog.AdminCompanyMerge = {
           qtip : _this._strings['bf8691517ce00a09186a05cd65863091'] /* Select Item to Merge With */,
           queryParam : 'query[search_begins]',
           selectOnFocus : true,
-          tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{display_name}</b> {name}</div>',
+          tpl : '<div class=\"x-grid-cell-text x-btn button\">{code} - <b>{name}</b> {name}</div>',
           triggerAction : 'all',
           typeAhead : true,
           valueField : 'id',
@@ -168,10 +168,7 @@ Pman.Dialog.AdminCompanyMerge = {
             beforeload : function (_self, o){
                  o.params = o.params || {};
                  
-                 o.params['etype'] = _this.data.etype;
-                 
                  o.params['!id'] = _this.form.findField('id').getValue();
-                 // set more here
              }
            },
            xns : Roo.data,
@@ -179,13 +176,22 @@ Pman.Dialog.AdminCompanyMerge = {
            proxy : {
             xtype : 'HttpProxy',
             method : 'GET',
-            url : baseURL + '/Roo/Core_enum',
+            url : baseURL + '/Roo/Core_company',
             xns : Roo.data,
             '|xns' : 'Roo.data'
            },
            reader : {
             xtype : 'JsonReader',
-            fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}],
+            fields : [
+                {
+                    "name":"id",
+                    "type":"int"
+                },
+                {
+                    "name":"name",
+                    "type":"string"
+                }
+            ],
             id : 'id',
             root : 'data',
             totalProperty : 'total',