1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 Roo.namespace('Pman.Dialog');
7 Pman.Dialog.CoreEnum = {
10 '518ad9ed87d3ca17e223a91604b464d5' :"Add / Edit Core Enum",
11 'cfcd208495d565ef66e7dff9f98764da' :"0",
12 'b48968e1c912da07df5e8d6d246291ec' :"Display Name",
13 'c4ca4238a0b923820dcc509a6f75849b' :"1",
14 'ea4788705e6873b424c65e91c2846b19' :"Cancel",
15 '49ee3087348e8d44e1feda1917443987' :"Name",
16 '4d3d769b812b6faa6b76e1a8abaece2d' :"Active",
17 'e0aa021e21dddbd6d8cecec71e9cf564' :"OK"
20 'display_name_fieldLabel' : 'b48968e1c912da07df5e8d6d246291ec' /* Display Name */ ,
21 'seqid_value' : 'cfcd208495d565ef66e7dff9f98764da' /* 0 */ ,
22 'name_fieldLabel' : '49ee3087348e8d44e1feda1917443987' /* Name */ ,
23 'active_fieldLabel' : '4d3d769b812b6faa6b76e1a8abaece2d' /* Active */ ,
24 'active_value' : 'c4ca4238a0b923820dcc509a6f75849b' /* 1 */
30 show : function(data, cb)
38 this.dialog.show.apply(this.dialog, Array.prototype.slice.call(arguments).slice(2));
41 this.form.setValues(data);
42 this.form.fireEvent('actioncomplete', this.form, { type: 'setdata', data: data });
50 this.dialog = Roo.factory({
51 xtype : 'LayoutDialog',
58 title : _this._strings['518ad9ed87d3ca17e223a91604b464d5'] /* Add / Edit Core Enum */,
61 show : function (_self)
69 xtype : 'LayoutRegion',
77 text : _this._strings['ea4788705e6873b424c65e91c2846b19'] /* Cancel */,
89 text : _this._strings['e0aa021e21dddbd6d8cecec71e9cf564'] /* OK */,
93 var name = _this.form.findField('name').getValue();
94 name = name.toUpperCase().replace(/[^A-Z0-9]+/g, '');
96 Roo.MessageBox.alert("Error","Please fill in a valid name");
99 _this.form.findField('name').setValue(name);
101 _this.form.doAction('submit');
111 xtype : 'ContentPanel',
121 style : 'margin: 5px',
122 url : baseURL + '/Roo/core_enum.php',
124 actioncomplete : function (_self, action)
126 if (action.type == 'setdata') {
128 if((typeof(_this.data.etype) == 'undefined') || !_this.data.etype.length){
129 Roo.MessageBox.alert('Error', 'Missing etype');
134 if(typeof(_this.data.title) != 'undefined' && _this.data.title.length){
135 _this.dialog.setTitle(_this.data.title);
139 _this.dialog.el.mask("Loading");
140 this.load({ method: 'GET', params: { '_id' : _this.data.id }});
145 if (action.type == 'load') {
146 _this.dialog.el.unmask();
149 if (action.type == 'submit' ) {
150 _this.dialog.el.unmask();
153 if (_this.callback) {
154 _this.callback.call(_this, action.result.data);
159 rendered : function (form)
169 actionMode : 'fieldEl',
171 fieldLabel : _this._strings['49ee3087348e8d44e1feda1917443987'] /* Name */,
181 fieldLabel : _this._strings['b48968e1c912da07df5e8d6d246291ec'] /* Display Name */,
182 name : 'display_name',
185 keyup : function (_self, e)
187 _this.form.findField('name').setValue(this.getValue().replace(/[^a-z0-9]/ig, '').toUpperCase());
196 actionMode : 'fieldEl',
198 fieldLabel : _this._strings['4d3d769b812b6faa6b76e1a8abaece2d'] /* Active */,