fix conflict
authorMicheal <micheal@roojs.com>
Mon, 26 Jan 2015 05:48:35 +0000 (13:48 +0800)
committerMicheal <micheal@roojs.com>
Mon, 26 Jan 2015 05:48:35 +0000 (13:48 +0800)
1  2 
Pman.Tab.AdminEnum.bjs
Pman.Tab.AdminEnum.js

diff --combined Pman.Tab.AdminEnum.bjs
@@@ -2,7 -2,7 +2,7 @@@
      "name" : "Pman.Tab.AdminEnum",
      "parent" : "Pman.Tab.Admin",
      "title" : "Pman.Tab.AdminEnum",
-     "path" : "/home/michael/gitlive/Pman.Admin/Pman.Tab.AdminEnum.bjs",
+     "path" : "/home/alan/gitlive/Pman.Admin/Pman.Tab.AdminEnum.bjs",
      "permname" : "",
      "modOrder" : "500",
      "items" : [
@@@ -45,7 -45,6 +45,7 @@@
                                          "beforeedit" : "function (e)\n{\n    if(e.field == 'name' && e.record.data.is_system_enum*1 == 1){\n        return false;\n    }\n}",
                                          "cellclick" : "function (_self, rowIndex, columnIndex, e)\n{\n\n        var di = this.colModel.getDataIndex(columnIndex);\n        if (di != 'active') {\n            return;\n        }\n         \n        var rec = _this.grid.ds.getAt(rowIndex);\n        \n        rec.set('active', rec.data.active ? 0 : 1);\n        rec.commit();\n         \n        \n}",
                                          "|render" : "function() \n{\n    _this.egrid = this; \n    //_this.dialog = Pman.Dialog.FILL_IN\n    if (_this.epanel.active) {\n       this.footer.onClick('first');\n    }\n}",
 +                                        "celldblclick" : "function (_self, rowIndex, columnIndex, e)\n{\n    var rec = _this.egrid.ds.getAt(rowIndex);\n    Pman.Dialog.AdminEnumType.show(rec.data,function(){\n        \n        _this.egrid.footer.onClick('first');\n    });\n}",
                                          "afteredit" : "function (e)\n{\n   e.record.commit();     \n}"
                                      },
                                      "autoExpandColumn" : "display_name",
@@@ -57,7 -56,7 +57,7 @@@
                                      "items" : [
                                          {
                                              "listeners" : {
 -                                                "update" : "function (_self, record, operation)\n{\n    if (operation != Roo.data.Record.COMMIT) {\n        return;\n    }\n    // got commit..\n    new Pman.Request({\n        url : baseURL + '/Roo/Core_enum.php',\n        method : 'POST',\n        params : {\n            id : record.data.id,\n            etype : _this.etypeCombo.getValue(),\n            name : record.data.name,\n            active : record.data.active,\n            seqid : record.data.seqid,\n            display_name : record.data.display_name\n        }, \n        success : function(res) {\n            //Roo.log(data);\n            // update the ID if it's not set..\n            if (record.data.id * 1 < 1) {\n                record.set('id', res.data.id);\n            }\n        }\n    });\n    \n}",
 +                                                "update" : "function (_self, record, operation)\n{\n    if (operation != Roo.data.Record.COMMIT) {\n        return;\n    }\n    // got commit..\n    new Pman.Request({\n        url : baseURL + '/Roo/Core_enum.php',\n        method : 'POST',\n        params : {\n            id : record.data.id,\n            etype : _this.grid.ds.getById(record.id).data.etype,\n            name : record.data.name,\n            active : record.data.active,\n            seqid : record.data.seqid,\n            display_name : record.data.display_name\n        }, \n        success : function(res) {\n            //Roo.log(data);\n            // update the ID if it's not set..\n            if (record.data.id * 1 < 1) {\n                record.set('id', res.data.id);\n            }\n        }\n    });\n    \n}",
                                                  "beforeload" : "function (_self, o)\n{\n    o.params['query[empty_etype]'] = 1; \n  \n}"
                                              },
                                              "xtype" : "Store",
                              "listeners" : {
                                  "|activate" : "function() {\n    _this.panel = this;\n    if (_this.grid) {\n        _this.grid.footer.onClick('first');\n    }\n}"
                              },
 +                            "fitToframe" : true,
                              "background" : false,
                              "region" : "center",
 -                            "fitToframe" : true,
                              "title" : "Pulldown Options",
                              "xtype" : "GridPanel",
                              "$ xns" : "Roo",
                                      "items" : [
                                          {
                                              "listeners" : {
 -                                                "update" : "function (_self, record, operation)\n{\n    if (operation != Roo.data.Record.COMMIT) {\n        return;\n    }\n    // got commit..\n    new Pman.Request({\n        url : baseURL + '/Roo/Core_enum.php',\n        method : 'POST',\n        params : {\n            id : record.data.id,\n            etype : _this.etypeCombo.getValue(),\n            name : record.data.name,\n            active : record.data.active,\n            seqid : record.data.seqid,\n            display_name : record.data.display_name\n        }, \n        success : function(res) {\n            //Roo.log(data);\n            // update the ID if it's not set..\n            if (record.data.id * 1 < 1) {\n                record.set('id', res.data.id);\n            }\n        }\n    });\n    \n}",
 +                                                "update" : "function (_self, record, operation)\n{\n    if (operation != Roo.data.Record.COMMIT) {\n        return;\n    }\n    // got commit..\n    new Pman.Request({\n        url : baseURL + '/Roo/Core_enum.php',\n        method : 'POST',\n        params : {\n            id : record.data.id,\n            etype : _this.grid.ds.getById(record.id).data.etype,\n            name : record.data.name,\n            active : record.data.active,\n            seqid : record.data.seqid,\n            display_name : record.data.display_name\n        }, \n        success : function(res) {\n            //Roo.log(data);\n            // update the ID if it's not set..\n            if (record.data.id * 1 < 1) {\n                record.set('id', res.data.id);\n            }\n        }\n    });\n    \n}",
                                                  "beforeload" : "function (_self, options)\n{\n\n    var s =     _this.egrid.getSelectionModel().getSelectedCell();\n    \n\n    if (!s) {\n        return false;\n    }\n    var d = _this.egrid.dataSource.getAt(s[0]);\n    \n    options.params.etype = d.data.name;\n    if (!options.params.etype.length) {\n        return false;\n    }\n}"
                                              },
                                              "xtype" : "Store",
                                                  },
                                                  {
                                                      "listeners" : {
-                                                         "click" : "function (_self, e)\n{\n\n  var s =     _this.egrid.getSelectionModel().getSelectedCell();\n    \n\n    if (!s) {\n        Roo.MessageBox.alert(\"Error\", \"Select a pulldown\");\n    }\n    \n    var d = _this.egrid.dataSource.getAt(s[0]);\n \n\n    var etype = d.data.name;\n    \n    if(!etype.length){\n        Roo.MessageBox.alert('Error', 'Please select a pulldown');\n        return;\n    }\n    \n    Pman.Dialog.Image.show(\n       {\n            _url : baseURL+'/Xtuple/Import/Enum?' + Roo.urlEncode({'etype' : etype})\n        \n       },\n       function () {\n            _this.grid.footer.onClick('first');\n       }\n   );\n}"
+                                                         "click" : "function (_self, e)\n{\n\n  var s =     _this.egrid.getSelectionModel().getSelectedCell();\n    \n\n    if (!s) {\n        Roo.MessageBox.alert(\"Error\", \"Select a pulldown\");\n    }\n    \n    var d = _this.egrid.dataSource.getAt(s[0]);\n \n\n    var etype = d.data.name;\n    \n    if(!etype.length){\n        Roo.MessageBox.alert('Error', 'Please select a pulldown');\n        return;\n    }\n    \n    Pman.Dialog.Image.show(\n       {\n            _url : baseURL+'/Admin/Import/Enum?' + Roo.urlEncode({'etype' : etype})\n        \n       },\n       function () {\n            _this.grid.footer.onClick('first');\n       }\n   );\n}"
                                                      },
-                                                     "text" : "Upload Value",
+                                                     "text" : "Upload Values",
                                                      "xtype" : "Button",
                                                      "$ xns" : "Roo.Toolbar"
                                                  }
diff --combined Pman.Tab.AdminEnum.js
@@@ -91,7 -91,7 +91,7 @@@ Pman.Tab.AdminEnum = new Roo.XComponent
                                                   method : 'POST',
                                                   params : {
                                                       id : record.data.id,
 -                                                     etype : _this.etypeCombo.getValue(),
 +                                                     etype : _this.grid.ds.getById(record.id).data.etype,
                                                       name : record.data.name,
                                                       active : record.data.active,
                                                       seqid : record.data.seqid,
                                          this.footer.onClick('first');
                                       }
                                   },
 +                              celldblclick : function (_self, rowIndex, columnIndex, e)
 +                                 {
 +                                     var rec = _this.egrid.ds.getAt(rowIndex);
 +                                     Pman.Dialog.AdminEnumType.show(rec.data,function(){
 +                                         
 +                                         _this.egrid.footer.onClick('first');
 +                                     });
 +                                 },
                                afteredit : function (e)
                                   {
                                      e.record.commit();     
                                                   method : 'POST',
                                                   params : {
                                                       id : record.data.id,
 -                                                     etype : _this.etypeCombo.getValue(),
 +                                                     etype : _this.grid.ds.getById(record.id).data.etype,
                                                       name : record.data.name,
                                                       active : record.data.active,
                                                       seqid : record.data.seqid,
                                      },
                                        {
                                          '|xns' : 'Roo.Toolbar',
-                                         text : "Upload Value",
+                                         text : "Upload Values",
                                          xtype : 'Button',
                                          xns : Roo.Toolbar,
                                          listeners : {
                                                       
                                                       Pman.Dialog.Image.show(
                                                          {
-                                                              _url : baseURL+'/Xtuple/Import/Enum?' + Roo.urlEncode({'etype' : etype})
+                                                              _url : baseURL+'/Admin/Import/Enum?' + Roo.urlEncode({'etype' : etype})
                                                           
                                                          },
                                                          function () {
  
                          },
                          '|xns' : 'Roo',
 +                        fitToframe : true,
                          background : false,
                          region : 'center',
 -                        fitToframe : true,
                          title : "Pulldown Options",
                          xtype : 'GridPanel',
                          xns : Roo,