Pman.Dialog.AdminCoreEnum.bjs
authorAlan Knowles <alan@roojs.com>
Tue, 15 Oct 2013 07:28:43 +0000 (15:28 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 15 Oct 2013 07:28:43 +0000 (15:28 +0800)
Pman.Dialog.AdminCoreEnum.js

Pman.Dialog.AdminCoreEnum.bjs
Pman.Dialog.AdminCoreEnum.js

index f75f7bc..a050e87 100644 (file)
@@ -50,7 +50,7 @@
                                 {
                                     "listeners": {
                                         "beforeload": "function (_self, options)\n{\n\n    options.params.etype = _this.data.etype;\n    if (!options.params.etype.length) {\n        return false;\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.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}"
+                                        "update": "function (_self, record, operation)\n{\n    if (operation != Roo.data.Record.COMMIT) {\n        return;\n    }\n    \n    var name = record.data.name;\n    if (typeof(_this.data._hide_name) != 'undefined') {\n        name =  record.data.display_name;\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.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}"
                                     },
                                     "*prop": "dataSource",
                                     "remoteSort": true,
index 188dbd1..479f322 100644 (file)
@@ -122,6 +122,11 @@ Pman.Dialog.AdminCoreEnum = {
                                     if (operation != Roo.data.Record.COMMIT) {
                                         return;
                                     }
+                                    
+                                    var name = record.data.name;
+                                    if (typeof(_this.data._hide_name) != 'undefined') {
+                                        name =  record.data.display_name;
+                                    }
                                     // got commit..
                                     new Pman.Request({
                                         url : baseURL + '/Roo/Core_enum.php',