Merge pull request #1 from RafaFP/fix-closeSharedNotes

now when a user is kicked by moderator the sharedNotes windows will b…
This commit is contained in:
Pedro Beschorner Marin 2016-06-27 09:55:30 -03:00 committed by GitHub
commit 5e27b3e6fd
3 changed files with 17 additions and 7 deletions

View File

@ -37,17 +37,18 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
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 <http://www.gnu.org/licenses/>.
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);
}
]]>
</mx:Script>

View File

@ -59,8 +59,8 @@
</EventHandlers>
<EventHandlers type="{StopSharedNotesModuleEvent.STOP_SHAREDNOTES_MODULE_EVENT}">
<MethodInvoker generator="{SharedNotesEventMapDelegate}" method="removeToolbarButton"/>
<MethodInvoker generator="{SharedNotesManager}" method="disconnectFromSharedNotes"/>
<MethodInvoker generator="{SharedNotesEventMapDelegate}" method="stopSharedNotesRemoveAll"/>
<!-- <MethodInvoker generator="{SharedNotesManager}" method="disconnectFromSharedNotes"/> -->
</EventHandlers>
<EventHandlers type="{GetCurrentDocumentEvent.GET_CURRENT_DOCUMENT}">

View File

@ -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);
}
}
}