
MyDesktop.TrabalhoModule = Ext.extend(Ext.app.Module, {
	id: 'trabalho', 
    init : function(){
        this.launcher = {
            text: 'Trabalho',
            iconCls:'trabalho',
            handler : this.createWindow,
            scope: this,
            windowId: 'trabalho'
        }
    },

    createWindow : function(src){
        var desktop = this.app.getDesktop();
        var win = desktop.getWindow('trabalho');
        if(!win){
            win = desktop.createWindow({
                id: 'trabalho',
                title: 'Trabalho',
                width:640,
                height:480,
                html : '<p>teste wheee</p>',
                iconCls: 'trabalho',
                shim:false,
                animCollapse:false,
                constrainHeader:true,
                x: 150,
                y: 100
            });
        }
        winUpdater = win.getUpdater();
        winUpdater.update({
            url: "trabalho.html"
        });
        win.show();
    }
});

MyDesktop.CurriculoModule = Ext.extend(Ext.app.Module, {
	id: 'curriculo',
    init : function(){
        this.launcher = {
            text: 'Currí­culo',
            iconCls:'curriculo',
            handler : this.createWindow,
            scope: this,
            windowId: 'curriculo',
            autoScroll: true
        }
    },

    createWindow : function(src){
        var desktop = this.app.getDesktop();
        var win = desktop.getWindow('curriculo');
        if(!win){
            win = desktop.createWindow({
                id: 'curriculo',
                title: 'Currículo',
                width:640,
                height:480,
                html : '<p>teste wheee</p>',
                iconCls: 'curriculo',
                shim:false,
                animCollapse:false,
                constrainHeader:true,
                autoScroll: true
            });
        }
        winUpdater = win.getUpdater();
        winUpdater.update({
            url: "curriculo.html"
        });
        win.show();
    }
});


MyDesktop.ArtigosModule = Ext.extend(Ext.app.Module, {
	id: 'artigos', 
    init : function(){
        this.launcher = {
            text: 'Artigos Publicados',
            iconCls:'artigos',
            handler : this.createWindow,
            scope: this,
            windowId: 'artigos'
        }
    },

    createWindow : function(src){
        var desktop = this.app.getDesktop();
        var win = desktop.getWindow('artigos');
        if(!win){
            win = desktop.createWindow({
                id: 'artigos',
                title: 'Artigos Publicados',
                width:640,
                height:480,
                html : '<p>teste wheee</p>',
                iconCls: 'artigos',
                shim:false,
                animCollapse:false,
                constrainHeader:true,
                autoScroll: true
            });
        }
        winUpdater = win.getUpdater();
        winUpdater.update({
            url: "artigos.html"
        });
        win.show();
    }
});

MyDesktop.ProjetosModule = Ext.extend(Ext.app.Module, {
	id: 'projetos', 
    init : function(){
        this.launcher = {
            text: 'Projetos',
            iconCls:'projetos',
            handler : this.createWindow,
            scope: this,
            windowId: 'projetos'
        }
    },

    createWindow : function(src){
        var desktop = this.app.getDesktop();
        var win = desktop.getWindow('projetos');
        if(!win){
            win = desktop.createWindow({
                id: 'projetos',
                title: 'Projetos',
                width:640,
                height:380,
                html : '<p>teste wheee</p>',
                iconCls: 'projetos',
                shim:false,
                animCollapse:false,
                constrainHeader:true,
                resizable: false,
                bodyStyle:"padding:10 10 0 10px;background:white;"

            });
        }
        winUpdater = win.getUpdater();
        winUpdater.update({
            url: "projetos.html"
        });
        win.show();
    }
});




MyDesktop.FrameworksModule = Ext.extend(Ext.app.Module, {
	id: 'frameworks', 
    init : function(){
        this.launcher = {
            text: 'Frameworks Legais',
            iconCls:'frameworks',
            handler : this.createWindow,
            scope: this,
            windowId: 'frameworks'
        }
    },

    createWindow : function(src){
        var desktop = this.app.getDesktop();
        var win = desktop.getWindow('frameworks');
        
        extJs = new Ext.Window({});
        if(!win){
            win = desktop.createWindow({
                id: 'frameworks',
                title: 'Frameworks Legais',
                width:350,
                height:400,
                iconCls: 'frameworks',
                shim:false,
                animCollapse:false,
                constrainHeader:true,
                layout:'accordion',
                border:false,
                x: 550,
                y: 50,
                layoutConfig: {
                    animate:false
                },

                items: [
                   {
                        title: 'ExtJS',
                        autoScroll:true,
                        autoLoad: {url: 'extJS.html'}
                    },{
                        title: 'Spring',
                        autoScroll:true,
                        autoLoad: {url: 'spring.html'}
                    },{
                        title: 'JQuery/JQuery-UI',
                        autoScroll:true,
                        autoLoad: {url: 'jquery.html'}
                    },{
                        title: 'Strust 2',
                        autoScroll:true,
                        autoLoad: {url: 'struts.html'}
                    },{
                        title: 'Jersey - JAX-RS',
                        autoScroll:true,
                        autoLoad: {url: 'jersey.html'}
                    }
                ]
            });
        }
        /*winUpdater = win.getUpdater();
        winUpdater.update({
            items[0].url: "artigos.html"
        });*/

        win.show();
    }
});
