Pman.Dialog.CoreEnum.bjs
[Pman.Core] / Pman.Dialog.CoreEnum.js
index 2015dfd..3725579 100644 (file)
@@ -56,19 +56,13 @@ Pman.Dialog.CoreEnum = {
                             xtype: 'Form',
                             xns: Roo.form,
                             listeners : {
-                                actionfailed : function (_self, action)
-                                {
-                                    _this.dialog.el.unmask(); 
-                                    Pman.standardActionFailed(_self, action);
-                                },
                                 actioncomplete : function (_self, action)
                                 {
                                   if (action.type == 'setdata') {
-                                       //_this.dialog.el.mask("Loading");
-                                       //this.load({ method: 'GET', params: { '_id' : _this.data.id }});
-                                       
-                                       // this is 'new' only!!!
-                                
+                                        if(_this.data.id){
+                                            _this.dialog.el.mask("Loading");
+                                            this.load({ method: 'GET', params: { '_id' : _this.data.id }}); 
+                                        }
                                        
                                        return;
                                     }
@@ -111,6 +105,11 @@ Pman.Dialog.CoreEnum = {
                                     name : 'display_name',
                                     width : 200
                                 },
+                                {
+                                    xtype: 'Hidden',
+                                    xns: Roo.form,
+                                    name : 'id'
+                                },
                                 {
                                     xtype: 'Hidden',
                                     xns: Roo.form,
@@ -130,13 +129,13 @@ Pman.Dialog.CoreEnum = {
                 {
                     xtype: 'Button',
                     xns: Roo,
-                    text : "Cancel",
                     listeners : {
                         click : function() {
                             _this.form.reset();
                             _this.dialog.hide();
                         }
-                    }
+                    },
+                    text : "Cancel"
                 },
                 {
                     xtype: 'Button',