Commit c2885599a71c0f433d34c161cbd26056cdc246ee
1 parent
fd401e75
fix play and pause
Showing
3 changed files
with
21 additions
and
25 deletions
src/gxb-ide/CodingEditer.js
| ... | ... | @@ -12,6 +12,7 @@ |
| 12 | 12 | isRcording: false, |
| 13 | 13 | firstPlay: 1, // 第一次播放 |
| 14 | 14 | pauseValue: [], |
| 15 | + isRecordPage: 1, | |
| 15 | 16 | init: function(){ |
| 16 | 17 | console.log('CodingEditer'); |
| 17 | 18 | }, |
| ... | ... | @@ -93,19 +94,20 @@ |
| 93 | 94 | * Created by Kira on 2017-02-08 |
| 94 | 95 | */ |
| 95 | 96 | playCoding: function(){ |
| 97 | + CodingEditer.editable(1); | |
| 96 | 98 | |
| 97 | - // if (CodingEditer.firstPlay == 0) { | |
| 98 | - // CodingEditer.setCodeMirrorValue(); | |
| 99 | - // Dir.showEdite({'treeNode': CodingEditer.treeSelectNode}); | |
| 100 | - // }else{ | |
| 101 | - // CodingEditer.resetCodeMirrorValue(1); | |
| 102 | - // var iterm = new Iterm(); | |
| 103 | - // iterm.compileResult() | |
| 104 | - // } | |
| 99 | + if (CodingEditer.firstPlay == 0) { | |
| 100 | + CodingEditer.setCodeMirrorValue(); | |
| 101 | + Dir.showEdite({'treeNode': CodingEditer.treeSelectNode}); | |
| 102 | + }else{ | |
| 103 | + CodingEditer.resetCodeMirrorValue(1); | |
| 104 | + var iterm = new Iterm(); | |
| 105 | + iterm.compileResult() | |
| 106 | + } | |
| 105 | 107 | |
| 106 | - CodingEditer.resetCodeMirrorValue(1); | |
| 107 | - var iterm = new Iterm(); | |
| 108 | - iterm.compileResult() | |
| 108 | + // CodingEditer.resetCodeMirrorValue(1); | |
| 109 | + // var iterm = new Iterm(); | |
| 110 | + // iterm.compileResult() | |
| 109 | 111 | |
| 110 | 112 | var playbackrecord = CodingEditer.records; |
| 111 | 113 | var starttime = 0; |
| ... | ... | @@ -113,13 +115,6 @@ |
| 113 | 115 | |
| 114 | 116 | $('#recordertab a:eq(1)').tab('show'); |
| 115 | 117 | |
| 116 | - // if (playerpage) { | |
| 117 | - // $('#recordertab a:eq(0)').tab('show'); | |
| 118 | - // }else{ | |
| 119 | - // $('#recordertab a:eq(1)').tab('show'); | |
| 120 | - // } | |
| 121 | - | |
| 122 | - | |
| 123 | 118 | for (var i = 0; i < playbackrecord.length; i++) { |
| 124 | 119 | if (playbackrecord[i].trigger === 1) { |
| 125 | 120 | playTotalTime += parseInt(playbackrecord[i].intervaltime); |
| ... | ... | @@ -406,8 +401,10 @@ |
| 406 | 401 | CodingEditer.triggertotal += 1; |
| 407 | 402 | |
| 408 | 403 | if (CodingEditer.triggertotal === CodingEditer.records.length && !replay_type) { |
| 409 | - | |
| 410 | - $('#recordertab a:first').tab('show'); | |
| 404 | + CodingEditer.editable(0); | |
| 405 | + if (CodingEditer.isRecordPage) { | |
| 406 | + $('#recordertab a:first').tab('show'); | |
| 407 | + } | |
| 411 | 408 | |
| 412 | 409 | for (var i = 0; i < CodingEditer.records.length; i++) { |
| 413 | 410 | CodingEditer.records[i].trigger = 0; | ... | ... |
src/js/player.js
src/v1.1/player1.html
| ... | ... | @@ -75,14 +75,14 @@ |
| 75 | 75 | <!-- 控制条 --> |
| 76 | 76 | <div class="record-title"> |
| 77 | 77 | <ul id="recordertab" class="nav nav-tabs pull-left"> |
| 78 | - <li class="active"> | |
| 78 | + <li class="active" style="display: none;"> | |
| 79 | 79 | <a href="#recordzone" data-toggle="tab"> |
| 80 | 80 | <i class="icon iconfont icon-suspend"></i>课程录制区 |
| 81 | 81 | </a> |
| 82 | 82 | </li> |
| 83 | 83 | <li> |
| 84 | 84 | <a href="#replayzone" data-toggle="tab"> |
| 85 | - <i class="icon iconfont icon-yulan"></i>课程预览区 | |
| 85 | + <i class="icon iconfont icon-yulan"></i>课程预览 | |
| 86 | 86 | </a> |
| 87 | 87 | </li> |
| 88 | 88 | </ul> | ... | ... |