fix conflict
[Pman.Admin] / Pman.Dialog.AdminEnumType.js
1 //<script type="text/javascript">
2
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
4
5 Roo.namespace('Pman.Dialog');
6
7 Pman.Dialog.AdminEnumType = {
8
9     dialog : false,
10     callback:  false,
11
12     show : function(data, cb)
13     {
14         if (!this.dialog) {
15             this.create();
16         }
17
18         this.callback = cb;
19         this.data = data;
20         this.dialog.show(this.data._el);
21         if (this.form) {
22            this.form.reset();
23            this.form.setValues(data);
24            this.form.fireEvent('actioncomplete', this.form,  { type: 'setdata', data: data });
25         }
26
27     },
28
29     create : function()
30     {
31         var _this = this;
32         this.dialog = Roo.factory({
33             center
34  : {
35                 '|xns' : 'Roo',
36                 xtype : 'LayoutRegion',
37                 xns : Roo
38             },
39             '|xns' : 'Roo',
40             modal : true,
41             width : 480,
42             xtype : 'LayoutDialog',
43             height : 160,
44             resizable : false,
45             xns : Roo,
46             title : "Edit",
47             buttons : [
48                  {
49                         '|xns' : 'Roo',
50                         xtype : 'Button',
51                         text : "Save",
52                         xns : Roo,
53                         listeners : {
54                                 click : function (_self, e)
55                                    {
56                                        //this.url = baseURL + '/Roo/Core_enum.php';
57                                        //_this.dialog.el.mask("Saving");
58                                        _this.form.doAction("submit");
59                                    }
60                         }
61                     },
62 {
63                         '|xns' : 'Roo',
64                         xtype : 'Button',
65                         text : "Cancel",
66                         xns : Roo,
67                         listeners : {
68                                 click : function (_self, e)
69                                    {
70                                        _this.dialog.hide();
71                                    }
72                         }
73                     }
74             ],
75             items : [
76                 {
77                     '|xns' : 'Roo',
78                     xtype : 'ContentPanel',
79                     region : 'center',
80                     xns : Roo,
81                     items : [
82                         {
83                             '|xns' : 'Roo.form',
84                             url : baseURL + '/Roo/Core_enum',
85                             xtype : 'Form',
86                             xns : Roo.form,
87                             listeners : {
88                                 rendered : function (form)
89                                    {
90                                        _this.form = this;
91                                    },
92                                 actioncomplete : function (_self, action)
93                                    {
94                                        if(action.type == 'submit'){
95                                            _this.dialog.hide();
96                                        }
97                                    }
98                             },
99                             items : [
100                                 {
101                                     '|xns' : 'Roo.form',
102                                     name : 'name',
103                                     width : 270,
104                                     xtype : 'TextField',
105                                     fieldLabel : 'Name',
106                                     xns : Roo.form
107                                 },
108                                 {
109                                     '|xns' : 'Roo.form',
110                                     name : 'id',
111                                     xtype : 'Hidden',
112                                     xns : Roo.form
113                                 },
114                                 {
115                                     '|xns' : 'Roo.form',
116                                     name : 'etype',
117                                     xtype : 'Hidden',
118                                     xns : Roo.form
119                                 },
120                                 {
121                                     '|xns' : 'Roo.form',
122                                     name : 'display_name',
123                                     width : 270,
124                                     xtype : 'TextField',
125                                     fieldLabel : 'Display Name',
126                                     xns : Roo.form
127                                 }
128                             ]
129
130                         }
131                     ]
132
133                 }
134             ]
135
136         });
137     }
138 };