Index: lams_central/src/flash/org/lamsfoundation/lams/authoring/cv/Canvas.as =================================================================== diff -u -rad1d3440072fec89bef0f6878e4b8f5b8e2c49c9 -r1f7b84242a560c7e000a8e49c4e2476f1dfe22f4 --- lams_central/src/flash/org/lamsfoundation/lams/authoring/cv/Canvas.as (.../Canvas.as) (revision ad1d3440072fec89bef0f6878e4b8f5b8e2c49c9) +++ lams_central/src/flash/org/lamsfoundation/lams/authoring/cv/Canvas.as (.../Canvas.as) (revision 1f7b84242a560c7e000a8e49c4e2476f1dfe22f4) @@ -104,6 +104,9 @@ } + + + public function setupPI(){ if(USE_PROPERTY_INSPECTOR){ initPropertyInspector(); @@ -438,7 +441,7 @@ return true; }else{ var fn:Function = Proxy.create(ref,confirmedClearDesign, ref); - LFMessage.showMessageConfirm("__Are you sure you want to clear your design?__", fn,null); + LFMessage.showMessageConfirm(Dictionary.getValue('new_confirm_msg'), fn,null); Debugger.log('Set design failed as old design could not be cleared',Debugger.CRITICAL,"setDesign",'Canvas'); } @@ -483,10 +486,11 @@ * @return */ public function setPastedItem(o:Object):Object{ + trace("called on right click"); if (o instanceof CanvasActivity){ //clone the activity var newToolActivity:ToolActivity = o.activity.clone(); - newToolActivity.title = "__Copy of__"+newToolActivity.title; + newToolActivity.title = Dictionary.getValue('prefix_copyof')+newToolActivity.title; newToolActivity.activityUIID = _ddm.newUIID(); _ddm.addActivity(newToolActivity); @@ -564,8 +568,42 @@ Cursor.showCursor(Application.C_DEFAULT); canvasModel.activeTool = null; } + public function startGroupTool(){ + Debugger.log('Starting group tool',Debugger.GEN,'startGateTool','Canvas'); + Cursor.showCursor(Application.C_GROUP); + canvasModel.activeTool = CanvasModel.GROUP_TOOL; + } + public function stopGroupTool(){ + Debugger.log('Stopping group tool',Debugger.GEN,'startGateTool','Canvas'); + Cursor.showCursor(Application.C_DEFAULT); + canvasModel.activeTool = null; + } + + /** + * Called by the top menu bar and the tool bar to start the transition tool, switches cursor. + * @usage + * @return + */ + public function startTransitionTool():Void{ + //Debugger.log('Starting transition tool',Debugger.GEN,'startTransitionTool','Canvas'); + Cursor.showCursor(Application.C_TRANSITION); + canvasModel.startTransitionTool(); + } + + /** + * Called by the top menu bar and the tool bar to stop the transition tool, switches cursor. + * @usage + * @return + */ + public function stopTransitionTool():Void{ + //Debugger.log('Stopping transition tool',Debugger.GEN,'stopTransitionTool','Canvas'); + Cursor.showCursor(Application.C_DEFAULT); + canvasModel.stopTransitionTool(); + } + + /** * Method to open Preview popup window. */ public function launchPreviewWindow():Void{ @@ -594,54 +632,18 @@ if(r instanceof LFError){ r.showMessageConfirm(); }else{ + //LFMessage.showMessageAlert('calling javascript from Austhor.jsp'); var uID = Config.getInstance().userID; var serverUrl = Config.getInstance().serverUrl; //Create an instance of JsPopup to access launchPopupWindow method. - JsPopup.getInstance().launchPopupWindow(serverUrl+'learning/learner.do?method=joinLesson&userId='+uID+'&lessonId='+r.lessionID, 'Preview of Lession '+r.lessionID, 570, 796, true, true, true); + JsPopup.getInstance().launchPopupWindow(serverUrl+'learning/learner.do?method=joinLesson&userId='+uID+'&lessonId='+r, 'Preview of Lession '+r.startPreviewSession, 570, 796, true, true, true); + Debugger.log('Recieved Lesson ID: '+r ,Debugger.GEN,'onLaunchPreviewResponse','Canvas'); //_global.breakpoint(); //Debugger.log('_ddm.learningDesignID:'+_ddm.learningDesignID,Debugger.GEN,'onStoreDesignResponse','Canvas'); //var msg:String = "Congratulations! - Your design is valid has been saved with ID:"+r.learningDesignID; } } - - - public function startGroupTool(){ - Debugger.log('Starting group tool',Debugger.GEN,'startGateTool','Canvas'); - Cursor.showCursor(Application.C_GROUP); - canvasModel.activeTool = CanvasModel.GROUP_TOOL; - } - - public function stopGroupTool(){ - Debugger.log('Stopping group tool',Debugger.GEN,'startGateTool','Canvas'); - Cursor.showCursor(Application.C_DEFAULT); - canvasModel.activeTool = null; - } - - - /** - * Called by the top menu bar and the tool bar to start the transition tool, switches cursor. - * @usage - * @return - */ - public function startTransitionTool():Void{ - //Debugger.log('Starting transition tool',Debugger.GEN,'startTransitionTool','Canvas'); - Cursor.showCursor(Application.C_TRANSITION); - canvasModel.startTransitionTool(); - } - - /** - * Called by the top menu bar and the tool bar to stop the transition tool, switches cursor. - * @usage - * @return - */ - public function stopTransitionTool():Void{ - //Debugger.log('Stopping transition tool',Debugger.GEN,'stopTransitionTool','Canvas'); - Cursor.showCursor(Application.C_DEFAULT); - canvasModel.stopTransitionTool(); - } - - /* public function cut():Void{ Debugger.log('Cut',Debugger.GEN,'cut','Canvas');