/**
-* A generic Login Dialog..... - only one needed in theory!?!?
-*
-* Fires XComponent builder on success...
-*
-* Sends
-* username,password, lang = for login actions.
-* check = 1 for periodic checking that sesion is valid.
-* passwordRequest = email request password
-* logout = 1 = to logout
-*
-* Affects: (this id="????" elements)
-* loading (removed) (used to indicate application is loading)
-* loading-mask (hides) (used to hide application when it's building loading)
-*
-*
-* Usage:
-*
-*
-* Myapp.login = Roo.Login({
- url: xxxx,
-
- realm : 'Myapp',
-
-
- method : 'POST',
-
-
- *
-})
-*
-*
-*
-* Ext.apply(_T, _T[lang]);
-*
-**/
+ * @class Roo.Login
+ * @extends Roo.LayoutDialog
+ * A generic Login Dialog..... - only one needed in theory!?!?
+ *
+ * Fires XComponent builder on success...
+ *
+ * Sends
+ * username,password, lang = for login actions.
+ * check = 1 for periodic checking that sesion is valid.
+ * passwordRequest = email request password
+ * logout = 1 = to logout
+ *
+ * Affects: (this id="????" elements)
+ * loading (removed) (used to indicate application is loading)
+ * loading-mask (hides) (used to hide application when it's building loading)
+ *
+ *
+ * Usage:
+ *
+ *
+ * Myapp.login = Roo.Login({
+ url: xxxx,
+
+ realm : 'Myapp',
+
+
+ method : 'POST',
+
+
+ *
+ })
+ *
+ *
+ *
+ **/
Roo.Login = function(cfg)
{
this.addEvents({
- 'refreshed' : true,
+ 'refreshed' : true
});
Roo.apply(this,cfg);
this.fireEvent('refreshed', au);
//Pman.Tab.FaxQueue.newMaxId(au.faxMax);
//Pman.Tab.FaxTab.setTitle(au.faxNumPending);
-
+ au.lang = au.lang || 'en';
//this.switchLang(Roo.state.Manager.get('Pman.Login.lang', 'en'));
Roo.state.Manager.set( this.realm + 'lang' , au.lang);
- this.switchLang(au.lang || 'en');
+ this.switchLang(au.lang );
// open system... - -on setyp..
switchLang : function (lang)
{
_T = typeof(_T) == 'undefined' ? false : _T;
- if (!_T && !lang.length) {
+ if (!_T || !lang.length) {
return;
}
this.form = this.layout.getRegion('center').activePanel.form;
this.form.dialog = dlg;
this.buttons[0].form = this.form;
- this.buttons[0].dialog = dlg
+ this.buttons[0].dialog = dlg;
this.buttons[1].form = this.form;
this.buttons[1].dialog = dlg;
this.form.dialog.el.mask("Logging in");
this.form.doAction('submit', {
url: this.form.dialog.url,
- method: this.form.dialog.method,
+ method: this.form.dialog.method
});
}
}