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 'ea4788705e6873b424c65e91c2846b19' :"Cancel",
13 'e0aa021e21dddbd6d8cecec71e9cf564' :"OK"
19 show : function(data, cb)
27 this.dialog.show(this.data._el);
30 this.form.setValues(data);
31 this.form.fireEvent('actioncomplete', this.form, { type: 'setdata', data: data });
39 this.dialog = Roo.factory({
44 xtype : 'LayoutRegion'
53 title : _this._strings['518ad9ed87d3ca17e223a91604b464d5'],
56 xtype : 'LayoutDialog',
60 text : _this._strings['ea4788705e6873b424c65e91c2846b19'],
72 text : _this._strings['e0aa021e21dddbd6d8cecec71e9cf564'],
78 var name = _this.form.findField('name').getValue();
79 name = name.toUpperCase().replace(/[^A-Z]+/g, '');
81 Roo.MessageBox.alert("Error","Please fill in a valid name");
84 _this.form.findField('name').setValue(name);
86 _this.form.doAction('submit');
93 show : function (_self)
105 xtype : 'ContentPanel',
110 style : 'margin: 5px',
111 url : baseURL + '/Roo/core_enum.php',
115 actioncomplete : function (_self, action)
117 if (action.type == 'setdata') {
119 if((typeof(_this.data.etype) == 'undefined') || !_this.data.etype.length){
120 Roo.MessageBox.alert('Error', 'Missing etype');
126 _this.dialog.el.mask("Loading");
127 this.load({ method: 'GET', params: { '_id' : _this.data.id }});
132 if (action.type == 'load') {
133 _this.dialog.el.unmask();
136 if (action.type == 'submit' ) {
137 _this.dialog.el.unmask();
140 if (_this.callback) {
141 _this.callback.call(_this, action.result.data);
146 rendered : function (form)
154 actionMode : 'fieldEl',
166 fieldLabel : 'Display Name',
167 name : 'display_name',
172 keyup : function (_self, e)
174 _this.form.findField('name').setValue(this.getValue().replace(/[^a-z0-9]/ig, '').toUpperCase());
181 fieldLabel : 'Active',