-
-
-
-
- });
-
-
-
- this.form.add(
-
-
-
- );
-
-
- var ef = this.dialog.getLayout().getEl().createChild({tag: 'div'});
- ef.dom.style.margin = 10;
-
- this.form.render(ef.dom);
- // logoprefix comes from base config.
- Pman.Login.form.el.createChild({
- tag: 'img',
- src: rootURL + '/Pman/'+appNameShort + '/templates/images/logo.gif',
- style: 'margin-bottom: 10px;'
- },
- Pman.Login.form.el.dom.firstChild
- );
-
- var vp = this.dialog.getLayout().add('center', new Roo.ContentPanel(ef, {
- autoCreate : true,
- //title: 'Org Details',
- //toolbar: this.tb,
- width: 250,
- maxWidth: 250,
- fitToFrame:true
- }));
-
- this.layout.endUpdate();
-
- this.fireEvent('render', this);
-
-
-
-
-
- },
- resizeToLogo : function()
- {
- var sz = Roo.get(Pman.Login.form.el.query('img')[0]).getSize();
- if (!sz) {
- this.resizeToLogo.defer(1000,this);
- return;
- }
- var w = Ext.lib.Dom.getViewWidth() - 100;
- var h = Ext.lib.Dom.getViewHeight() - 100;
- Pman.Login.dialog.resizeTo(Math.max(350, Math.min(sz.width + 30, w)),Math.min(sz.height+200, h));
- Pman.Login.dialog.center();
- },
-
-
-
- show: function (modal)
- {
- if (this.disabled) {
- return;
- }
- modal = modal || false;
- if (Pman.Login.authUserId < 0) { // logout!?
- return;
- }
-
- if (Pman.Login.intervalID) {
- // remove the timer
- window.clearInterval(Pman.Login.intervalID);
- Pman.Login.intervalID = false;
- }
-
- this.create();
-
-
-
- if (Roo.get('loading')) {
- Roo.get('loading').remove();
- }
- if (Roo.get('loading-mask')) {
- Roo.get('loading-mask').hide();
- }
-
- //incomming._node = tnode;
- this.form.reset();
- this.dialog.modal = !modal;
- this.dialog.show();
- this.dialog.el.unmask();
- this.resizeToLogo.defer(1000,this);
-
-
- this.form.setValues({
- 'username' : Roo.state.Manager.get('Pman.Login.username.'+appNameShort, ''),
- 'lang' : Roo.state.Manager.get('Pman.Login.lang.'+appNameShort, 'en')
- });
- Pman.Login.switchLang(Roo.state.Manager.get('Pman.Login.lang.'+appNameShort, ''));
- if (this.form.findField('username').getValue().length > 0 ){
- this.form.findField('password').focus();
- } else {
- this.form.findField('username').focus();