张桐

修改撤销上一步标注,只能撤销当前页, 修改用户名从地址栏取到

@@ -27,7 +27,6 @@ @@ -27,7 +27,6 @@
27 27
28 28
29 <script type="text/javascript" src="src/videoWithFlash.js"></script> 29 <script type="text/javascript" src="src/videoWithFlash.js"></script>
30 - <!--<script type="text/javascript" src="src/nativeVideo.js"></script>-->  
31 30
32 31
33 </head> 32 </head>
@@ -81,7 +80,30 @@ @@ -81,7 +80,30 @@
81 <!--<i></i>--> 80 <!--<i></i>-->
82 <!--</div>--> 81 <!--</div>-->
83 <!--<a id="a-status" href="javascript: void(0)">未开始</a></li>--> 82 <!--<a id="a-status" href="javascript: void(0)">未开始</a></li>-->
  83 + <!--右侧未开始-->
  84 + <div class="am-dropdown" data-am-dropdown>
  85 + <button type="button" class="am-btn am-btn-primary am-dropdown-toggle " data-am-dropdown-toggle><span
  86 + id="span-iconfont" class="span-classes iconfont">&#xe62b;</span><span id="class-now">未开始</span>
  87 + </button>
  88 + <ul class="am-dropdown-content">
  89 + <li><span id="am-dropdown-content-span-1" class="am-dropdown-content-span iconfont">&#xe61d;</span>
  90 + <button id="classes-status-1" type="button"
  91 + class="am-btn am-btn-primary am-dropdown-content-button"
  92 + href="#">开始上课
  93 + </button>
  94 + </li>
84 95
  96 + <li><span class="am-dropdown-content-span iconfont">&#xe607;</span>
  97 + <button id="classes-status-2" type="button"
  98 + class="am-btn am-btn-primary am-dropdown-content-button"
  99 + data-am-modal="{target: '#end-classes', closeViaDimmer: 0, width: 340, height: 172}"
  100 + href="#">结束课堂
  101 + </button>
  102 + </li>
  103 +
  104 +
  105 + </ul>
  106 + </div>
85 <li class="classroom"><a id="classCurName" href="javascript: void(0)"></a></li> 107 <li class="classroom"><a id="classCurName" href="javascript: void(0)"></a></li>
86 <li class="classCurId"><a id="classCurId" href="javascript: void(0)"></a></li> 108 <li class="classCurId"><a id="classCurId" href="javascript: void(0)"></a></li>
87 109
@@ -165,30 +187,30 @@ @@ -165,30 +187,30 @@
165 </button></a> 187 </button></a>
166 </div> 188 </div>
167 189
168 - <!--右侧未开始-->  
169 - <div class="am-dropdown" data-am-dropdown>  
170 - <button type="button" class="am-btn am-btn-primary am-dropdown-toggle " data-am-dropdown-toggle><span  
171 - id="span-iconfont" class="span-classes iconfont">&#xe62b;</span><span id="class-now">未开始</span>  
172 - </button>  
173 - <ul class="am-dropdown-content">  
174 - <li><span id="am-dropdown-content-span-1" class="am-dropdown-content-span iconfont">&#xe61d;</span>  
175 - <button id="classes-status-1" type="button"  
176 - class="am-btn am-btn-primary am-dropdown-content-button"  
177 - href="#">开始上课  
178 - </button>  
179 - </li>  
180 -  
181 - <li><span class="am-dropdown-content-span iconfont">&#xe607;</span>  
182 - <button id="classes-status-2" type="button"  
183 - class="am-btn am-btn-primary am-dropdown-content-button"  
184 - data-am-modal="{target: '#end-classes', closeViaDimmer: 0, width: 340, height: 172}"  
185 - href="#">结束课堂  
186 - </button>  
187 - </li>  
188 -  
189 -  
190 - </ul>  
191 - </div> 190 + <!--&lt;!&ndash;右侧未开始&ndash;&gt;-->
  191 + <!--<div class="am-dropdown" data-am-dropdown>-->
  192 + <!--<button type="button" class="am-btn am-btn-primary am-dropdown-toggle " data-am-dropdown-toggle><span-->
  193 + <!--id="span-iconfont" class="span-classes iconfont">&#xe62b;</span><span id="class-now">未开始</span>-->
  194 + <!--</button>-->
  195 + <!--<ul class="am-dropdown-content">-->
  196 + <!--<li><span id="am-dropdown-content-span-1" class="am-dropdown-content-span iconfont">&#xe61d;</span>-->
  197 + <!--<button id="classes-status-1" type="button"-->
  198 + <!--class="am-btn am-btn-primary am-dropdown-content-button"-->
  199 + <!--href="#">开始上课-->
  200 + <!--</button>-->
  201 + <!--</li>-->
  202 +
  203 + <!--<li><span class="am-dropdown-content-span iconfont">&#xe607;</span>-->
  204 + <!--<button id="classes-status-2" type="button"-->
  205 + <!--class="am-btn am-btn-primary am-dropdown-content-button"-->
  206 + <!--data-am-modal="{target: '#end-classes', closeViaDimmer: 0, width: 340, height: 172}"-->
  207 + <!--href="#">结束课堂-->
  208 + <!--</button>-->
  209 + <!--</li>-->
  210 +
  211 +
  212 + <!--</ul>-->
  213 + <!--</div>-->
192 214
193 215
194 <!--弹出层-结束课堂--> 216 <!--弹出层-结束课堂-->
@@ -586,7 +608,7 @@ @@ -586,7 +608,7 @@
586 <li></li> 608 <li></li>
587 <li class="userNameLi"> 609 <li class="userNameLi">
588 <div class="userNameBg"></div> 610 <div class="userNameBg"></div>
589 - <input value="xdykt" class="userNameInput" type="text" placeholder="请输入用户名" maxlength="20" onkeyup="this.value=this.value.replace(/^ +| +$/g,'')"> 611 + <input class="userNameInput" type="text" placeholder="请输入用户名" maxlength="20" onkeyup="this.value=this.value.replace(/^ +| +$/g,'')">
590 </li> 612 </li>
591 <li> 613 <li>
592 <p class="userTip"></p> 614 <p class="userTip"></p>
此 diff 太大无法显示。
@@ -13,7 +13,6 @@ var canvasWidth = 880; @@ -13,7 +13,6 @@ var canvasWidth = 880;
13 var canvasHeight = 718; 13 var canvasHeight = 718;
14 var recordPencilResult={}; 14 var recordPencilResult={};
15 var recordPencilObj={}; 15 var recordPencilObj={};
16 -var recordPencil=[];  
17 var recordPencilTotal=[]; 16 var recordPencilTotal=[];
18 var recordPencilId; 17 var recordPencilId;
19 18
@@ -59,7 +58,7 @@ var canvasTop; @@ -59,7 +58,7 @@ var canvasTop;
59 var canvasLeft; 58 var canvasLeft;
60 59
61 //画笔大小 60 //画笔大小
62 -var size = 2; 61 +var size = 1;
63 var color = '#b8242a'; 62 var color = '#b8242a';
64 63
65 //画图形 64 //画图形
@@ -419,11 +418,7 @@ var color = '#b8242a'; @@ -419,11 +418,7 @@ var color = '#b8242a';
419 // 418 //
420 // } 419 // }
421 } 420 }
422 -//撤销上一步操作  
423 -function lastStep() {  
424 - client.sendGotoPrev();  
425 421
426 -}  
427 //清空层 422 //清空层
428 function clearContextCan(type){ 423 function clearContextCan(type){
429 if(!type){ 424 if(!type){
@@ -495,7 +490,7 @@ window.draw={ @@ -495,7 +490,7 @@ window.draw={
495 clearCanvasCon:clearCanvasCon, 490 clearCanvasCon:clearCanvasCon,
496 trans:trans, 491 trans:trans,
497 clearContextCan:clearContextCan, 492 clearContextCan:clearContextCan,
498 - lastStep:lastStep, 493 +
499 clearDocCanvas:clearDocCanvas 494 clearDocCanvas:clearDocCanvas
500 }; 495 };
501 })(); 496 })();
@@ -24,11 +24,10 @@ $(function (){ @@ -24,11 +24,10 @@ $(function (){
24 draw.draw_graph('pencil', this); 24 draw.draw_graph('pencil', this);
25 }); 25 });
26 $(".rescind").on("click", function () { 26 $(".rescind").on("click", function () {
27 - draw.lastStep();  
28 27
  28 + client.sendGotoPrev();
29 }); 29 });
30 30
31 -  
32 $(".handwriting").on("click", function () { 31 $(".handwriting").on("click", function () {
33 draw.draw_graph('handwriting', this); 32 draw.draw_graph('handwriting', this);
34 }); 33 });
@@ -48,7 +48,6 @@ $(function () { @@ -48,7 +48,6 @@ $(function () {
48 initEngine();//加载MCUClientEngine; 48 initEngine();//加载MCUClientEngine;
49 listenClass(); 49 listenClass();
50 loading(); 50 loading();
51 -  
52 urlParamsJudge();//对地址栏参数的数据进行判断 51 urlParamsJudge();//对地址栏参数的数据进行判断
53 }); 52 });
54 53
@@ -610,7 +609,7 @@ function classFailed(callbackData) { @@ -610,7 +609,7 @@ function classFailed(callbackData) {
610 switch(code) { 609 switch(code) {
611 case 100: 610 case 100:
612 //当前没有 课堂号 用户角色 ip 611 //当前没有 课堂号 用户角色 ip
613 - if((classLoadInfo.classId)==""||classLoadInfo.userRole==""||(classLoadInfo.portal)==":"||(classLoadInfo.portalPort)==""||(classLoadInfo.portalIP)==""||(classLoadInfo.userName)==""||(classLoadInfo.userType=="")){ 612 + if((classLoadInfo.classId)==""||classLoadInfo.userRole==""||(classLoadInfo.portal)==":"||(classLoadInfo.portalPort)==""||(classLoadInfo.portalIP)==""||(classLoadInfo.userName)==""){
614 console.log("不会执行clientInit"); 613 console.log("不会执行clientInit");
615 614
616 //用户进行角色选择 615 //用户进行角色选择
@@ -744,10 +743,14 @@ function showLogin(isShow){ @@ -744,10 +743,14 @@ function showLogin(isShow){
744 "margin":"0 auto" 743 "margin":"0 auto"
745 }); 744 });
746 745
  746 +
  747 +
747 if (isShow) { 748 if (isShow) {
748 //登录页面显示(有密码) 749 //登录页面显示(有密码)
749 $(".loginBg ").css("display","block"); 750 $(".loginBg ").css("display","block");
750 console.log("loginBgblock"); 751 console.log("loginBgblock");
  752 + $(".userNameInput")[0].value=classLoadInfo.userName;
  753 + $(".passWordInput")[0].innerHTML=$(".passWordInput")[0].value;
751 $(".userNameInput").focus(function () { 754 $(".userNameInput").focus(function () {
752 $(".userTip").css("margin-left","0"); 755 $(".userTip").css("margin-left","0");
753 $(".userTip")[0].innerHTML="支持中文、字母、数字、“-”“_”的组合,4-20个字符"; 756 $(".userTip")[0].innerHTML="支持中文、字母、数字、“-”“_”的组合,4-20个字符";
@@ -777,11 +780,15 @@ function showLogin(isShow){ @@ -777,11 +780,15 @@ function showLogin(isShow){
777 $(".passWordInput").blur(function () { 780 $(".passWordInput").blur(function () {
778 $(".passWordTip")[0].innerHTML="请输入课堂密码"; 781 $(".passWordTip")[0].innerHTML="请输入课堂密码";
779 }) 782 })
  783 +
780 $("#btnLogin").click(function (e) { 784 $("#btnLogin").click(function (e) {
781 785
782 console.log("点击了登录按钮---------->"); 786 console.log("点击了登录按钮---------->");
783 - var userName = $(".userNameInput").val();  
784 - var pwd = $(".passWordInput").val(); 787 + var userName = classLoadInfo.userName;
  788 + var pwd = $(".passWordInput")[0].value;
  789 +
  790 + // var userName = $(".userNameInput").val();
  791 + // var pwd = $(".passWordInput").val();
785 792
786 if (!userName) { 793 if (!userName) {
787 $(".userTip").css("margin-left","45px"); 794 $(".userTip").css("margin-left","45px");
@@ -796,11 +803,12 @@ function showLogin(isShow){ @@ -796,11 +803,12 @@ function showLogin(isShow){
796 if($(".passWordInput").val().length>=1){ 803 if($(".passWordInput").val().length>=1){
797 $(".passWordTip")[0].innerHTML=""; 804 $(".passWordTip")[0].innerHTML="";
798 } 805 }
799 - if (($('.userNameInput').val().length>=4) &&($(".passWordInput").val().length>=1)) {  
800 - 806 + if (($('.userNameInput').val().length>=1) &&($(".passWordInput").val().length>=1)) {
  807 + console.log(userName,pwd);
801 onJoinClass(userName, pwd); 808 onJoinClass(userName, pwd);
802 } 809 }
803 }); 810 });
  811 + // $("#btnLogin").trigger("click");
804 812
805 }else{ 813 }else{
806 //登录页面显示(无密码) 814 //登录页面显示(无密码)
@@ -809,6 +817,8 @@ function showLogin(isShow){ @@ -809,6 +817,8 @@ function showLogin(isShow){
809 $(".btnLoginLi").css("margin-top","30px"); 817 $(".btnLoginLi").css("margin-top","30px");
810 818
811 console.log("无密码"); 819 console.log("无密码");
  820 + $(".userNameInput")[0].value=classLoadInfo.userName;
  821 + $(".passWordInput")[0].value= $(".passWordInput")[0].innerHTML;
812 $(".userNameInput").focus(function () { 822 $(".userNameInput").focus(function () {
813 $(".userTip").css("margin-left","0"); 823 $(".userTip").css("margin-left","0");
814 $(".userTip")[0].innerHTML="支持中文、字母、数字、“-”“_”的组合,4-20个字符"; 824 $(".userTip")[0].innerHTML="支持中文、字母、数字、“-”“_”的组合,4-20个字符";
@@ -834,15 +844,17 @@ function showLogin(isShow){ @@ -834,15 +844,17 @@ function showLogin(isShow){
834 844
835 $("#btnLogin").click(function (e) { 845 $("#btnLogin").click(function (e) {
836 console.log("点击了登录按钮---------->"); 846 console.log("点击了登录按钮---------->");
837 - var userName = $(".userNameInput").val();  
838 - var pwd = $(".passWordInput").val(); 847 + var userName = classLoadInfo.userName;
  848 + console.log(userName,pwd);
  849 + // var userName = $(".userNameInput").val();
  850 + // var pwd = $(".passWordInput").val();
839 if ($(".userNameInput").length) { 851 if ($(".userNameInput").length) {
840 if (!userName) { 852 if (!userName) {
841 $(".userTip").css("margin-left","45px"); 853 $(".userTip").css("margin-left","45px");
842 $(".userTip")[0].innerHTML="用户名不能为空"; 854 $(".userTip")[0].innerHTML="用户名不能为空";
843 } 855 }
844 } 856 }
845 - if($('.userNameInput').val().length>=4){ 857 + if($('.userNameInput').val().length>=1){
846 onJoinClass(userName); 858 onJoinClass(userName);
847 } 859 }
848 }); 860 });
@@ -1044,9 +1056,19 @@ function whiteboardUpdate(callbackData) { @@ -1044,9 +1056,19 @@ function whiteboardUpdate(callbackData) {
1044 console.log("同步canvas消息"); 1056 console.log("同步canvas消息");
1045 console.log(callbackData); 1057 console.log(callbackData);
1046 draw.drawCanvas(callbackData); 1058 draw.drawCanvas(callbackData);
  1059 + // if (callbackData.annotaionItems.length>0) {
  1060 + // if (callbackData.annotaionItems[0].pointGroup.length > 0) {
  1061 + // $(".rescind").on("click", function () {
  1062 + // client.sendGotoPrev();
  1063 + // });
  1064 + // }
  1065 + // }
  1066 +
  1067 +
  1068 +
1047 $(".spinner").css("display","none"); 1069 $(".spinner").css("display","none");
1048 - $(".spinner1").css("display","none");  
1049 - // $(".doc-headline-a").trigger("click"); 1070 +
  1071 +
1050 } 1072 }
1051 1073
1052 1074
@@ -1151,6 +1173,8 @@ function urlParamsJudge(){ @@ -1151,6 +1173,8 @@ function urlParamsJudge(){
1151 classParamInfo.userId=classLoadInfo.userId; //第三方用户id 1173 classParamInfo.userId=classLoadInfo.userId; //第三方用户id
1152 classParamInfo.userType=classLoadInfo.userType; //用户的身份 默认1 1174 classParamInfo.userType=classLoadInfo.userType; //用户的身份 默认1
1153 classParamInfo.userName=classLoadInfo.userName; //第三方用户名称 1175 classParamInfo.userName=classLoadInfo.userName; //第三方用户名称
  1176 + // classParamInfo.passWord=classLoadInfo.passWord; //用户密码
  1177 +
1154 console.log("传给底层,进行初始化的数据"); 1178 console.log("传给底层,进行初始化的数据");
1155 console.log(classParamInfo); 1179 console.log(classParamInfo);
1156 clientInit(classParamInfo); 1180 clientInit(classParamInfo);
@@ -1177,6 +1201,8 @@ function getURLParams(){ @@ -1177,6 +1201,8 @@ function getURLParams(){
1177 classLoadInfo.userType=parseInt(classUrlParam.userType)||1; 1201 classLoadInfo.userType=parseInt(classUrlParam.userType)||1;
1178 classLoadInfo.userId=classUrlParam.userId?classUrlParam.userId:"0"; 1202 classLoadInfo.userId=classUrlParam.userId?classUrlParam.userId:"0";
1179 classLoadInfo.portal=classLoadInfo.portalIP+":"+classLoadInfo.portalPort; 1203 classLoadInfo.portal=classLoadInfo.portalIP+":"+classLoadInfo.portalPort;
  1204 + // classLoadInfo.passWord=classUrlParam.passWord||"";
  1205 +
1180 console.log(classLoadInfo); 1206 console.log(classLoadInfo);
1181 return classLoadInfo; 1207 return classLoadInfo;
1182 } 1208 }