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"
23 show : function(data, cb)
31 this.dialog.show(this.data._el);
34 this.form.setValues(data);
35 this.form.fireEvent('actioncomplete', this.form, { type: 'setdata', data: data });
43 this.dialog = Roo.factory({
50 title : _this._strings['518ad9ed87d3ca17e223a91604b464d5'] /* Add / Edit Core Enum */,
54 xtype : 'LayoutDialog',
56 show : function (_self)
65 xtype : 'LayoutRegion'
69 text : _this._strings['ea4788705e6873b424c65e91c2846b19'] /* Cancel */,
81 text : _this._strings['e0aa021e21dddbd6d8cecec71e9cf564'] /* OK */,
88 var name = _this.form.findField('name').getValue();
89 name = name.toUpperCase().replace(/[^A-Z]+/g, '');
91 Roo.MessageBox.alert("Error","Please fill in a valid name");
94 _this.form.findField('name').setValue(name);
96 _this.form.doAction('submit');
109 xtype : 'ContentPanel',
113 style : 'margin: 5px',
114 url : baseURL + '/Roo/core_enum.php',
119 actioncomplete : function (_self, action)
121 if (action.type == 'setdata') {
123 if((typeof(_this.data.etype) == 'undefined') || !_this.data.etype.length){
124 Roo.MessageBox.alert('Error', 'Missing etype');
129 if(typeof(_this.data.title) != 'undefined' && _this.data.title.length){
130 _this.dialog.setTitle(_this.data.title);
134 _this.dialog.el.mask("Loading");
135 this.load({ method: 'GET', params: { '_id' : _this.data.id }});
140 if (action.type == 'load') {
141 _this.dialog.el.unmask();
144 if (action.type == 'submit' ) {
145 _this.dialog.el.unmask();
148 if (_this.callback) {
149 _this.callback.call(_this, action.result.data);
154 rendered : function (form)
161 actionMode : 'fieldEl',
163 fieldLabel : _this._strings['49ee3087348e8d44e1feda1917443987'] /* Name */,
173 fieldLabel : _this._strings['b48968e1c912da07df5e8d6d246291ec'] /* Display Name */,
174 name : 'display_name',
180 keyup : function (_self, e)
182 _this.form.findField('name').setValue(this.getValue().replace(/[^a-z0-9]/ig, '').toUpperCase());
188 actionMode : 'fieldEl',
190 fieldLabel : _this._strings['4d3d769b812b6faa6b76e1a8abaece2d'] /* Active */,