<commit_before>Ext.namespace('Vps.User.Login');
Vps.User.Login.Dialog = Ext.extend(Ext.Window,
{
    initComponent: function()
    {
        this.height = 240;
        this.width = 310;
        this.modal = true;
        this.title = 'Login';
        this.resizable = false;
        this.closable = true;
        this.layout = 'border';
        this.loginPanel = new Ext.Panel({
            baseCls: 'x-plain',
            region: 'south',
            border: false,
            height: 125,
            html: '<iframe scrolling="no" src="/vps/user/login/show-form" width="100%" '+
                    'height="100%" style="border: 0px"></iframe>'
        });
        this.items = [{
            baseCls: 'x-plain',
            cls: 'vps-login-header',
            region: 'north',
            height: 80,
            autoLoad: '/vps/user/login/header',
            border: false
        },{
            baseCls: 'x-plain',
            region: 'center',
            bodyStyle: 'padding: 10px;',
            html: this.message,
            border: false
        }, this.loginPanel];

        this.loginPanel.on('render', function(panel) {
            var frame = this.loginPanel.body.first('iframe');
            Ext.EventManager.on(frame, 'load', this.onLoginLoad, this);
        }, this, { delay: 1 });

        Vps.User.Login.Dialog.superclass.initComponent.call(this);
    },

    onLoginLoad : function() {
        var frame = this.loginPanel.body.first('iframe');
        if(Ext.isIE){
            doc = frame.dom.contentWindow.document;
        } else {
            doc = (frame.dom.contentDocument || window.frames[id].document);
        }
        if(doc && doc.body){
            if (doc.body.innerHTML.match(/successful/)) {
                this.hide();
                if (this.location) {
                    location.href = this.location;
                } else {
                    if (Vps.menu) Vps.menu.reload();
                    if (this.success) {
                        Ext.callback(this.success, this.scope);
                    }
                }
            } else {
                doc.getElementsByName('username')[0].focus();
            }<commit_msg>IE6 Login Bugfix<commit_after>Ext.namespace('Vps.User.Login');
Vps.User.Login.Dialog = Ext.extend(Ext.Window,
{
    initComponent: function()
    {
        this.height = 240;
        this.width = 310;
        this.modal = true;
        this.title = 'Login';
        this.resizable = false;
        this.closable = true;
        this.layout = 'border';
        this.loginPanel = new Ext.Panel({
            baseCls: 'x-plain',
            region: 'south',
            border: false,
            height: 125,
            html: '<iframe scrolling="no" src="/vps/user/login/show-form" width="100%" '+
                    'height="100%" style="border: 0px"></iframe>'
        });
        this.items = [{
            baseCls: 'x-plain',
            cls: 'vps-login-header',
            region: 'north',
            height: 80,
            autoLoad: '/vps/user/login/header',
            border: false
        },{
            baseCls: 'x-plain',
            region: 'center',
            bodyStyle: 'padding: 10px;',
            html: this.message,
            border: false
        }, this.loginPanel];

        this.loginPanel.on('render', function(panel) {
            var frame = this.loginPanel.body.first('iframe');
            Ext.EventManager.on(frame, 'load', this.onLoginLoad, this);
        }, this, { delay: 1 });

        Vps.User.Login.Dialog.superclass.initComponent.call(this);
    },

    onLoginLoad : function() {
        var frame = this.loginPanel.body.first('iframe');
        if(Ext.isIE){
            doc = frame.dom.contentWindow.document;
        } else {
            doc = (frame.dom.contentDocument || window.frames[id].document);
        }

        // IE sux :)
        if (!doc) {
            this.onLoginLoad.defer(100, this);
            return ;
        }

        if(doc && doc.body){
            if (doc.body.innerHTML.match(/successful/)) {
                this.hide();
                if (this.location) {
                    location.href = this.location;
                } else {
                    if (Vps.menu) Vps.menu.reload();
                    if (this.success) {
                        Ext.callback(this.success, this.scope);
                    }
                }
            } else {
                doc.getElementsByName('username')[0].focus();
            }
{'fraction_non_alphanumeric': 0.1422202407489969, 'fraction_numerical': 0.01069995541685243, 'mean_word_length': 1.431978319783198, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4793711', 'n_tokens_mistral': 1336, 'n_tokens_neox': 1246, 'n_words': 223}