setLoginInterstitial: function() {
// win;
var button = Ext.get('login-btn');
var tabs = new Ext.TabPanel({
applyTo: 'hello-tabs',
autoTabs:true,
activeTab:0,
deferredRender:false,
border:false
});
button.on('click', function(){
// create the window on the first click and reuse on subsequent clicks
if(!this.win){
this.win = new Ext.Window({
layout:'fit',
width:500,
height:300,
closeAction:'hide',
plain: true,
items: tabs,
buttons: [{
text:'Submit',
disabled:true
},{
text: 'Close',
handler: function(){
this.win.hide();
}
}]
});
}
// win.addListener('tabchange');
this.win.show(this);
tabs.on(
'tabchange',
// this.getConnection,
function(panel, tab) {
console.log("EVENT WORKED IFNE");
this.getConnection(panel, tab);
},
this
);
});
},
getConnection: function(panel, tab) {
console.log("HERE");
var login_click = Ext.fly(tab.title + '_connect');
login_click.on(
"click",
function() {
this.win.hide();
Ext.IframeWindow = Ext.extend(Ext.Window, {
onRender: function() {
this.bodyCfg = {
tag: 'iframe',
src: this.src,
cls: this.bodyCls,
style: {
border: '0px none'
}
};
Ext.IframeWindow.superclass.onRender.apply(this, arguments);
}
});
var w = new Ext.IframeWindow({
id:id,
width:640,
height:480,
title:"Login via",
src:"/users/login/facebook"
})
w.show();
},
this
);
}