Commit 9ea3d66e79037ca97a27c78bf0b7f8d6aea708d7
1 parent
8eac15c1
fix 学生端预览只能播放一遍bug
Showing
4 changed files
with
39 additions
and
2 deletions
src/css/recording.css
| @@ -38,6 +38,12 @@ button { | @@ -38,6 +38,12 @@ button { | ||
| 38 | padding-left: 0; | 38 | padding-left: 0; |
| 39 | padding-right: 0; } | 39 | padding-right: 0; } |
| 40 | 40 | ||
| 41 | +.play-code { | ||
| 42 | + background: transparent; | ||
| 43 | + color: #fff; | ||
| 44 | + border: none; | ||
| 45 | + padding-left: 24px; } | ||
| 46 | + | ||
| 41 | .upload-tip { | 47 | .upload-tip { |
| 42 | position: absolute; | 48 | position: absolute; |
| 43 | top: 0; | 49 | top: 0; |
src/js/gb.js
| @@ -996,8 +996,7 @@ $(function() { | @@ -996,8 +996,7 @@ $(function() { | ||
| 996 | } | 996 | } |
| 997 | }); | 997 | }); |
| 998 | }else{ | 998 | }else{ |
| 999 | - playCode(); | ||
| 1000 | - GBCodePlayBack.editable(0) | 999 | + $('.play-code').show(); |
| 1001 | } | 1000 | } |
| 1002 | 1001 | ||
| 1003 | 1002 | ||
| @@ -1990,6 +1989,13 @@ $(function() { | @@ -1990,6 +1989,13 @@ $(function() { | ||
| 1990 | .removeClass('glyphicon-pause'); | 1989 | .removeClass('glyphicon-pause'); |
| 1991 | 1990 | ||
| 1992 | $('#recordertab a:first').tab('show'); | 1991 | $('#recordertab a:first').tab('show'); |
| 1992 | + if(_role == 1){ | ||
| 1993 | + for (var i = 0; i < GBCodePlayBack.records.length; i++) { | ||
| 1994 | + GBCodePlayBack.records[i].trigger = 0; | ||
| 1995 | + } | ||
| 1996 | + // playEnd(); | ||
| 1997 | + } | ||
| 1998 | + | ||
| 1993 | if(document.URL.indexOf('index.htm') >= 0) { | 1999 | if(document.URL.indexOf('index.htm') >= 0) { |
| 1994 | Hourglass.stopTimer(); | 2000 | Hourglass.stopTimer(); |
| 1995 | } | 2001 | } |
| @@ -2029,6 +2035,12 @@ $(function() { | @@ -2029,6 +2035,12 @@ $(function() { | ||
| 2029 | var $sliderpropress = $(".replayprogress"); | 2035 | var $sliderpropress = $(".replayprogress"); |
| 2030 | $sliderpropress.slider("option", "disabled", false); | 2036 | $sliderpropress.slider("option", "disabled", false); |
| 2031 | $('#excerciselist .ineedautocodehelp').data('status', 0).attr('title', '播放').find('span').addClass('glyphicon-play-circle').removeClass('glyphicon-stop'); | 2037 | $('#excerciselist .ineedautocodehelp').data('status', 0).attr('title', '播放').find('span').addClass('glyphicon-play-circle').removeClass('glyphicon-stop'); |
| 2038 | + if(_role == 1){ | ||
| 2039 | + for (var i = 0; i < GBCodePlayBack.records.length; i++) { | ||
| 2040 | + GBCodePlayBack.records[i].trigger = 0; | ||
| 2041 | + } | ||
| 2042 | + // playEnd(); | ||
| 2043 | + } | ||
| 2032 | } | 2044 | } |
| 2033 | } | 2045 | } |
| 2034 | }, | 2046 | }, |
| @@ -2327,6 +2339,12 @@ $(function() { | @@ -2327,6 +2339,12 @@ $(function() { | ||
| 2327 | runResult() | 2339 | runResult() |
| 2328 | }); | 2340 | }); |
| 2329 | 2341 | ||
| 2342 | + $('.play-code').click(function(){ | ||
| 2343 | + playCode(); | ||
| 2344 | + GBCodePlayBack.editable(0) | ||
| 2345 | + // playEnd(); | ||
| 2346 | + }); | ||
| 2347 | + | ||
| 2330 | // 使用服务端编译语言 | 2348 | // 使用服务端编译语言 |
| 2331 | $('#compileBtnGroup').unbind("click").on('click', '#CompileBtn', function(event){ | 2349 | $('#compileBtnGroup').unbind("click").on('click', '#CompileBtn', function(event){ |
| 2332 | console.info('$(\'#compileBtnGroup\').unbind("click")') | 2350 | console.info('$(\'#compileBtnGroup\').unbind("click")') |
src/scss/recording.scss
| @@ -61,6 +61,13 @@ button{ | @@ -61,6 +61,13 @@ button{ | ||
| 61 | // } | 61 | // } |
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | +.play-code{ | ||
| 65 | + background: transparent; | ||
| 66 | + color: #fff; | ||
| 67 | + border: none; | ||
| 68 | + padding-left: 24px; | ||
| 69 | +} | ||
| 70 | + | ||
| 64 | .upload-tip{ | 71 | .upload-tip{ |
| 65 | position: absolute; | 72 | position: absolute; |
| 66 | top: 0; | 73 | top: 0; |
src/v1.1/player.html
| @@ -166,7 +166,13 @@ | @@ -166,7 +166,13 @@ | ||
| 166 | </div> | 166 | </div> |
| 167 | <div id="playFooter"> | 167 | <div id="playFooter"> |
| 168 | <div class="" id="audioWrap"> | 168 | <div class="" id="audioWrap"> |
| 169 | + <button class="play-code" style="display: none;"> | ||
| 170 | + <i class="icon iconfont icon-play"></i> | ||
| 171 | + </button> | ||
| 169 | </div> | 172 | </div> |
| 173 | +<!-- <div class="playCode"> | ||
| 174 | + <button>开始</button> | ||
| 175 | + </div> --> | ||
| 170 | </div> | 176 | </div> |
| 171 | </div> | 177 | </div> |
| 172 | <!-- --> | 178 | <!-- --> |