Commit 5c41dce2aace031b90bde649e5fe4fec64cd8468
1 parent
f8296751
add web multifile compile
Showing
3 changed files
with
18 additions
and
13 deletions
src/gxb-ide/CodingEditer.js
| ... | ... | @@ -13,6 +13,7 @@ |
| 13 | 13 | pauseValue: [], |
| 14 | 14 | isRecordPage: 1, |
| 15 | 15 | flag: true, // 解决多次点击 |
| 16 | + isHanld: 1, | |
| 16 | 17 | init: function(){ |
| 17 | 18 | console.log('CodingEditer'); |
| 18 | 19 | }, |
| ... | ... | @@ -311,9 +312,9 @@ |
| 311 | 312 | if (CodingEditer.recording_status) { |
| 312 | 313 | buildRecords(Dir.getCurrentEditor(em.getWrapperElement().getAttribute('id')), changeobj); |
| 313 | 314 | } |
| 314 | - if (CodingEditer.isWeb) { | |
| 315 | + if (CodingEditer.isWeb && CodingEditer.isHanld === 1) { | |
| 315 | 316 | console.log(_pauseValue[2]) |
| 316 | - // CodingEditer.webResult(_pauseValue[0], _pauseValue[1], _pauseValue[2]) | |
| 317 | + CodingEditer.webResult(_pauseValue[0], _pauseValue[1], _pauseValue[2]) | |
| 317 | 318 | } |
| 318 | 319 | }, |
| 319 | 320 | onFocus: function(em) { | ... | ... |
src/gxb-ide/Iterm.js
| ... | ... | @@ -25,9 +25,11 @@ |
| 25 | 25 | $(document).on('focus', '#runtimeArgus', function(){ }) |
| 26 | 26 | }, |
| 27 | 27 | compile: function(){ |
| 28 | - if (_languageid == 35) { | |
| 28 | + if (_languageid == 35 && CodingEditer.isHanld == 0) { | |
| 29 | 29 | var _pauseValue = CodingEditer.getCodeMirrorValue(); |
| 30 | 30 | CodingEditer.webResult(_pauseValue[0], _pauseValue[1], _pauseValue[2]) |
| 31 | + }else if(CodingEditer.isHanld == 1){ | |
| 32 | + return; | |
| 31 | 33 | }else{ |
| 32 | 34 | var _this = this; |
| 33 | 35 | var el = document.querySelector('#CompileBtn'); | ... | ... |
src/js/c.js
| ... | ... | @@ -9,27 +9,29 @@ $(function(){ |
| 9 | 9 | |
| 10 | 10 | if(_languageid == 35){ |
| 11 | 11 | $('.switch').show(); |
| 12 | - $("#CompileBtn .ladda-label").html("手动运行") | |
| 12 | + $("#CompileBtn .ladda-label").html("自动运行") | |
| 13 | 13 | }else{ |
| 14 | 14 | $("#CompileBtn .ladda-label").html("编译运行") |
| 15 | 15 | } |
| 16 | + | |
| 17 | + // new一个基本IDE结构 | |
| 18 | + var ide = new GxbIde({ | |
| 19 | + el: '#folder', | |
| 20 | + isPlayPage: 0, | |
| 21 | + languageid: parseInt(_languageid) | |
| 22 | + }); | |
| 16 | 23 | |
| 17 | 24 | $('.switch').on('click', function(){ |
| 18 | 25 | if(flag){ |
| 19 | - $("#CompileBtn .ladda-label").html("自动运行") | |
| 26 | + $("#CompileBtn .ladda-label").html("手动运行") | |
| 20 | 27 | flag = false; |
| 28 | + CodingEditer.isHanld = 0 | |
| 21 | 29 | }else{ |
| 22 | - $("#CompileBtn .ladda-label").html("手动运行") | |
| 30 | + $("#CompileBtn .ladda-label").html("自动运行") | |
| 23 | 31 | flag = true; |
| 32 | + CodingEditer.isHanld = 1 | |
| 24 | 33 | } |
| 25 | 34 | }) |
| 26 | - | |
| 27 | - // new一个基本IDE结构 | |
| 28 | - var ide = new GxbIde({ | |
| 29 | - el: '#folder', | |
| 30 | - isPlayPage: 0, | |
| 31 | - languageid: parseInt(_languageid) | |
| 32 | - }); | |
| 33 | 35 | |
| 34 | 36 | // new一个老师录制的控制条工具 |
| 35 | 37 | var techTool = new ToolBox({ | ... | ... |