diff --git a/bigbluebutton-client/src/SharedNotesModule.mxml b/bigbluebutton-client/src/SharedNotesModule.mxml index 46d8eb15ed..e857926da1 100755 --- a/bigbluebutton-client/src/SharedNotesModule.mxml +++ b/bigbluebutton-client/src/SharedNotesModule.mxml @@ -37,17 +37,18 @@ with BigBlueButton; if not, see . import org.bigbluebutton.common.events.OpenWindowEvent; import org.bigbluebutton.common.events.ToolbarButtonEvent; import org.bigbluebutton.modules.sharednotes.events.StartSharedNotesModuleEvent; + import org.bigbluebutton.modules.sharednotes.events.StopSharedNotesModuleEvent; private static const LOGGER:ILogger = getClassLogger(SharedNotesModule); private var _moduleName:String = "Notes Module"; private var _attributes:Object; - private var globalDispatcher:Dispatcher = new Dispatcher(); + private var _globalDispatcher:Dispatcher = new Dispatcher(); private function onCreationComplete():void { LOGGER.debug("NotesModule Initialized"); - globalDispatcher = new Dispatcher(); + _globalDispatcher = new Dispatcher(); } public function get moduleName():String { @@ -86,12 +87,12 @@ with BigBlueButton; if not, see . public function start(attributes:Object):void { var event:StartSharedNotesModuleEvent = new StartSharedNotesModuleEvent(); event.attributes = attributes; - globalDispatcher.dispatchEvent(event); + _globalDispatcher.dispatchEvent(event); } public function stop():void { - //var event:LayoutEvent = new LayoutEvent(LayoutEvent.STOP_LAYOUT_MODULE_EVENT); - //_globalDispatcher.dispatchEvent(event); + var event:StopSharedNotesModuleEvent = new StopSharedNotesModuleEvent(StopSharedNotesModuleEvent.STOP_SHAREDNOTES_MODULE_EVENT); + _globalDispatcher.dispatchEvent(event); } ]]> diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/sharednotes/maps/SharedNotesEventMap.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/sharednotes/maps/SharedNotesEventMap.mxml index 2420931da6..8437e4ead3 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/sharednotes/maps/SharedNotesEventMap.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/sharednotes/maps/SharedNotesEventMap.mxml @@ -59,8 +59,8 @@ - - + + diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/sharednotes/maps/SharedNotesEventMapDelegate.as b/bigbluebutton-client/src/org/bigbluebutton/modules/sharednotes/maps/SharedNotesEventMapDelegate.as index 07fb0b788f..eeb5df10fb 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/sharednotes/maps/SharedNotesEventMapDelegate.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/sharednotes/maps/SharedNotesEventMapDelegate.as @@ -121,5 +121,14 @@ package org.bigbluebutton.modules.sharednotes.maps for (var noteId:String in windows) destroyAdditionalNotes(noteId); } } + + public function stopSharedNotesRemoveAll():void { + //remove the additional + for (var noteId:String in windows) destroyAdditionalNotes(noteId); + //remove the main window + var closeEvent:CloseWindowEvent = new CloseWindowEvent(CloseWindowEvent.CLOSE_WINDOW_EVENT); + closeEvent.window = window; + globalDispatcher.dispatchEvent(closeEvent); + } } }