- ]
- }
- ]
-})
-
-Pman.Login = new Roo.util.Observable({
-
- events : {
-
- 'render' : true
- },
- disabled : false,
-
- dialog : false,
- form: false,
- haslogo : false,
-
- authUserId: 0,
- authUser: { id : false },
-
- checkFails : 0,
- versionWarn: false,
- sending : false,
-
-
-
-
-
- intervalID : false, /// the login refresher...
-
- lastChecked : false,
-
-
-
-
-
- // 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);
-
-
-
-
-
- },
-
-
-
- logout: function()
- {
- window.onbeforeunload = function() { }; // false does not work for IE..
- Pman.Login.authUserId = -1;
- Roo.Ajax.request({
- url: baseURL + '/Login.html',
- params: {
- logout: 1
- },
- method: 'GET',
- failure : function() {
- Roo.MessageBox.alert("Error", "Error logging out. - continuing anyway.", function() {
- document.location = baseURL + '?ts=' + Math.random();
- });
-
- },
- success : function() {
- Pman.Login.authUserId = -1;
- Pman.Login.checkFails =0;
- // remove the
- document.location = baseURL + '?ts=' + Math.random();