Containers created with PopUpManager and toolbars are removed from the display list when the user is logged out from the application.

This commit is contained in:
Ghaz Triki 2016-03-11 23:02:10 +01:00
parent a46d3656f9
commit e0273aac7d
2 changed files with 23 additions and 5 deletions

View File

@ -526,9 +526,11 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
logoutWindow.y = point1.y - (logoutWindow.height/2); logoutWindow.y = point1.y - (logoutWindow.height/2);
logoutWindow.setReason(reason); logoutWindow.setReason(reason);
mdiCanvas.removeAllWindows(); mdiCanvas.removeAllPopUps();
removeToolBars();
} else { } else {
mdiCanvas.removeAllWindows(); mdiCanvas.removeAllPopUps();
removeToolBars();
var pageHost:String = FlexGlobals.topLevelApplication.url.split("/")[0]; var pageHost:String = FlexGlobals.topLevelApplication.url.split("/")[0];
var pageURL:String = FlexGlobals.topLevelApplication.url.split("/")[2]; var pageURL:String = FlexGlobals.topLevelApplication.url.split("/")[2];
LOGGER.debug("SingOut to [{0}//{1}/bigbluebutton/api/signOut]", [pageHost, pageURL]); LOGGER.debug("SingOut to [{0}//{1}/bigbluebutton/api/signOut]", [pageHost, pageURL]);
@ -539,6 +541,15 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
urlLoader.load(request); 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 { public function getLogoutUrl():String {
var logoutUrl:String = BBB.initUserConfigManager().getLogoutUrl(); var logoutUrl:String = BBB.initUserConfigManager().getLogoutUrl();
@ -562,7 +573,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
var logoutURL:String = getLogoutUrl(); var logoutURL:String = getLogoutUrl();
var request:URLRequest = new URLRequest(logoutURL); var request:URLRequest = new URLRequest(logoutURL);
LOGGER.debug("Logging out to: {0}", [logoutURL]); LOGGER.debug("Logging out to: {0}", [logoutURL]);
navigateToURL(request, '_self'); //navigateToURL(request, '_self');
} }

View File

@ -79,8 +79,15 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
} }
} }
public function removeAllWindows():void{ /**
this.windowManager.removeAll(); * 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{ public function resetWindowLayout():void{