Pman.Dialog.CoreEnum.bjs
authorEdward <edward@roojs.com>
Thu, 3 Apr 2014 05:16:54 +0000 (13:16 +0800)
committerEdward <edward@roojs.com>
Thu, 3 Apr 2014 05:16:54 +0000 (13:16 +0800)
Pman.Dialog.CoreEnum.js

Pman.Dialog.CoreEnum.bjs
Pman.Dialog.CoreEnum.js

index 9531b7e..a0b59b0 100644 (file)
@@ -56,6 +56,9 @@
                                     "|xns": "Roo.form"
                                 },
                                 {
+                                    "listeners": {
+                                        "keyup": "function (_self, e)\n{\n    _this.form.findField('name').setValue(this.getValue().replace(/[^a-z0-9]/ig, '').toUpperCase());\n    \n}"
+                                    },
                                     "allowBlank": false,
                                     "fieldLabel": "Display Name",
                                     "name": "display_name",
index 87155e2..7bc612e 100644 (file)
@@ -109,6 +109,13 @@ Pman.Dialog.CoreEnum = {
                                 {
                                     xtype: 'TextField',
                                     xns: Roo.form,
+                                    listeners : {
+                                        keyup : function (_self, e)
+                                        {
+                                            _this.form.findField('name').setValue(this.getValue().replace(/[^a-z0-9]/ig, '').toUpperCase());
+                                            
+                                        }
+                                    },
                                     allowBlank : false,
                                     fieldLabel : 'Display Name',
                                     name : 'display_name',