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:
commit
5e27b3e6fd
@ -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>
|
||||
|
@ -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}">
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user