Commit 03c4b4452e374ba5ce13fbae50b53331fc74a268
1 parent
663f7141
fix bug
Showing
3 changed files
with
7 additions
and
49 deletions
src/index.html
| ... | ... | @@ -55,21 +55,6 @@ |
| 55 | 55 | |
| 56 | 56 | </head> |
| 57 | 57 | <body> |
| 58 | -<!-- <div class="real-program-title"> | |
| 59 | - <div class="back"> | |
| 60 | - <i class="gxbrecording record-back" style="color: #1FB6FF"> 返回课程</i> | |
| 61 | - <span>| 我的课程</span> | |
| 62 | - </div> | |
| 63 | - <div class="save-wrap"> | |
| 64 | - <div class="upload-tip" style="display: none;"> | |
| 65 | - <img src="img/upload_tip.png" alt=""> | |
| 66 | - </div> | |
| 67 | - <input type="button" id="upload" class="upload-teach" style="display: ;" disabled="disabled" value="保存"> | |
| 68 | - <input type="button" id="savecorde" class="upload-stud" style="display: none;" disabled="disabled" value="保存"> | |
| 69 | - <input type="button" id="cancel" value="关闭"> | |
| 70 | - </div> | |
| 71 | - </div> --> | |
| 72 | - | |
| 73 | 58 | <div class="real-program-content recording-page"> |
| 74 | 59 | <div class="row"> |
| 75 | 60 | <div class="col-md-8" id="editorpanel"> |
| ... | ... | @@ -137,7 +122,7 @@ |
| 137 | 122 | <div class="btn-group pull-right" id="comprunbtngrp"></div> |
| 138 | 123 | </div> |
| 139 | 124 | <div class="panel-body hidden" id="cmprun-output"> |
| 140 | - <div id="resultoutput" style="overflow:auto;"> | |
| 125 | + <div id="resultoutput"> | |
| 141 | 126 | <!-- Nav tabs --> |
| 142 | 127 | <ul class="nav nav-tabs" role="tablist" id="cmprun-tabs"> |
| 143 | 128 | <li class="active"><a href="#stdin" role="tab" data-toggle="tab" class="text-warning">标准输入</a></li> |
| ... | ... | @@ -182,17 +167,6 @@ |
| 182 | 167 | </div> |
| 183 | 168 | </div> |
| 184 | 169 | |
| 185 | -<!-- <div class="recording-audio recording"> | |
| 186 | - <button class="audio-finish" type="button" data="1" title="正在录音"> | |
| 187 | - <span class="stop"></span> | |
| 188 | - </button> | |
| 189 | - <button class="audio-play" title="正在录音" disable="false"></button> | |
| 190 | - <div class="f1 audio-wrap" style="line-height: 60px;"> | |
| 191 | - <audio id="audio" autoplay></audio> | |
| 192 | - </div> | |
| 193 | - <div class="recording-time" value=""></div> | |
| 194 | - </div> --> | |
| 195 | - | |
| 196 | 170 | <div class="upload-tip" style="display: none;"> |
| 197 | 171 | <img src="img/upload_tip.png" alt=""> |
| 198 | 172 | </div> | ... | ... |
src/js/gbreplayer.js
| ... | ... | @@ -471,7 +471,6 @@ $(function(){ |
| 471 | 471 | if(document.URL.indexOf('player.html')>=0){ |
| 472 | 472 | if(playstatus){ |
| 473 | 473 | GBCodePlayBack.pauseData = new Date().getTime(); // 暂停的时间 |
| 474 | - console.log(GBCodePlayBack.pauseData) | |
| 475 | 474 | myAudio[0].pause(); |
| 476 | 475 | $('#play').find('i').removeClass('icon-playcopy').addClass('icon-play').attr('data-original-title', '播放'); |
| 477 | 476 | }else{ |
| ... | ... | @@ -500,32 +499,21 @@ $(function(){ |
| 500 | 499 | if (tag === 1) { |
| 501 | 500 | GBCodePlayBack.stopIntervalTime = playbackrecord[0].intervaltime - (GBCodePlayBack.pauseData - GBCodePlayBack.playRecordStart); |
| 502 | 501 | starttime = GBCodePlayBack.stopIntervalTime |
| 503 | - console.log(starttime) | |
| 504 | 502 | tag++; |
| 505 | 503 | }else{ |
| 506 | 504 | GBCodePlayBack.stopIntervalTime = GBCodePlayBack.stopIntervalTime - (GBCodePlayBack.pauseData - GBCodePlayBack.playRecordStart); |
| 507 | 505 | starttime = GBCodePlayBack.stopIntervalTime; |
| 508 | - console.log('------------------------------') | |
| 509 | - console.log(tag) | |
| 510 | - console.log(starttime) | |
| 511 | - console.log('------------------------------') | |
| 512 | 506 | } |
| 513 | - console.log(starttime) | |
| 514 | 507 | } |
| 515 | 508 | |
| 516 | - console.log(starttime) | |
| 517 | 509 | |
| 518 | 510 | }else{ |
| 519 | 511 | starttime = parseInt(starttime) + parseInt(replayinterval); |
| 520 | 512 | |
| 521 | 513 | if (GBCodePlayBack.pauseData && GBCodePlayBack.pauseData - playbackrecord[i-1].playTime > 0) { |
| 522 | - console.log('+++++++++++++++++++++++++++++++++++++++') | |
| 523 | 514 | GBCodePlayBack.stopIntervalTime = GBCodePlayBack.pauseData - playbackrecord[i-1].playTime; |
| 524 | 515 | starttime = GBCodePlayBack.stopIntervalTime + parseInt(replayinterval); |
| 525 | - console.log(starttime) | |
| 526 | 516 | } |
| 527 | - | |
| 528 | - console.log(starttime) | |
| 529 | 517 | } |
| 530 | 518 | |
| 531 | 519 | timeoutcontroller = setTimeout( GBCodePlayBack.changeValueCallback(playbackrecord[i]), starttime/GBCodePlayBack.speed ); |
| ... | ... | @@ -538,7 +526,6 @@ $(function(){ |
| 538 | 526 | } |
| 539 | 527 | // 记录播放的时间 |
| 540 | 528 | GBCodePlayBack.playRecordStart = new Date().getTime(); |
| 541 | - console.log(GBCodePlayBack.playRecordStart); | |
| 542 | 529 | }else{ |
| 543 | 530 | var recordtimeoutcontrolls = GBCodePlayBack.recordtimeoutcontrolls; |
| 544 | 531 | |
| ... | ... | @@ -548,8 +535,6 @@ $(function(){ |
| 548 | 535 | |
| 549 | 536 | GBCodePlayBack.recordtimeouts = []; |
| 550 | 537 | // GBCodePlayBack.playRecordStart = new Date().getTime(); // 再次开始播放的时间 |
| 551 | - | |
| 552 | - console.log(GBCodePlayBack); | |
| 553 | 538 | } |
| 554 | 539 | $(this).data('status', !playstatus); |
| 555 | 540 | }); |
| ... | ... | @@ -653,7 +638,6 @@ $(function(){ |
| 653 | 638 | //播放代码回放 |
| 654 | 639 | $('#playrecord').click(function(){ |
| 655 | 640 | // GBCodePlayBack.playRecordStart = new Date().getTime(); // 开始播放的时间 |
| 656 | - // console.log(GBCodePlayBack.playRecordStart); | |
| 657 | 641 | if($(window).width()>992){ |
| 658 | 642 | var $tutorial = $('#tutorialinfopanel'), |
| 659 | 643 | $editorpanel = $('#editorpanel'), |
| ... | ... | @@ -669,7 +653,7 @@ $(function(){ |
| 669 | 653 | |
| 670 | 654 | $sliderpropress.slider( "option", "disabled", false ); |
| 671 | 655 | |
| 672 | - $(this).popover('destroy'); | |
| 656 | + // $(this).popover('destroy'); | |
| 673 | 657 | |
| 674 | 658 | $(this).find('span').toggleClass('glyphicon-cloud-download').toggleClass('glyphicon-play'); |
| 675 | 659 | |
| ... | ... | @@ -1027,7 +1011,6 @@ $(function(){ |
| 1027 | 1011 | dataType: "json", |
| 1028 | 1012 | contentType: "application/json", |
| 1029 | 1013 | success: function(data){ |
| 1030 | - console.log(data) | |
| 1031 | 1014 | $(window).unbind('beforeunload'); |
| 1032 | 1015 | var _data = { |
| 1033 | 1016 | "programId": data.codeReplayId, |
| ... | ... | @@ -1055,7 +1038,6 @@ $(function(){ |
| 1055 | 1038 | dataType: "json", |
| 1056 | 1039 | contentType: "application/json", |
| 1057 | 1040 | success: function(data) { |
| 1058 | - console.log(data) | |
| 1059 | 1041 | $(window).unbind('beforeunload'); |
| 1060 | 1042 | var _data = { |
| 1061 | 1043 | "programId": data.studentReplayId, |
| ... | ... | @@ -1421,6 +1403,7 @@ $(function(){ |
| 1421 | 1403 | var calcHeight = function() { |
| 1422 | 1404 | var $resultpanel = $("#resultpanel").offset(); |
| 1423 | 1405 | var $recordpanel = $("#recordpanel").offset(); |
| 1406 | + var $resultoutput = $('#resultoutput').offset(); | |
| 1424 | 1407 | |
| 1425 | 1408 | if (document.URL.indexOf('index.htm') >= 0) { |
| 1426 | 1409 | $("#recordpanel").height($(window).height() - $recordpanel.top - 16 - 70); |
| ... | ... | @@ -1431,6 +1414,8 @@ $(function(){ |
| 1431 | 1414 | $("#resultpanel").height($(window).height() - $resultpanel.top - 16 - 34); |
| 1432 | 1415 | $(".CodeMirror").height($(window).height() - $recordpanel.top - 16 - 34); |
| 1433 | 1416 | } |
| 1417 | + $('#resultoutput').find('.tab-content').height($(window).height() - $resultoutput.top - 164).css({'overflow-y': "scroll"}) | |
| 1418 | + | |
| 1434 | 1419 | /*保证编辑器都尺寸自动变化(包括滚动条)*/ |
| 1435 | 1420 | if(typeof GBCodePlayBack.htmleditor !=='undefined'&&typeof GBCodePlayBack.csseditor!=='undefined'&&typeof GBCodePlayBack.jseditor!=='undefined'){ |
| 1436 | 1421 | GBCodePlayBack.htmleditor.refresh(); |
| ... | ... | @@ -1443,7 +1428,7 @@ $(function(){ |
| 1443 | 1428 | // $('#editorwrapper').find('button').removeClass('btn-primary').find('#allbutton').addClass('btn-primary'); |
| 1444 | 1429 | calcHeight(); |
| 1445 | 1430 | //窗口变化则隐藏popover |
| 1446 | - $('#playrecord').popover('hide'); | |
| 1431 | + // $('#playrecord').popover('hide'); | |
| 1447 | 1432 | }).load(function() { |
| 1448 | 1433 | calcHeight(); |
| 1449 | 1434 | }); |
| ... | ... | @@ -1489,7 +1474,6 @@ $(function(){ |
| 1489 | 1474 | |
| 1490 | 1475 | record.trigger = 1; //标记已运行 |
| 1491 | 1476 | record.playTime = new Date().getTime(); // 播放开始时间 |
| 1492 | - console.log(record) | |
| 1493 | 1477 | |
| 1494 | 1478 | if(replay_type){ |
| 1495 | 1479 | GBCodePlayBack.excercise_triggertotal += 1; | ... | ... |
src/player.html
| ... | ... | @@ -141,7 +141,7 @@ |
| 141 | 141 | </div> |
| 142 | 142 | |
| 143 | 143 | <div class="play-bar"> |
| 144 | - <button id="playrecord" data-status='0' title="播放"> | |
| 144 | + <button id="playrecord" data-status='0' title="播adasdas放"> | |
| 145 | 145 | <i class="icon iconfont icon-play"></i> |
| 146 | 146 | </button> |
| 147 | 147 | <button id="play" class="" style="display: none;" data-status='0' title="暂停"> | ... | ... |