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.BAdminGroups= function() {}
8 Roo.apply(Pman.Dialog.BAdminGroups.prototype, {
11 'ea4788705e6873b424c65e91c2846b19' :"Cancel",
12 '106eefbc3cdf294434c52c2638ce28df' :"Add / Edit Group",
13 '49ee3087348e8d44e1feda1917443987' :"Name",
14 'c9cc8cce247e49bae79f15173ce97354' :"Save"
17 'display_name_placeholder' : '49ee3087348e8d44e1feda1917443987' /* Name */
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({
45 cls : 'enable-overflow padding-bottom-trim',
46 title : _this._strings['106eefbc3cdf294434c52c2638ce28df'] /* Add / Edit Group */,
48 '|xns' : 'Roo.bootstrap',
52 html : _this._strings['ea4788705e6873b424c65e91c2846b19'] /* Cancel */,
54 click : function (_self, e)
60 '|xns' : 'Roo.bootstrap'
64 html : _this._strings['c9cc8cce247e49bae79f15173ce97354'] /* Save */,
67 click : function (_self, e)
69 if(!_this.form.isValid()){
70 Roo.bootstrap.MessageBox.alert('Error', 'Please Correct all the errors in red');
74 _this.form.doAction("submit");
80 '|xns' : 'Roo.bootstrap'
87 url : baseURL + '/Roo/Core_group',
89 actioncomplete : function (_self, action)
91 if(action.type == 'setdata'){
92 _this.dialog.setTitle("Create Group");
93 if(_this.data.id * 1 > 0) {
94 this.doAction('load',{ method: 'GET', params: { '_id' : _this.data.id }});
95 _this.dialog.setTitle("Edit Group");
101 if (action.type == 'load') {
102 _this.data = action.result.data;
104 if(!_this.data.display_name.length){
105 _this.form.findField('display_name').setValue(_this.data.name);
111 if (action.type == 'submit') {
115 if (_this.callback) {
116 _this.callback.call(this, action.result.data);
122 actionfailed : function (_self, action)
125 Roo.bootstrap.MessageBox.alert('Error', action.result.errorMsg);
127 render : function (_self)
133 '|xns' : 'Roo.bootstrap',
137 name : 'display_name',
138 placeholder : _this._strings['49ee3087348e8d44e1feda1917443987'] /* Name */,
140 '|xns' : 'Roo.bootstrap'
144 inputType : 'hidden',
147 '|xns' : 'Roo.bootstrap'
155 Roo.apply(Pman.Dialog.BAdminGroups, Pman.Dialog.BAdminGroups.prototype);