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.AdminPerson = {
10 'ce8ae9da5b7cd6c3df2929543a9af92d' :"Email",
11 '7573b7fd7836c9118dbfb69f3abf3858' :"Change / Set Password",
12 'abb1d799e06329cb0c38276ea918300b' :"Secure passwords",
13 '2b0d7f748b64304e6657207cb03cd8f2' :"Edit / Create Staff Details",
14 '7e17f8478e121357b78646ca5b5d5ac9' :"Displaying Settings {0} - {1} of {2}",
15 'bcc254b55c4a1babdf1dcb82c207506b' :"Phone",
16 '1243daf593fa297e07ab03bf06d925af' :"Searching...",
17 '3544848f820b9d94a3f3871a382cf138' :"New password",
18 '689202409e48743b914713f96d93947c' :"Value",
19 '8a25a3ae30ab6e8ceb5b8c4009a3336f' :"Role / Position",
20 'be5f40c0d2692cf4e9f8be8d389737a5' :"Department / Office",
21 '315fce99b77b7f392bf68d5eb14f88c7' :"Password (type again to confirm)",
22 'ea4788705e6873b424c65e91c2846b19' :"Cancel",
23 'e4709a73a287a5f033f5b1b5142cb74d' :"System Settings",
24 '49ee3087348e8d44e1feda1917443987' :"Name",
25 'a5da1d5de4f3a80e2acf5227283c630d' :"Staff Details",
26 'c373dd4bd4ba0b5d3e0c7522c5629880' :"Select Office",
27 '662de0725ac8055bff7edae51fbf3c78' :"No Settings Found",
28 'f2a6c498fb90ee345d997f888fce3b18' :"Delete",
29 'e55f75a29310d7b60f7ac1d390c8ae42' :"Module",
30 'b5a7adde1af5c87d7fd797b6245c2a39' :"Description",
31 'c9cc8cce247e49bae79f15173ce97354' :"Save"
34 'secure_password_fieldLabel' : 'abb1d799e06329cb0c38276ea918300b' /* Secure passwords */ ,
35 'role_fieldLabel' : '8a25a3ae30ab6e8ceb5b8c4009a3336f' /* Role / Position */ ,
36 'name_fieldLabel' : '49ee3087348e8d44e1feda1917443987' /* Name */ ,
37 'office_id_name_emptyText' : 'be5f40c0d2692cf4e9f8be8d389737a5' /* Department / Office */ ,
38 'phone_fieldLabel' : 'bcc254b55c4a1babdf1dcb82c207506b' /* Phone */ ,
39 'passwd1_fieldLabel' : '315fce99b77b7f392bf68d5eb14f88c7' /* Password (type again to confirm) */ ,
40 'office_id_name_fieldLabel' : 'be5f40c0d2692cf4e9f8be8d389737a5' /* Department / Office */ ,
41 'office_id_name_loadingText' : '1243daf593fa297e07ab03bf06d925af' /* Searching... */ ,
42 'email_fieldLabel' : 'ce8ae9da5b7cd6c3df2929543a9af92d' /* Email */ ,
43 'office_id_name_qtip' : 'c373dd4bd4ba0b5d3e0c7522c5629880' /* Select Office */
49 show : function(data, cb)
57 this.dialog.show.apply(this.dialog, Array.prototype.slice.call(arguments).slice(2));
60 this.form.setValues(data);
61 this.form.fireEvent('actioncomplete', this.form, { type: 'setdata', data: data });
69 this.dialog = Roo.factory({
70 xtype : 'LayoutDialog',
76 title : _this._strings['2b0d7f748b64304e6657207cb03cd8f2'] /* Edit / Create Staff Details */,
81 xtype : 'LayoutRegion',
88 text : _this._strings['ea4788705e6873b424c65e91c2846b19'] /* Cancel */,
90 click : function (_self, e)
100 text : _this._strings['c9cc8cce247e49bae79f15173ce97354'] /* Save */,
102 click : function (_self, e)
105 if (_this.form.findField('passwd1')) {
107 var p1 = _this.form.findField('passwd1').getValue();
108 var p2 = _this.form.findField('passwd2').getValue();
110 if (_this.sendAfterSave && !p1.length) {
111 Roo.MessageBox.alert("Error", "You must create a password to send introduction mail");
115 if (Pman.Login.authUser.id < 0 && !p1.length) {
116 Roo.MessageBox.alert("Error", "You must create a password for the admin account");
121 if (p1.length || p2.length) {
123 Roo.MessageBox.alert("Error", "Passwords do not match");
132 _this.form.doAction("submit");
142 xtype : 'ContentPanel',
144 title : _this._strings['a5da1d5de4f3a80e2acf5227283c630d'] /* Staff Details */,
152 style : 'margin:10px;',
153 url : baseURL + '/Roo/core_person',
155 actioncomplete : function(_self,action)
157 if (action.type == 'setdata') {
158 _this.dialog.layout.getRegion('center').showPanel(0);
159 //_this.dialog.el.mask("Loading");
160 if ( _this.data.id* 1 > 0) {
161 this.load({ method: 'GET', params: { '_id' : _this.data.id }});
164 this.findField('company_id').setValue(Pman.Login.authUser.company_id);
167 if (action.type == 'load') {
168 _this.dialog.el.unmask();
171 if (action.type =='submit') {
173 _this.dialog.el.unmask();
176 if (_this.callback) {
177 _this.callback.call(_this, _this.form.getValues());
183 rendered : function (form)
194 fieldLabel : _this._strings['49ee3087348e8d44e1feda1917443987'] /* Name */,
203 fieldLabel : _this._strings['ce8ae9da5b7cd6c3df2929543a9af92d'] /* Email */,
211 fieldLabel : _this._strings['8a25a3ae30ab6e8ceb5b8c4009a3336f'] /* Role / Position */,
219 fieldLabel : _this._strings['bcc254b55c4a1babdf1dcb82c207506b'] /* Phone */,
234 displayField : 'name',
236 emptyText : _this._strings['be5f40c0d2692cf4e9f8be8d389737a5'] /* Department / Office */,
237 fieldLabel : _this._strings['be5f40c0d2692cf4e9f8be8d389737a5'] /* Department / Office */,
238 forceSelection : true,
239 hiddenName : 'office_id',
241 loadingText : _this._strings['1243daf593fa297e07ab03bf06d925af'] /* Searching... */,
243 name : 'office_id_name',
245 qtip : _this._strings['c373dd4bd4ba0b5d3e0c7522c5629880'] /* Select Office */,
246 queryParam : 'query[name]',
247 selectOnFocus : true,
248 tpl : '<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>',
249 triggerAction : 'all',
254 beforequery : function (combo, query, forceAll, cancel, e)
256 var coid = _this.form.findField('company_id').getValue();
258 Ext.MessageBox.alert("Error", "Select An Company First");
268 sortInfo : { direction : 'ASC', field: 'id' },
270 beforeload : function (_self, o){
271 o.params = o.params || {};
272 var coid = _this.form.findField('company_id').getValue();
273 o.params.company_id = coid;
281 url : baseURL + '/Roo/core_office',
286 xtype : 'JsonReader',
287 fields : [{"name":"id","type":"int"},{"name":"name","type":"string"}],
290 totalProperty : 'total',
305 legend : _this._strings['7573b7fd7836c9118dbfb69f3abf3858'] /* Change / Set Password */,
306 style : 'width:370px',
311 xtype : 'SecurePass',
312 fieldLabel : _this._strings['3544848f820b9d94a3f3871a382cf138'] /* New password */,
313 inputType : 'password',
322 fieldLabel : _this._strings['315fce99b77b7f392bf68d5eb14f88c7'] /* Password (type again to confirm) */,
323 inputType : 'password',
332 fieldLabel : _this._strings['abb1d799e06329cb0c38276ea918300b'] /* Secure passwords */,
334 name : 'secure_password',
337 check : function (_self, checked)
339 this.form.findField('passwd1').insecure = false;
342 this.form.findField('passwd1').insecure = true;
361 title : _this._strings['e4709a73a287a5f033f5b1b5142cb74d'] /* System Settings */,
363 activate : function() {
367 _this.grid.footer.onClick('first');
375 autoExpandColumn : 'data',
381 //_this.dialog = Pman.Dialog.FILL_IN
382 if (_this.panel.active) {
383 this.footer.onClick('first');
386 rowdblclick : function (_self, rowIndex, e)
391 _this.dialog.show( this.getDataSource().getAt(rowIndex).data, function() {
392 _this.grid.footer.onClick('refresh');
399 xtype : 'PagingToolbar',
401 displayMsg : _this._strings['7e17f8478e121357b78646ca5b5d5ac9'] /* Displaying Settings {0} - {1} of {2} */,
402 emptyMsg : _this._strings['662de0725ac8055bff7edae51fbf3c78'] /* No Settings Found */,
415 '|xns' : 'Roo.Toolbar'
419 cls : 'x-btn-text-icon',
420 icon : rootURL + '/Pman/templates/images/trash.gif',
421 text : _this._strings['f2a6c498fb90ee345d997f888fce3b18'] /* Delete */,
425 Pman.genericDelete(_this, 'core_person_settings');
429 '|xns' : 'Roo.Toolbar'
436 sortInfo : { field : 'name', direction: 'ASC' },
438 beforeload : function (_self, o)
441 o.params = o.params ? o.params : {};
442 o.params.person_id = _this.form.findField('id').getValue();
452 url : baseURL + '/Roo/core_person_settings',
457 xtype : 'JsonReader',
460 totalProperty : 'total',
466 xtype : 'RowSelectionModel',
469 afterselectionchange : function (_self)
471 // load project members.
479 xtype : 'ColumnModel',
481 header : _this._strings['e55f75a29310d7b60f7ac1d390c8ae42'] /* Module */,
488 xtype : 'ColumnModel',
489 dataIndex : 'description',
490 header : _this._strings['b5a7adde1af5c87d7fd797b6245c2a39'] /* Description */,
491 renderer : function(v) { return String.format('{0}', v); },
498 xtype : 'ColumnModel',
500 header : _this._strings['689202409e48743b914713f96d93947c'] /* Value */,
501 renderer : function(v) { return String.format('{0}', v); },