- handle previous saved notes
This commit is contained in:
parent
6b95383957
commit
7946d8f93b
@ -38,10 +38,10 @@
|
||||
]]>
|
||||
</mx:Script>
|
||||
|
||||
<EventHandlers type="{NotesModuleStartEvent.NOTES_MODULE_START}">
|
||||
<ObjectBuilder generator="{NotesMessageService}" cache="global" constructorArguments="{scope.dispatcher}"/>
|
||||
<ObjectBuilder generator="{NotesEventMapDelegate}" cache="global" constructorArguments="{scope.dispatcher}"/>
|
||||
<EventHandlers type="{NotesModuleStartEvent.NOTES_MODULE_START}">
|
||||
<ObjectBuilder generator="{RetrieveNotesService}" cache="global" constructorArguments="{scope.dispatcher}"/>
|
||||
<ObjectBuilder generator="{NotesMessageService}" cache="global" constructorArguments="{scope.dispatcher}"/>
|
||||
<ObjectBuilder generator="{NotesEventMapDelegate}" cache="global" constructorArguments="{scope.dispatcher}"/>
|
||||
</EventHandlers>
|
||||
|
||||
<EventHandlers type="{RetrieveNotesEvent.RETRIEVE}">
|
||||
|
@ -5,6 +5,7 @@ package org.bigbluebutton.modules.notes.maps
|
||||
import flash.events.IEventDispatcher;
|
||||
|
||||
import org.bigbluebutton.common.events.OpenWindowEvent;
|
||||
import org.bigbluebutton.modules.notes.events.RetrieveNotesEvent;
|
||||
import org.bigbluebutton.modules.notes.views.NotesWindow;
|
||||
|
||||
public class NotesEventMapDelegate
|
||||
@ -24,6 +25,8 @@ package org.bigbluebutton.modules.notes.maps
|
||||
var event:OpenWindowEvent = new OpenWindowEvent(OpenWindowEvent.OPEN_WINDOW_EVENT);
|
||||
event.window = _notesWindow;
|
||||
_dispatcher.dispatchEvent(event);
|
||||
|
||||
_dispatcher.dispatchEvent(new RetrieveNotesEvent());
|
||||
}
|
||||
}
|
||||
}
|
@ -50,7 +50,7 @@ package org.bigbluebutton.modules.notes.services
|
||||
}
|
||||
|
||||
public function save():void {
|
||||
_request.url = _serverURL;
|
||||
_request.url = _serverURL + "/save";
|
||||
_request.method = URLRequestMethod.GET;
|
||||
|
||||
_vars = new URLVariables();
|
||||
|
@ -46,7 +46,7 @@ package org.bigbluebutton.modules.notes.services
|
||||
}
|
||||
|
||||
public function retrieveNotes():void {
|
||||
_request.url = _options.saveURL;
|
||||
_request.url = _options.saveURL + "/notes";
|
||||
_request.method = URLRequestMethod.GET;
|
||||
|
||||
_vars = new URLVariables();
|
||||
@ -80,6 +80,23 @@ package org.bigbluebutton.modules.notes.services
|
||||
}
|
||||
|
||||
private function parseNotes(xml:XML):ArrayCollection {
|
||||
var notes:ArrayCollection = new ArrayCollection();
|
||||
var list:XMLList = getNotes(xml);
|
||||
var item:XML;
|
||||
for each(item in list){
|
||||
trace("Saving note [" + item.noteID + "][" + item.text + "]");
|
||||
var note:Note = new Note();
|
||||
// var dec:Base64Decoder = new Base64Decoder();
|
||||
// dec.decode(item.text)
|
||||
// var decNote:String = dec.toByteArray().toString();
|
||||
// trace("Saving note [" + item.noteID + "][" + decNote + "]");
|
||||
// note.note = decNote;
|
||||
note.noteID = item.noteID;
|
||||
note.saved = true;
|
||||
notes.addItem(note);
|
||||
}
|
||||
return notes;
|
||||
|
||||
/*
|
||||
var dec:Base64Decoder = new Base64Decoder();
|
||||
dec.decode(_vars.note)
|
||||
@ -87,9 +104,14 @@ package org.bigbluebutton.modules.notes.services
|
||||
trace("Saving note [" + _vars.noteID + "][" + decNote + "]");
|
||||
*/
|
||||
|
||||
return new ArrayCollection();
|
||||
return ;
|
||||
}
|
||||
|
||||
private function getNotes(xml:XML):XMLList{
|
||||
trace("*** [" + xml.toXMLString() + "]");
|
||||
return xml.note;
|
||||
}
|
||||
|
||||
private function openHandler(event:Event):void {
|
||||
trace("openHandler: " + event);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user