diff --git a/bigbluebutton-apps/src/main/scala/org/bigbluebutton/core/apps/poll/PollMessageConverter.scala b/bigbluebutton-apps/src/main/scala/org/bigbluebutton/core/apps/poll/PollMessageConverter.scala index 7c2ae81fc2..6d2e169c0e 100755 --- a/bigbluebutton-apps/src/main/scala/org/bigbluebutton/core/apps/poll/PollMessageConverter.scala +++ b/bigbluebutton-apps/src/main/scala/org/bigbluebutton/core/apps/poll/PollMessageConverter.scala @@ -45,10 +45,10 @@ class PollMessageConverter { i += 1 } - //new PollVO(randomAlphanumericString(12), title, cvoArray.toArray) + new PollVO(randomAlphanumericString(12), title, cvoArray.toArray) // Hardocde for now for testing - new PollVO("pollID", title, cvoArray.toArray) + //new PollVO("pollID", title, cvoArray.toArray) } def convertUpdatePollMessage(msg:String):PollVO = { diff --git a/bigbluebutton-apps/src/main/scala/org/bigbluebutton/core/apps/poll/PollModel.scala b/bigbluebutton-apps/src/main/scala/org/bigbluebutton/core/apps/poll/PollModel.scala index a9fbc41573..7c0633ef2c 100755 --- a/bigbluebutton-apps/src/main/scala/org/bigbluebutton/core/apps/poll/PollModel.scala +++ b/bigbluebutton-apps/src/main/scala/org/bigbluebutton/core/apps/poll/PollModel.scala @@ -7,6 +7,23 @@ class PollModel { private val polls = new HashMap[String, Poll]() + createSamplePoll + + def createSamplePoll() { + val r1 = new ResponseVO("0", "Answer 1") + val r2 = new ResponseVO("1", "Answer 2") + val r3 = new ResponseVO("2", "Answer 3") + val r4 = new ResponseVO("3", "Answer 4") + + var q = new QuestionVO("q1", true, "What is my name?", Array(r1, r2, r3)) + val pvo = new PollVO("pollID-100", "sample poll", Array(q)) + + createPoll(pvo) + + respondToQuestion("pollID-100", "q1", "1", new Responder("user1", "Juan Tamad")) + respondToQuestion("pollID-100", "q1", "0", new Responder("user2", "Asyong Aksaya")) + } + def numPolls():Int = { polls.size } diff --git a/bigbluebutton-apps/src/main/scala/org/bigbluebutton/core/apps/poll/red5/PollClientMessageSender.scala b/bigbluebutton-apps/src/main/scala/org/bigbluebutton/core/apps/poll/red5/PollClientMessageSender.scala index 50f28d8adf..2fc895645c 100755 --- a/bigbluebutton-apps/src/main/scala/org/bigbluebutton/core/apps/poll/red5/PollClientMessageSender.scala +++ b/bigbluebutton-apps/src/main/scala/org/bigbluebutton/core/apps/poll/red5/PollClientMessageSender.scala @@ -13,6 +13,8 @@ import org.bigbluebutton.core.apps.poll.messages.PollCreatedOutMsg import org.bigbluebutton.conference.meeting.messaging.red5.DirectClientMessage import com.google.gson.Gson import org.bigbluebutton.conference.meeting.messaging.red5.BroadcastClientMessage +import java.util.ArrayList +import org.bigbluebutton.core.apps.poll.PollVO class PollClientMessageSender(service: ConnectionInvokerService) extends OutMessageListener2 { @@ -32,8 +34,17 @@ class PollClientMessageSender(service: ConnectionInvokerService) extends OutMess private def handleGetPollsReplyOutMsg(msg: GetPollsReplyOutMsg) { val gson = new Gson(); val message = new java.util.HashMap[String, Object]() - message.put("msg", gson.toJson(msg.polls)) + val collection = new ArrayList[PollVO](); + + msg.polls.foreach(p => { + collection.add(p) + }) + + message.put("msg", gson.toJson(collection)) + +// println("PollClientMessageSender - Handling GetPollsReplyOutMsg \n" + message.get("msg") + "\n") + var m = new DirectClientMessage(msg.meetingID, msg.requesterID, "pollGetPollsReply", message); service.sendMessage(m); } diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/events/InitPollModuleEvent.as b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/events/InitPollModuleEvent.as new file mode 100755 index 0000000000..3d0852a452 --- /dev/null +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/events/InitPollModuleEvent.as @@ -0,0 +1,14 @@ +package org.bigbluebutton.modules.polling.events +{ + import flash.events.Event; + + public class InitPollModuleEvent extends Event + { + public static const INITIALIZE_POLL_MODULE:String = "initialize poll module event"; + + public function InitPollModuleEvent() + { + super(INITIALIZE_POLL_MODULE, true, false); + } + } +} \ No newline at end of file diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/events/OpenCreatePollWindowEvent.as b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/events/OpenCreatePollWindowEvent.as new file mode 100755 index 0000000000..e864790e73 --- /dev/null +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/events/OpenCreatePollWindowEvent.as @@ -0,0 +1,14 @@ +package org.bigbluebutton.modules.polling.events +{ + import flash.events.Event; + + public class OpenCreatePollWindowEvent extends Event + { + public static const OPEN_CREATE_POLL_WINDOW:String = "open create poll window event"; + + public function OpenCreatePollWindowEvent() + { + super(OPEN_CREATE_POLL_WINDOW, true, false); + } + } +} \ No newline at end of file diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/managers/PollManager.as b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/managers/PollManager.as index 2088543056..c62c9ec185 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/managers/PollManager.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/managers/PollManager.as @@ -1,16 +1,19 @@ package org.bigbluebutton.modules.polling.managers { - import org.bigbluebutton.modules.polling.model.PollingModel; - - + import com.asfusion.mate.events.Dispatcher; + import flash.events.IEventDispatcher; + import org.bigbluebutton.modules.polling.events.GetPollsEvent; + import org.bigbluebutton.modules.polling.model.PollingModel; public class PollManager { public static const LOG:String = "[PollManager] - "; + // Injected by Mate public var model:PollingModel; + public var dispatcher:IEventDispatcher; public function PollManager() { @@ -20,5 +23,9 @@ package org.bigbluebutton.modules.polling.managers public function handleStartModuleEvent(module:PollingModule):void { } + + public function handleInitPollModuleEvent():void { + dispatcher.dispatchEvent(new GetPollsEvent()); + } } } diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/managers/PollingWindowManager.as b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/managers/PollingWindowManager.as index 9635bdc4ad..62b6934198 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/managers/PollingWindowManager.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/managers/PollingWindowManager.as @@ -68,9 +68,9 @@ package org.bigbluebutton.modules.polling.managers private var pollingWindow:PollingViewWindow; private var statsWindow:PollingStatsWindow; private var updatePollWindow:UpdatePollWindow = new UpdatePollWindow(); - private var takePollWindow:TakePollWindow = new TakePollWindow(); + private var takePollWindow:TakePollWindow; private var pollMainWindow:PollMainWindow = new PollMainWindow(); - private var createPollWindow:CreatePollWindow; + private var createPollWindow:CreatePollWindow = new CreatePollWindow(); private var resultsWindow:DisplayResultWindow = new DisplayResultWindow(); private var testCreateWindow:PollCreateWindow; @@ -96,7 +96,12 @@ package org.bigbluebutton.modules.polling.managers openWindow(pollMainWindow); } + public function handleOpenCreatePollWindowEvent():void { + openWindow(createPollWindow); + } + public function handleOpenTakePollWindowEvent(event:OpenTakePollWindowEvent):void { + takePollWindow = new TakePollWindow(); takePollWindow.viewModel = _viewModel; takePollWindow.pollID = event.pollID; diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/maps/PollEventMap.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/maps/PollEventMap.mxml index cdc5d7c670..975454261f 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/maps/PollEventMap.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/maps/PollEventMap.mxml @@ -22,8 +22,7 @@ - + + + + + @@ -78,11 +81,12 @@ + - + diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/maps/PollingEventMap.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/maps/PollingEventMap.mxml index b74c244d92..eaee6e69f4 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/maps/PollingEventMap.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/maps/PollingEventMap.mxml @@ -22,24 +22,25 @@ @@ -52,7 +53,11 @@ - + + + + + diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/model/Poll.as b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/model/Poll.as index 08debfb2a1..fae3ef92ab 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/model/Poll.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/model/Poll.as @@ -76,7 +76,7 @@ package org.bigbluebutton.modules.polling.model var r:ResultVO = results.results[i] as ResultVO; var q:Question = getQuestion(r.questionID); if (q != null) { - q.updateResult(r.responseID, r.responseCount); + q.updateResult(r.responseID, r.responder); } } } diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/model/PollingViewModel.as b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/model/PollingViewModel.as index 32b3dfb4f1..da4f30cff9 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/model/PollingViewModel.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/model/PollingViewModel.as @@ -12,6 +12,7 @@ package org.bigbluebutton.modules.polling.model public function PollingViewModel(model: PollingModel) { + trace("************** Initing PollingViewModel ***************************"); _model = model; } @@ -48,15 +49,16 @@ package org.bigbluebutton.modules.polling.model addSample1(); addSample2(); addSample3(); + trace("*** PollingViewModel num polls = [" + _model.getPolls().length + "] **** \n"); } private function addSample1():void { var _questions:Array = new Array(); var _resps1:Array = new Array(); - _resps1.push(new Response("1", "Answer 1")); - _resps1.push(new Response("2", "Answer 2")); - _resps1.push(new Response("3", "Answer 3")); + _resps1.push(new Response("1", "Answer 1", new Array())); + _resps1.push(new Response("2", "Answer 2", new Array())); + _resps1.push(new Response("3", "Answer 3", new Array())); var _q1:Question = new Question("qID", true, "What is my name?", _resps1); @@ -71,8 +73,8 @@ package org.bigbluebutton.modules.polling.model var _questions:Array = new Array(); var _resps1:Array = new Array(); - _resps1.push(new Response("1", "Chicken")); - _resps1.push(new Response("2", "Egg")); + _resps1.push(new Response("1", "Chicken", new Array())); + _resps1.push(new Response("2", "Egg", new Array())); var _q1:Question = new Question("qID", false, "Which came first?", _resps1); @@ -87,17 +89,17 @@ package org.bigbluebutton.modules.polling.model var _questions:Array = new Array(); var _resps1:Array = new Array(); - _resps1.push(new Response("1", "Dumaguete")); - _resps1.push(new Response("2", "Cebu")); - _resps1.push(new Response("3", "Zamboanga")); - _resps1.push(new Response("4", "None of the above")); + _resps1.push(new Response("1", "Dumaguete", new Array())); + _resps1.push(new Response("2", "Cebu", new Array())); + _resps1.push(new Response("3", "Zamboanga", new Array())); + _resps1.push(new Response("4", "None of the above", new Array())); var _q1:Question = new Question("qID", false, "What is the capital of the Philippines?", _resps1); - _q1.updateResult("1", 667); - _q1.updateResult("2", 367); - _q1.updateResult("3", 467); - _q1.updateResult("4", 567); + _q1.updateResult("1", new Responder("user1", "Asyong")); + _q1.updateResult("2", new Responder("user2", "Pedro")); + _q1.updateResult("3", new Responder("user3", "Bardagol")); + _q1.updateResult("4", new Responder("user4", "Juan")); _questions.push(_q1); diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/model/Question.as b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/model/Question.as index c41e6b6557..213fab53b6 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/model/Question.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/model/Question.as @@ -30,10 +30,10 @@ package org.bigbluebutton.modules.polling.model return _question; } - public function updateResult(responseID:String, count:int):void { + public function updateResult(responseID:String, responder:Responder):void { for (var i:int = 0; i < _responses.length; i++) { var r:Response = _responses[i] as Response; - if (r.id == responseID) r.updateResult(count); + if (r.id == responseID) r.addResponder(responder); } } diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/model/Responder.as b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/model/Responder.as new file mode 100755 index 0000000000..515243b488 --- /dev/null +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/model/Responder.as @@ -0,0 +1,22 @@ +package org.bigbluebutton.modules.polling.model +{ + public class Responder + { + private var _userID:String; + private var _username:String; + + public function Responder(userID:String, username:String) + { + _userID = userID; + _username = username; + } + + public function get userID():String { + return _userID; + } + + public function get username():String { + return _username; + } + } +} \ No newline at end of file diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/model/Response.as b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/model/Response.as index 7204f879d0..d8e1ba96b4 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/model/Response.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/model/Response.as @@ -5,16 +5,17 @@ package org.bigbluebutton.modules.polling.model private var _id:String; private var _response:String; - private var _responseCount:int = 0; + private var _responders:Array; - public function Response(id:String, response:String) + public function Response(id:String, response:String, responders:Array) { _id = id; _response = response; + _responders = responders; } - public function updateResult(count:int):void { - _responseCount = count; + public function addResponder(r:Responder):void { + _responders.push(r); } public function get id():String { @@ -26,7 +27,7 @@ package org.bigbluebutton.modules.polling.model } public function get numResponses():int { - return _responseCount; + return _responders.length; } } } \ No newline at end of file diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/service/PollDataProcessor.as b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/service/PollDataProcessor.as index e2a869bbe2..2df9e1f729 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/service/PollDataProcessor.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/service/PollDataProcessor.as @@ -1,10 +1,14 @@ package org.bigbluebutton.modules.polling.service { - import flash.events.IEventDispatcher; + import flash.events.IEventDispatcher; + import org.bigbluebutton.modules.polling.events.PollEvent; import org.bigbluebutton.modules.polling.model.Poll; import org.bigbluebutton.modules.polling.model.PollingModel; + import org.bigbluebutton.modules.polling.model.Question; + import org.bigbluebutton.modules.polling.model.Responder; + import org.bigbluebutton.modules.polling.model.Response; public class PollDataProcessor { @@ -15,7 +19,67 @@ package org.bigbluebutton.modules.polling.service public var dispatcher:IEventDispatcher; public function handleGetPollsReply(msg:Object):void { - trace("*** Poll getPollsReply " + msg.msg + " **** \n"); + trace(LOG + "*** getPollsReply " + msg.msg + " **** \n"); + var polls:Array = JSON.parse(msg.msg) as Array; + + trace(LOG + "*** getPollsReply " + polls.length + " **** \n"); + + for (var i:int = 0; i < polls.length; i++) { + var map:Object = polls[i]; + var id:String = map.id; + var title:String = map.title; + var questions:Array = map.questions as Array; + + var qs:Array = new Array(); + + for (var j:int = 0; j < questions.length; j++) { + qs.push(buildQuestion(questions[j])); + } + + var poll:Poll = new Poll(id, title, qs); + + model.createPoll(poll); + } + + trace(LOG + "*** getPollsReply num polls = [" + model.getPolls().length + "] **** \n") + } + + private function buildQuestion(question:Object):Question { + var resps:Array = question.responses as Array; + + var _resps1:Array = buildResponses(resps); + + trace(LOG + "*** buildQuestion [" + question.id + "," + question.multiResponse + "," + question.question + "] **** \n") + + var _q1:Question = new Question(question.id, question.multiResponse, question.question, _resps1); + + return _q1; + } + + private function buildResponses(resps:Array):Array { + + var _resps1:Array = new Array(); + + for (var i:int = 0; i < resps.length; i++) { + var r:Object = resps[1]; + + var responders:Array = buildResponders(r); + + _resps1.push(new Response(r.id, r.text, responders)); + } + + return _resps1; + } + + private function buildResponders(response:Object):Array { + var responders:Array = new Array(); + + var users:Array = response.responders as Array; + for (var k:int = 0; k < users.length; k++) { + responders.push(new Responder(users[k].userID, users[k].name)); + } + + return responders; } public function handlePollResultUpdatedMesage(msg:Object):void { @@ -29,7 +93,7 @@ package org.bigbluebutton.modules.polling.service } public function handlePollCreatedMesage(msg:Object):void { - trace("*** Poll Created " + msg.msg + " **** \n"); + trace(LOG + "*** Poll Created " + msg.msg + " **** \n"); var map:Object = JSON.parse(msg.msg); @@ -40,13 +104,13 @@ package org.bigbluebutton.modules.polling.service var poll:Poll = new Poll(id, title, questions); model.createPoll(poll); - trace("*** Poll Created id=[" + map.id + "] title=[" + map.title + "] questions = [" + questions.length + "] **** \n"); + trace(LOG + "*** Poll Created id=[" + map.id + "] title=[" + map.title + "] questions = [" + questions.length + "] **** \n"); dispatcher.dispatchEvent(new PollEvent(PollEvent.POLL_CREATED, poll.id)); } } public function handlePollUpdatedMesage(msg:Object):void { - trace("*** Poll updated " + msg.msg + " **** \n"); + trace(LOG + "*** Poll updated " + msg.msg + " **** \n"); /* if (model.hasPoll(msg.id)) { var id:String = msg.id; @@ -60,7 +124,7 @@ package org.bigbluebutton.modules.polling.service } public function handlePollDestroyedMesage(msg:Object):void { - trace("*** Poll destroyed " + msg.msg + " **** \n"); + trace(LOG + "*** Poll destroyed " + msg.msg + " **** \n"); /* if (model.hasPoll(msg.id)) { model.destroyPoll(msg.id); @@ -71,7 +135,7 @@ package org.bigbluebutton.modules.polling.service } public function handlePollStartedMesage(msg:Object):void { - trace("*** Poll started " + msg.msg + " **** \n"); + trace(LOG + "*** Poll started " + msg.msg + " **** \n"); /* if (model.hasPoll(msg.id)) { model.startPoll(msg.id); @@ -82,7 +146,7 @@ package org.bigbluebutton.modules.polling.service } public function handlePollStoppedMesage(msg:Object):void { - trace("*** Poll stopped " + msg.msg + " **** \n"); + trace(LOG + "*** Poll stopped " + msg.msg + " **** \n"); /* if (model.hasPoll(msg.id)) { model.stopPoll(msg.id); diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/CreatedPollsRenderer.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/CreatedPollsRenderer.mxml index c9c8c9596a..892fa47cac 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/CreatedPollsRenderer.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/CreatedPollsRenderer.mxml @@ -13,7 +13,7 @@ private function startPoll():void { trace(LOG + "::startPoll() " + data.id); var event:OpenTakePollWindowEvent = new OpenTakePollWindowEvent(data.id); - globalDispatch.dispatchEvent(event); + globalDispatch.dispatchEvent(event); } private function deletePoll():void { @@ -22,7 +22,7 @@ ]]> - diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/DisplayResultBarChartPanel.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/DisplayResultBarChartPanel.mxml index 36e99cba1f..9169bac841 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/DisplayResultBarChartPanel.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/DisplayResultBarChartPanel.mxml @@ -1,54 +1,37 @@ + borderThicknessRight="0" borderThicknessTop="0" creationComplete="preInit()"> - - + diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/DisplayResultPieChartPanel.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/DisplayResultPieChartPanel.mxml index 98cdd332e2..727c756621 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/DisplayResultPieChartPanel.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/DisplayResultPieChartPanel.mxml @@ -12,11 +12,7 @@ public var viewModel:PollingViewModel; public var pollID:String; - [Bindable] public var sampleData:ArrayCollection = new ArrayCollection([ - {response:"Chicken", numResponses:4}, - {response:"Hen", numResponses:3}, - {response:"egg", numResponses:6}]); - [Bindable] private var _responses:Array; + [Bindable] private var _responses:Array; private function preInit():void { var q1:QuestionVO = viewModel.getPoll(pollID).questions[0] as QuestionVO; @@ -26,7 +22,7 @@ ]]> diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/PollCreatePanel.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/PollCreatePanel.mxml index b0954e3d4b..0886aeb742 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/PollCreatePanel.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/PollCreatePanel.mxml @@ -114,7 +114,7 @@ - + diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/PollMainPanel.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/PollMainPanel.mxml index 823630bbc6..c6e7180b32 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/PollMainPanel.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/PollMainPanel.mxml @@ -4,6 +4,9 @@ borderThicknessRight="0" borderThicknessTop="0" creationComplete="onPreInit()" > @@ -71,7 +77,7 @@ - + diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/QuestionRenderer.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/QuestionRenderer.mxml index 078241cec7..3cdd9c905e 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/QuestionRenderer.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/QuestionRenderer.mxml @@ -1,25 +1,36 @@ - + diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/TakePollPanel.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/TakePollPanel.mxml index aced0f3383..01dc7e2af3 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/TakePollPanel.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/TakePollPanel.mxml @@ -12,29 +12,21 @@ [Bindable] private var baseIndex:int; - public var viewModel:PollingViewModel; - public var pollID:String; + [Bindable] public var viewModel:PollingViewModel; + [Bindable] public var pollID:String; private var poll:PollVO; [Bindable] private var _title:String; - [Bindable] private var _qvo:QuestionVO; - private var _pollID:String; + [Bindable] private var responseCollector:ResponseCollector; private function preInit():void { - poll = viewModel.getSamplePoll(); - //poll = viewModel.getPoll(pollID); + poll = viewModel.getPoll(pollID); _title = poll.title; - _pollID = poll.id; - _qvo = poll.questions[0] as QuestionVO; - - trace("*********************Title = [" + _title + "]"); - if (_qvo == null) trace("*********************_qvo is null!!!!!!!**************"); - else trace("*********************_qvo is NOT null!!!!!!!**************"); - responseCollector = new ResponseCollector(_pollID); + responseCollector = new ResponseCollector(pollID); } public function updatePoll():void { @@ -79,6 +71,10 @@ } } } + + public function onClose():void { + invalidateDisplayList(); + } ]]> @@ -99,7 +95,7 @@ - + diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/TakePollWindow.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/TakePollWindow.mxml index 432d5b790d..baad1577fc 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/TakePollWindow.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/TakePollWindow.mxml @@ -39,9 +39,15 @@ Notes.mxml is the main view of the SharedNotes application return MainCanvas.POPUP; } + override public function close(event:MouseEvent = null):void { + invalidateDisplayList(); + takePollPanel.onClose(); + super.close(event); + } + ]]> - + diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/ToolbarButton.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/ToolbarButton.mxml index 60742d4de0..52343aa046 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/ToolbarButton.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/polling/views/ToolbarButton.mxml @@ -27,23 +27,26 @@ xmlns:mate="http://mate.asfusion.com/" toolTip="{ResourceUtil.getInstance().getString('bbb.polling.toolbar.toolTip')}" implements="org.bigbluebutton.common.IBbbToolbarComponent" - initialize="init();" + initialize="init();" creationComplete="onCreationComplete()" click="createAndShow();" icon="{pollIcon}" accessibilityName="{ResourceUtil.getInstance().getString('bbb.polling.buttonName')}" >