Commit c4440d9b5eca3bc80a9e62e749663a7d10fff25a

Authored by ykxie
1 parent 68cdc5aa

add test play

Showing 1 changed file with 5 additions and 3 deletions
src/js/gbreplayer.js
@@ -60,7 +60,7 @@ $(function(){ @@ -60,7 +60,7 @@ $(function(){
60 60
61 61
62 62
63 - var GBCodePlayBack = { 63 + var GBcodePlayBack = {
64 records: [], 64 records: [],
65 excercise_records: [], 65 excercise_records: [],
66 autorun: 1, 66 autorun: 1,
@@ -429,6 +429,8 @@ $(function(){ @@ -429,6 +429,8 @@ $(function(){
429 ,debuggers: false 429 ,debuggers: false
430 ,allowSeek: false 430 ,allowSeek: false
431 ,playCallback: function(){ // 播放 431 ,playCallback: function(){ // 播放
  432 + console.log('播放')
  433 + alert('开始播放代码')
432 playCode(); 434 playCode();
433 GBCodePlayBack.htmlplayereditor.setOption('readOnly', true); 435 GBCodePlayBack.htmlplayereditor.setOption('readOnly', true);
434 } 436 }
@@ -1585,7 +1587,7 @@ $(function(){ @@ -1585,7 +1587,7 @@ $(function(){
1585 contentType: "application/json", 1587 contentType: "application/json",
1586 success: function(data) { 1588 success: function(data) {
1587 compileResult(data) 1589 compileResult(data)
1588 - // l.stop(); 1590 + l.stop();
1589 1591
1590 $('.compile-loading').hide(); 1592 $('.compile-loading').hide();
1591 $('.compile-reslut').show(); 1593 $('.compile-reslut').show();
@@ -1746,7 +1748,7 @@ $(function(){ @@ -1746,7 +1748,7 @@ $(function(){
1746 // $('#comprunbtngrp').html('<button id="runnow" type="button" data-style="expand-right" class="btn" title="运行代码">&nbsp; 运行</button>'); 1748 // $('#comprunbtngrp').html('<button id="runnow" type="button" data-style="expand-right" class="btn" title="运行代码">&nbsp; 运行</button>');
1747 }else{ 1749 }else{
1748 $('#fontendrun').addClass('hidden'); 1750 $('#fontendrun').addClass('hidden');
1749 - $('#comprunbtngrp').html('<button id="comprun" type="button" data-run="1" data-style="expand-right" class="btn comprun" title="编译并运行代码"><span class="pc">编译&运行</span><span class="m-label"><p>编译</p><p>运行</p></span></button>'); 1751 + $('#comprunbtngrp').html('<button id="comprun" type="button" data-run="1" data-style="expand-right" class="btn comprun"><span class="pc">编译&运行</span><span class="m-label"><p>编译</p><p>运行</p></span></button>');
1750 1752
1751 $('#ifrcontainer').addClass('hidden'); 1753 $('#ifrcontainer').addClass('hidden');
1752 $('#cmprun-output').removeClass('hidden'); 1754 $('#cmprun-output').removeClass('hidden');