Commit 5c41dce2aace031b90bde649e5fe4fec64cd8468

Authored by ykxie
1 parent f8296751

add web multifile compile

src/gxb-ide/CodingEditer.js
@@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
13 pauseValue: [], 13 pauseValue: [],
14 isRecordPage: 1, 14 isRecordPage: 1,
15 flag: true, // 解决多次点击 15 flag: true, // 解决多次点击
  16 + isHanld: 1,
16 init: function(){ 17 init: function(){
17 console.log('CodingEditer'); 18 console.log('CodingEditer');
18 }, 19 },
@@ -311,9 +312,9 @@ @@ -311,9 +312,9 @@
311 if (CodingEditer.recording_status) { 312 if (CodingEditer.recording_status) {
312 buildRecords(Dir.getCurrentEditor(em.getWrapperElement().getAttribute('id')), changeobj); 313 buildRecords(Dir.getCurrentEditor(em.getWrapperElement().getAttribute('id')), changeobj);
313 } 314 }
314 - if (CodingEditer.isWeb) { 315 + if (CodingEditer.isWeb && CodingEditer.isHanld === 1) {
315 console.log(_pauseValue[2]) 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 onFocus: function(em) { 320 onFocus: function(em) {
src/gxb-ide/Iterm.js
@@ -25,9 +25,11 @@ @@ -25,9 +25,11 @@
25 $(document).on('focus', '#runtimeArgus', function(){ }) 25 $(document).on('focus', '#runtimeArgus', function(){ })
26 }, 26 },
27 compile: function(){ 27 compile: function(){
28 - if (_languageid == 35) { 28 + if (_languageid == 35 && CodingEditer.isHanld == 0) {
29 var _pauseValue = CodingEditer.getCodeMirrorValue(); 29 var _pauseValue = CodingEditer.getCodeMirrorValue();
30 CodingEditer.webResult(_pauseValue[0], _pauseValue[1], _pauseValue[2]) 30 CodingEditer.webResult(_pauseValue[0], _pauseValue[1], _pauseValue[2])
  31 + }else if(CodingEditer.isHanld == 1){
  32 + return;
31 }else{ 33 }else{
32 var _this = this; 34 var _this = this;
33 var el = document.querySelector('#CompileBtn'); 35 var el = document.querySelector('#CompileBtn');
src/js/c.js
@@ -9,27 +9,29 @@ $(function(){ @@ -9,27 +9,29 @@ $(function(){
9 9
10 if(_languageid == 35){ 10 if(_languageid == 35){
11 $('.switch').show(); 11 $('.switch').show();
12 - $("#CompileBtn .ladda-label").html("动运行") 12 + $("#CompileBtn .ladda-label").html("动运行")
13 }else{ 13 }else{
14 $("#CompileBtn .ladda-label").html("编译运行") 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 $('.switch').on('click', function(){ 24 $('.switch').on('click', function(){
18 if(flag){ 25 if(flag){
19 - $("#CompileBtn .ladda-label").html("动运行") 26 + $("#CompileBtn .ladda-label").html("动运行")
20 flag = false; 27 flag = false;
  28 + CodingEditer.isHanld = 0
21 }else{ 29 }else{
22 - $("#CompileBtn .ladda-label").html("动运行") 30 + $("#CompileBtn .ladda-label").html("动运行")
23 flag = true; 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 // new一个老师录制的控制条工具 36 // new一个老师录制的控制条工具
35 var techTool = new ToolBox({ 37 var techTool = new ToolBox({