Skip to content
Snippets Groups Projects
Commit cda6000a authored by Richard Alam's avatar Richard Alam
Browse files

Merge pull request #3054 from riadvice/close-popups-at-logout

Remove PopUps and toolbars when logged out
parents 3fca40ba 618c01a4
No related branches found
No related tags found
No related merge requests found
......@@ -497,7 +497,11 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
logoutWindow.y = point1.y - (logoutWindow.height/2);
logoutWindow.setReason(reason);
mdiCanvas.removeAllPopUps();
removeToolBars();
} else {
mdiCanvas.removeAllPopUps();
removeToolBars();
var pageHost:String = FlexGlobals.topLevelApplication.url.split("/")[0];
var pageURL:String = FlexGlobals.topLevelApplication.url.split("/")[2];
LOGGER.debug("SingOut to [{0}//{1}/bigbluebutton/api/signOut]", [pageHost, pageURL]);
......@@ -508,6 +512,15 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
urlLoader.load(request);
}
}
/**
* Removes toolbars from the display list.
* Used only when the user completely logged out.
*/
private function removeToolBars():void{
this.removeChild(toolbar);
this.removeChild(controlBar);
}
public function getLogoutUrl():String {
var logoutUrl:String = BBB.initUserConfigManager().getLogoutUrl();
......
......@@ -79,6 +79,17 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
}
}
/**
* Removes all display list containers created using PopUpManager
*/
public function removeAllPopUps():void{
for (var i:int = systemManager.numChildren-1; i>0; i-=1){
if(!(systemManager.getChildAt(i) is LoggedOutWindow)){
systemManager.removeChildAt(i);
}
}
}
public function resetWindowLayout():void{
var windows:Array = this.windowManager.getOpenWindowList();
for (var i:Number=0; i<windows.length; i++){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment