sync
[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  _strings : {
10   '7dce122004969d56ae2e0245cb754d35' :"Edit",
11   'b48968e1c912da07df5e8d6d246291ec' :"Display Name",
12   'ea4788705e6873b424c65e91c2846b19' :"Cancel",
13   '49ee3087348e8d44e1feda1917443987' :"Name",
14   'c9cc8cce247e49bae79f15173ce97354' :"Save"
15  },
16  _named_strings : {
17   'display_name_fieldLabel' : 'b48968e1c912da07df5e8d6d246291ec' /* Display Name */ ,
18   'name_fieldLabel' : '49ee3087348e8d44e1feda1917443987' /* Name */ 
19  },
20
21  dialog : false,
22  callback:  false,
23
24  show : function(data, cb)
25  {
26   if (!this.dialog) {
27    this.create();
28   }
29
30   this.callback = cb;
31   this.data = data;
32   this.dialog.show(this.data._el);
33   if (this.form) {
34    this.form.reset();
35    this.form.setValues(data);
36    this.form.fireEvent('actioncomplete', this.form,  { type: 'setdata', data: data });
37   }
38
39  },
40
41  create : function()
42  {
43    var _this = this;
44    this.dialog = Roo.factory({
45     xtype : 'LayoutDialog',
46     height : 160,
47     modal : true,
48     resizable : false,
49     title : _this._strings['7dce122004969d56ae2e0245cb754d35'] /* Edit */,
50     width : 480,
51     xns : Roo,
52     '|xns' : 'Roo',
53     center
54  : {
55      xtype : 'LayoutRegion',
56      xns : Roo,
57      '|xns' : 'Roo'
58     },
59     buttons : [
60      {
61       xtype : 'Button',
62       text : _this._strings['c9cc8cce247e49bae79f15173ce97354'] /* Save */,
63       listeners : {
64        click : function (_self, e)
65         {
66             //this.url = baseURL + '/Roo/Core_enum.php';
67             //_this.dialog.el.mask("Saving");
68             _this.form.doAction("submit");
69         }
70       },
71       xns : Roo,
72       '|xns' : 'Roo'
73      },
74      {
75       xtype : 'Button',
76       text : _this._strings['ea4788705e6873b424c65e91c2846b19'] /* Cancel */,
77       listeners : {
78        click : function (_self, e)
79         {
80             _this.dialog.hide();
81         }
82       },
83       xns : Roo,
84       '|xns' : 'Roo'
85      }
86     ],
87     items  : [
88      {
89       xtype : 'ContentPanel',
90       region : 'center',
91       xns : Roo,
92       '|xns' : 'Roo',
93       items  : [
94        {
95         xtype : 'Form',
96         url : baseURL + '/Roo/Core_enum',
97         listeners : {
98          actioncomplete : function (_self, action)
99           {
100               if(action.type == 'submit'){
101                   _this.dialog.hide();
102                   
103                   if(_this.callback){
104                       _this.callback.call(_this, _this.form.getValues());
105                   }
106                   return
107               }
108           },
109          rendered : function (form)
110           {
111               _this.form = this;
112           }
113         },
114         xns : Roo.form,
115         '|xns' : 'Roo.form',
116         items  : [
117          {
118           xtype : 'TextField',
119           allowBlank : false,
120           fieldLabel : _this._strings['49ee3087348e8d44e1feda1917443987'] /* Name */,
121           name : 'name',
122           width : 270,
123           xns : Roo.form,
124           '|xns' : 'Roo.form'
125          },
126          {
127           xtype : 'Hidden',
128           name : 'id',
129           xns : Roo.form,
130           '|xns' : 'Roo.form'
131          },
132          {
133           xtype : 'Hidden',
134           name : 'etype',
135           xns : Roo.form,
136           '|xns' : 'Roo.form'
137          },
138          {
139           xtype : 'TextField',
140           fieldLabel : _this._strings['b48968e1c912da07df5e8d6d246291ec'] /* Display Name */,
141           name : 'display_name',
142           width : 270,
143           xns : Roo.form,
144           '|xns' : 'Roo.form'
145          }
146         ]
147        }
148       ]
149      }
150     ]
151    });
152  }
153 };