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 'c4ca4238a0b923820dcc509a6f75849b' :"1",
13 'ea4788705e6873b424c65e91c2846b19' :"Cancel",
14 'e0aa021e21dddbd6d8cecec71e9cf564' :"OK"
20 show : function(data, cb)
28 this.dialog.show(this.data._el);
31 this.form.setValues(data);
32 this.form.fireEvent('actioncomplete', this.form, { type: 'setdata', data: data });
40 this.dialog = Roo.factory({
45 xtype : 'LayoutRegion'
54 title : _this._strings['518ad9ed87d3ca17e223a91604b464d5'],
57 xtype : 'LayoutDialog',
61 text : _this._strings['ea4788705e6873b424c65e91c2846b19'],
73 text : _this._strings['e0aa021e21dddbd6d8cecec71e9cf564'],
79 var name = _this.form.findField('name').getValue();
80 name = name.toUpperCase().replace(/[^A-Z]+/g, '');
82 Roo.MessageBox.alert("Error","Please fill in a valid name");
85 _this.form.findField('name').setValue(name);
87 _this.form.doAction('submit');
94 show : function (_self)
106 xtype : 'ContentPanel',
111 style : 'margin: 5px',
112 url : baseURL + '/Roo/core_enum.php',
116 actioncomplete : function (_self, action)
118 if (action.type == 'setdata') {
120 if((typeof(_this.data.etype) == 'undefined') || !_this.data.etype.length){
121 Roo.MessageBox.alert('Error', 'Missing etype');
126 if(typeof(_this.data.title) != 'undefined' && _this.data.title.length){
127 _this.dialog.setTitle(_this.data.title);
131 _this.dialog.el.mask("Loading");
132 this.load({ method: 'GET', params: { '_id' : _this.data.id }});
137 if (action.type == 'load') {
138 _this.dialog.el.unmask();
141 if (action.type == 'submit' ) {
142 _this.dialog.el.unmask();
145 if (_this.callback) {
146 _this.callback.call(_this, action.result.data);
151 rendered : function (form)
159 actionMode : 'fieldEl',
171 fieldLabel : 'Display Name',
172 name : 'display_name',
177 keyup : function (_self, e)
179 _this.form.findField('name').setValue(this.getValue().replace(/[^a-z0-9]/ig, '').toUpperCase());
186 actionMode : 'fieldEl',
188 fieldLabel : 'Active',