PHP8
[Pman.BAdmin] / Pman.Dialog.BAdminCoreEnum.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.BAdminCoreEnum= function() {}
8 Roo.apply(Pman.Dialog.BAdminCoreEnum.prototype, {
9
10  _strings : {
11   'd5cf6a6c4887716d7a14a84d9ba81b02' :"Add / Edit Pulldown Option",
12   'b48968e1c912da07df5e8d6d246291ec' :"Display Name",
13   'ea4788705e6873b424c65e91c2846b19' :"Cancel",
14   '688a7766da608ca2b2fe6a7d1c0d7ccb' :"Sequence Number",
15   '49ee3087348e8d44e1feda1917443987' :"Name",
16   'c9cc8cce247e49bae79f15173ce97354' :"Save"
17  },
18
19  dialog : false,
20  callback:  false,
21
22  show : function(data, cb)
23  {
24   if (!this.dialog) {
25    this.create();
26   }
27
28   this.callback = cb;
29   this.data = data;
30   this.dialog.show(this.data._el);
31   if (this.form) {
32    this.form.reset();
33    this.form.setValues(data);
34    this.form.fireEvent('actioncomplete', this.form,  { type: 'setdata', data: data });
35   }
36
37  },
38
39  create : function()
40  {
41   var _this = this;
42   this.dialog = Roo.factory({
43     xtype : 'Modal',
44     cls : 'enable-overflow',
45     title : _this._strings['d5cf6a6c4887716d7a14a84d9ba81b02'] /* Add / Edit Pulldown Option */,
46     xns : Roo.bootstrap,
47     '|xns' : 'Roo.bootstrap',
48     buttons : [
49      {
50       xtype : 'Button',
51       html : _this._strings['ea4788705e6873b424c65e91c2846b19'] /* Cancel */,
52       listeners : {
53        click : function (_self, e)
54         {
55             _this.dialog.hide(); 
56         }
57       },
58       xns : Roo.bootstrap,
59       '|xns' : 'Roo.bootstrap'
60      },
61      {
62       xtype : 'Button',
63       html : _this._strings['c9cc8cce247e49bae79f15173ce97354'] /* Save */,
64       weight : 'primary',
65       listeners : {
66        click : function (_self, e)
67         {
68             _this.form.doAction("submit");
69             
70             return;
71         }
72       },
73       xns : Roo.bootstrap,
74       '|xns' : 'Roo.bootstrap'
75      }
76     ],
77     items  : [
78      {
79       xtype : 'Form',
80       labelAlign : 'top',
81       loadMask : true,
82       url : baseURL + '/Roo/Core_enum',
83       listeners : {
84        actioncomplete : function (_self, action)
85         {
86             if(action.type == 'setdata') {
87             
88                if(_this.data.id * 1 > 0) {
89                     
90                     this.doAction('load',{ method: 'GET', params: { '_id' : _this.data.id }});
91                 } 
92                 
93                 return;
94             }
95            
96             if (action.type == 'load') {
97             
98                 _this.data = action.result.data;
99                 
100                 return;
101             }
102             
103             
104             if (action.type == 'submit') {
105             
106                 _this.dialog.hide();
107                
108                 if (_this.callback) {
109                     _this.callback.call(this, action.result.data);
110                 }
111                 
112                 return; 
113             }
114         },
115        actionfailed : function (_self, action)
116         {
117             Roo.bootstrap.MessageBox.alert('Error', action.result.errorMsg);
118         },
119        render : function (_self)
120         {
121             _this.form = _self;
122         }
123       },
124       xns : Roo.bootstrap,
125       '|xns' : 'Roo.bootstrap',
126       items  : [
127        {
128         xtype : 'Input',
129         fieldLabel : _this._strings['49ee3087348e8d44e1feda1917443987'] /* Name */,
130         name : 'name',
131         xns : Roo.bootstrap,
132         '|xns' : 'Roo.bootstrap'
133        },
134        {
135         xtype : 'Input',
136         fieldLabel : _this._strings['b48968e1c912da07df5e8d6d246291ec'] /* Display Name */,
137         name : 'display_name',
138         xns : Roo.bootstrap,
139         '|xns' : 'Roo.bootstrap'
140        },
141        {
142         xtype : 'Input',
143         fieldLabel : _this._strings['688a7766da608ca2b2fe6a7d1c0d7ccb'] /* Sequence Number */,
144         inputType : 'number',
145         name : 'seqid',
146         xns : Roo.bootstrap,
147         '|xns' : 'Roo.bootstrap'
148        },
149        {
150         xtype : 'CheckBox',
151         boxLabel : 'Active',
152         checked : true,
153         inputValue : 1,
154         valueOff : 0,
155         xns : Roo.bootstrap,
156         '|xns' : 'Roo.bootstrap'
157        },
158        {
159         xtype : 'Input',
160         inputType : 'hidden',
161         name : 'id',
162         xns : Roo.bootstrap,
163         '|xns' : 'Roo.bootstrap'
164        },
165        {
166         xtype : 'Input',
167         inputType : 'hidden',
168         name : 'etype',
169         xns : Roo.bootstrap,
170         '|xns' : 'Roo.bootstrap'
171        }
172       ]
173      }
174     ]
175    }  );
176  }
177 });
178 Roo.apply(Pman.Dialog.BAdminCoreEnum, Pman.Dialog.BAdminCoreEnum.prototype);