diff --git a/www/assets/app.js b/www/assets/app.js index ac8b581..ad1f584 100644 --- a/www/assets/app.js +++ b/www/assets/app.js @@ -395,7 +395,7 @@ term.open(terminalContainer); // Set geometry during the next tick, to avoid race conditions. - + /* setTimeout(function() { $scope.resize(term.proposeGeometry()); diff --git a/www/landing.html b/www/landing.html index b900f4e..82bcbdc 100644 --- a/www/landing.html +++ b/www/landing.html @@ -108,10 +108,16 @@ var height = screen.height*0.6; var x = screen.width/2 - width/2; var y = screen.height/2 - height/2; - var loginWnd = $window.open('/oauth/providers/' + provider + '/login', 'PWDLogin', 'width='+width+',height='+height+',left='+x+',top='+y); - loginWnd.onunload = function() { + $window.open('/oauth/providers/' + provider + '/login', 'PWDLogin', 'width='+width+',height='+height+',left='+x+',top='+y); + var eventMethod = window.addEventListener ? "addEventListener" : "attachEvent"; + var eventer = window[eventMethod]; + var messageEvent = eventMethod == "attachEvent" ? "onmessage" : "message"; + // Listen to message from child window + eventer(messageEvent,function(e) { + if (e.data === 'done') { checkLoggedIn(); - } + } + }, false); } $scope.start = function() {