Commit d88708227e64f1c4dca91cd64f9b8534334bb8d6

Authored by ykxie
1 parent ea4f9efb

fix bug

gulp/config.js
@@ -2,6 +2,10 @@ var src = './src'; @@ -2,6 +2,10 @@ var src = './src';
2 var dest = './dist'; 2 var dest = './dist';
3 3
4 module.exports = { 4 module.exports = {
  5 + path: {
  6 + src: src + "/**/*",
  7 + dest: dest
  8 + },
5 srcSass: { 9 srcSass: {
6 all: src + "/scss/**/*.scss", 10 all: src + "/scss/**/*.scss",
7 src: src + "/scss/*.scss", 11 src: src + "/scss/*.scss",
@@ -42,5 +46,9 @@ module.exports = { @@ -42,5 +46,9 @@ module.exports = {
42 img: { 46 img: {
43 src: src + "/img/**/*", 47 src: src + "/img/**/*",
44 dest: dest + "/img" 48 dest: dest + "/img"
  49 + },
  50 + concat: {
  51 + src: src + "/gxb-ide/",
  52 + dest: dest + "/gxb-ide"
45 } 53 }
46 } 54 }
47 \ No newline at end of file 55 \ No newline at end of file
gulp/tasks/concat.js 0 → 100644
  1 +// 合并JS文件
  2 +var gulp = require('gulp');
  3 +var config = require('../config').concat;
  4 +var handleErrors = require('../util/handleErrors');
  5 +
  6 +var sass = require('gulp-sass');
  7 +var config = require('../config').srcSass;
  8 +
  9 +gulp.task('concat', function() {
  10 + gulp.src(['./src/gxb-ide/Dir.js', './src/gxb-ide/CodingEditer.js'])
  11 + .pipe(concat('main.js'))
  12 + // .on('error', handleErrors) //交给notify处理错误
  13 + // .pipe(gulp.dest(config.dest))
  14 +});
  15 +
  16 +// gulp.task('concat', function(){
  17 +// return gulp.src(config.src)
  18 +// .pipe(sass())
  19 +// .on('error', handleErrors) //交给notify处理错误
  20 +// .pipe(gulp.dest(config.dest))
  21 +// });
0 \ No newline at end of file 22 \ No newline at end of file
gulp/tasks/copy.js 0 → 100644
  1 +var gulp = require('gulp');
  2 +var config = require('../config').path;
  3 +
  4 +gulp.task('copyfile', function(){
  5 + return gulp.src(config.src)
  6 + .pipe(gulp.dest(config.dest))
  7 +})
0 \ No newline at end of file 8 \ No newline at end of file
gulp/tasks/deploy.js
1 var gulp = require('gulp'); 1 var gulp = require('gulp');
2 2
3 -gulp.task('deploy', ['srcSass', 'html', 'css', 'img', 'uglifyJS', 'copy'])  
4 \ No newline at end of file 3 \ No newline at end of file
  4 +gulp.task('deploy', ['srcSass', 'html', 'css', 'img', 'copy', 'concat'])
5 \ No newline at end of file 5 \ No newline at end of file
package.json
@@ -25,5 +25,8 @@ @@ -25,5 +25,8 @@
25 "gulp-watch": "^4.3.10", 25 "gulp-watch": "^4.3.10",
26 "pump": "^1.0.1", 26 "pump": "^1.0.1",
27 "require-dir": "^0.3.1" 27 "require-dir": "^0.3.1"
  28 + },
  29 + "dependencies": {
  30 + "gulp-concat": "^2.6.1"
28 } 31 }
29 } 32 }
src/css/ide.css
@@ -106,7 +106,7 @@ html, body { @@ -106,7 +106,7 @@ html, body {
106 position: absolute; 106 position: absolute;
107 box-sizing: border-box; 107 box-sizing: border-box;
108 padding-top: 36px; 108 padding-top: 36px;
109 - padding-bottom: 300px; } 109 + padding-bottom: 260px; }
110 .record-wrap #ideDir { 110 .record-wrap #ideDir {
111 width: 170px; 111 width: 170px;
112 height: 100%; 112 height: 100%;
@@ -137,7 +137,7 @@ html, body { @@ -137,7 +137,7 @@ html, body {
137 .record-toolbox .console-wrap { 137 .record-toolbox .console-wrap {
138 width: 100%; 138 width: 100%;
139 background-color: #FFF; 139 background-color: #FFF;
140 - height: 240px; 140 + height: 200px;
141 border-top: 1px solid #999d9e; } 141 border-top: 1px solid #999d9e; }
142 .record-toolbox .console-wrap #toolbar { 142 .record-toolbox .console-wrap #toolbar {
143 width: 100%; 143 width: 100%;
@@ -176,8 +176,8 @@ html, body { @@ -176,8 +176,8 @@ html, body {
176 margin: 0 16px; 176 margin: 0 16px;
177 color: #fff; } 177 color: #fff; }
178 .record-toolbox #resultoutput { 178 .record-toolbox #resultoutput {
179 - height: 204px;  
180 - overflow: auto; } 179 + height: 164px;
  180 + overflow-y: scroll; }
181 .record-toolbox #CompileBtn { 181 .record-toolbox #CompileBtn {
182 background-image: -webkit-linear-gradient(left, #1FB6FF 0%, #62DCF5 100%); 182 background-image: -webkit-linear-gradient(left, #1FB6FF 0%, #62DCF5 100%);
183 background-image: linear-gradient(to right, #1FB6FF 0%, #62DCF5 100%); 183 background-image: linear-gradient(to right, #1FB6FF 0%, #62DCF5 100%);
@@ -320,3 +320,13 @@ html, body { @@ -320,3 +320,13 @@ html, body {
320 bottom: 0; 320 bottom: 0;
321 background-color: rgba(0, 0, 0, 0.4); 321 background-color: rgba(0, 0, 0, 0.4);
322 z-index: 999; } 322 z-index: 999; }
  323 +
  324 +.play-code {
  325 + background: transparent;
  326 + border: none;
  327 + width: 40px;
  328 + height: 40px;
  329 + margin-left: 48px; }
  330 +
  331 +.play-code img {
  332 + width: 100%; }
src/css/main.css
@@ -28,7 +28,7 @@ html, body { @@ -28,7 +28,7 @@ html, body {
28 position: absolute; 28 position: absolute;
29 box-sizing: border-box; 29 box-sizing: border-box;
30 padding-top: 36px; 30 padding-top: 36px;
31 - padding-bottom: 300px; } 31 + padding-bottom: 260px; }
32 .record-wrap #ideDir { 32 .record-wrap #ideDir {
33 width: 170px; 33 width: 170px;
34 height: 100%; 34 height: 100%;
@@ -59,7 +59,7 @@ html, body { @@ -59,7 +59,7 @@ html, body {
59 .record-toolbox .console-wrap { 59 .record-toolbox .console-wrap {
60 width: 100%; 60 width: 100%;
61 background-color: #FFF; 61 background-color: #FFF;
62 - height: 240px; 62 + height: 200px;
63 border-top: 1px solid #999d9e; } 63 border-top: 1px solid #999d9e; }
64 .record-toolbox .console-wrap #toolbar { 64 .record-toolbox .console-wrap #toolbar {
65 width: 100%; 65 width: 100%;
@@ -98,8 +98,8 @@ html, body { @@ -98,8 +98,8 @@ html, body {
98 margin: 0 16px; 98 margin: 0 16px;
99 color: #fff; } 99 color: #fff; }
100 .record-toolbox #resultoutput { 100 .record-toolbox #resultoutput {
101 - height: 204px;  
102 - overflow: auto; } 101 + height: 164px;
  102 + overflow-y: scroll; }
103 .record-toolbox #CompileBtn { 103 .record-toolbox #CompileBtn {
104 background-image: -webkit-linear-gradient(left, #1FB6FF 0%, #62DCF5 100%); 104 background-image: -webkit-linear-gradient(left, #1FB6FF 0%, #62DCF5 100%);
105 background-image: linear-gradient(to right, #1FB6FF 0%, #62DCF5 100%); 105 background-image: linear-gradient(to right, #1FB6FF 0%, #62DCF5 100%);
@@ -242,3 +242,13 @@ html, body { @@ -242,3 +242,13 @@ html, body {
242 bottom: 0; 242 bottom: 0;
243 background-color: rgba(0, 0, 0, 0.4); 243 background-color: rgba(0, 0, 0, 0.4);
244 z-index: 999; } 244 z-index: 999; }
  245 +
  246 +.play-code {
  247 + background: transparent;
  248 + border: none;
  249 + width: 40px;
  250 + height: 40px;
  251 + margin-left: 48px; }
  252 +
  253 +.play-code img {
  254 + width: 100%; }
src/gxb-ide/CodingEditer.js
@@ -53,7 +53,8 @@ @@ -53,7 +53,8 @@
53 }, 53 },
54 initCodeMirror: function(langid){ 54 initCodeMirror: function(langid){
55 var treeLinkEditor = Dir.treeLinkEditor; 55 var treeLinkEditor = Dir.treeLinkEditor;
56 - initProgramPage(treeLinkEditor); 56 + var langid = getQuery('languageid');
  57 + initProgramPage(treeLinkEditor, langid);
57 }, 58 },
58 /** 59 /**
59 * 获取各个文件中的代码 60 * 获取各个文件中的代码
@@ -281,16 +282,17 @@ @@ -281,16 +282,17 @@
281 } 282 }
282 283
283 284
284 -  
285 // 初始化编程页面 285 // 初始化编程页面
286 function initProgramPage(treeLinkEditor, langid){ 286 function initProgramPage(treeLinkEditor, langid){
  287 + // alert(getMode(langid))
  288 + var modeName = getMode(langid) || 'text/x-java';
287 // 生成 CodeMirror 289 // 生成 CodeMirror
288 for (var i = 0; i < treeLinkEditor.length; i++) { 290 for (var i = 0; i < treeLinkEditor.length; i++) {
289 // 判断是否是播放页面,如果是则不显示录制区相关dom 291 // 判断是否是播放页面,如果是则不显示录制区相关dom
290 if(!isReplayPage){ 292 if(!isReplayPage){
291 treeLinkEditor[i].CodeMirrorRecord = CodeMirror.fromTextArea($('#' + treeLinkEditor[i].record)[0], { 293 treeLinkEditor[i].CodeMirrorRecord = CodeMirror.fromTextArea($('#' + treeLinkEditor[i].record)[0], {
292 value: '', 294 value: '',
293 - mode: "", 295 + mode: modeName,
294 lineNumbers: true, 296 lineNumbers: true,
295 smartIndent: false, 297 smartIndent: false,
296 onChange: function(em, changeobj) { 298 onChange: function(em, changeobj) {
@@ -315,7 +317,7 @@ @@ -315,7 +317,7 @@
315 317
316 treeLinkEditor[i].CodeMirrorReplay = CodeMirror.fromTextArea($('#' + treeLinkEditor[i].replay)[0], { 318 treeLinkEditor[i].CodeMirrorReplay = CodeMirror.fromTextArea($('#' + treeLinkEditor[i].replay)[0], {
317 value: '', 319 value: '',
318 - mode: "text/x-java", 320 + mode: modeName,
319 lineNumbers: true, 321 lineNumbers: true,
320 smartIndent: false, 322 smartIndent: false,
321 onChange: function(em, changeobj) { 323 onChange: function(em, changeobj) {
@@ -332,6 +334,45 @@ @@ -332,6 +334,45 @@
332 Dir.showEdite(); 334 Dir.showEdite();
333 } 335 }
334 336
  337 + function getMode(langid){
  338 + var langid = parseInt(langid);
  339 + var mode = null;
  340 + switch (langid) {
  341 + case 4:
  342 + mode = "text/x-python";
  343 + break;
  344 + case 10:
  345 + mode = "text/x-java";
  346 + break;
  347 + case 11:
  348 + mode = "text/x-csrc";
  349 + break;
  350 + case 29:
  351 + mode = "application/x-httpd-php";
  352 + break;
  353 + case 35:
  354 + mode = "text/javascript";
  355 + break;
  356 + case 40:
  357 + mode = "text/x-sql";
  358 + break;
  359 + case 43:
  360 + mode = "text/x-objectivec";
  361 + break;
  362 + case 82:
  363 + mode = "text/x-c++src";
  364 + break;
  365 +
  366 + case 117:
  367 + mode = "text/x-rsrc";
  368 + break;
  369 + default:
  370 + break;
  371 + }
  372 +
  373 + return mode;
  374 + }
  375 +
335 /** 376 /**
336 * 组合录入代码 377 * 组合录入代码
337 * by Kira 2017-3-9 378 * by Kira 2017-3-9
@@ -339,17 +380,16 @@ @@ -339,17 +380,16 @@
339 function buildRecords(editor, changeobj){ 380 function buildRecords(editor, changeobj){
340 var intervaltime, 381 var intervaltime,
341 currenttime = new Date().getTime(); 382 currenttime = new Date().getTime();
342 - 383 + var _role = getQuery('role');
343 // 根据不同的身份设置录制代码的时间间隔,当学生端输入的时候,重置间隔为100毫秒 384 // 根据不同的身份设置录制代码的时间间隔,当学生端输入的时候,重置间隔为100毫秒
344 - // if (_role == 0 && CodingEditer.record_startime) {  
345 - // intervaltime = currenttime - CodingEditer.record_startime;  
346 - // }else if (_role == 1){  
347 - // intervaltime = 100;  
348 - // }else{  
349 - // intervaltime = 0;  
350 - // }  
351 -  
352 - intervaltime = currenttime - CodingEditer.record_startime; 385 + if (_role == 0) {
  386 + intervaltime = currenttime - CodingEditer.record_startime;
  387 + }else if (_role == 1){
  388 + intervaltime = 100;
  389 + }else{
  390 + intervaltime = 0;
  391 + }
  392 + // intervaltime = currenttime - CodingEditer.record_startime;
353 393
354 var recordobj = { 394 var recordobj = {
355 intervaltime: intervaltime, 395 intervaltime: intervaltime,
src/gxb-ide/Dir.js
@@ -60,6 +60,7 @@ @@ -60,6 +60,7 @@
60 console.log('======================='); 60 console.log('=======================');
61 console.log('isPlayPage ----- ' + isPlayPage); 61 console.log('isPlayPage ----- ' + isPlayPage);
62 console.log('role ----- ' + role); 62 console.log('role ----- ' + role);
  63 + var role = getQuery('role');
63 64
64 if (isPlayPage == 0) { 65 if (isPlayPage == 0) {
65 $.ajax({ 66 $.ajax({
@@ -586,10 +587,11 @@ @@ -586,10 +587,11 @@
586 dataType: "json", 587 dataType: "json",
587 contentType: "application/json", 588 contentType: "application/json",
588 success: function(res) { 589 success: function(res) {
  590 + console.log('0000--------------------')
589 console.log(res) 591 console.log(res)
590 setTitle(res.languageid); 592 setTitle(res.languageid);
591 593
592 - var coderecords = res.codeRecordList 594 + var coderecords = res.codeRecordList || res.studentRecordList;
593 var audioUrl = res.audioUrl; 595 var audioUrl = res.audioUrl;
594 596
595 var treeArr = res.programmingFileList; 597 var treeArr = res.programmingFileList;
@@ -600,6 +602,7 @@ @@ -600,6 +602,7 @@
600 CodingEditer.initCodeMirror(treeLinkEditor); 602 CodingEditer.initCodeMirror(treeLinkEditor);
601 603
602 initTrigger(coderecords) 604 initTrigger(coderecords)
  605 +
603 AudioPlayer(audioUrl) 606 AudioPlayer(audioUrl)
604 }, 607 },
605 error: function(error) { 608 error: function(error) {
@@ -621,27 +624,34 @@ @@ -621,27 +624,34 @@
621 624
622 // 初始化播放音频控制条 625 // 初始化播放音频控制条
623 function AudioPlayer(audioUrl){ 626 function AudioPlayer(audioUrl){
624 - var player = $.AudioPlayer;  
625 - player.init({  
626 - container: '#audioWrap',  
627 - source: "https://gxb-file.oss-cn-beijing.aliyuncs.com" + audioUrl,  
628 - imagePath: '../js/audioPlayer/image',  
629 - debuggers: false,  
630 - allowSeek: false,  
631 - playCallback: function() { // 播放  
632 - console.log('++++++++');  
633 - CodingEditer.playCoding();  
634 - },  
635 - pauseCallback: function() { // 暂停  
636 - CodingEditer.audioTime = parseInt(player.elements.audioDom.currentTime*1000);  
637 - CodingEditer.pauseCode();  
638 - },  
639 - seekedCallback: function() { // 拖拽  
640 - },  
641 - endedCallback: function() { // 结束播放  
642 - playEnd()  
643 - }  
644 - }); 627 + var role = getQuery('role');
  628 + if (role == 0) {
  629 + var player = $.AudioPlayer;
  630 + player.init({
  631 + container: '#audioWrap',
  632 + source: "https://gxb-file.oss-cn-beijing.aliyuncs.com" + audioUrl,
  633 + imagePath: '../js/audioPlayer/image',
  634 + debuggers: false,
  635 + allowSeek: false,
  636 + playCallback: function() { // 播放
  637 + console.log('++++++++');
  638 + CodingEditer.playCoding();
  639 + },
  640 + pauseCallback: function() { // 暂停
  641 + CodingEditer.audioTime = parseInt(player.elements.audioDom.currentTime*1000);
  642 + CodingEditer.pauseCode();
  643 + },
  644 + seekedCallback: function() { // 拖拽
  645 + },
  646 + endedCallback: function() { // 结束播放
  647 + playEnd()
  648 + }
  649 + });
  650 + }else if(role == 1){
  651 + $('.play-code').show();
  652 +
  653 + }
  654 +
645 } 655 }
646 656
647 // 设置 title 657 // 设置 title
src/gxb-ide/Iterm.js
@@ -32,13 +32,16 @@ @@ -32,13 +32,16 @@
32 var el = document.querySelector('#CompileBtn'); 32 var el = document.querySelector('#CompileBtn');
33 var userId = _this.options.userId; 33 var userId = _this.options.userId;
34 var languageId = _this.options.languageId; 34 var languageId = _this.options.languageId;
  35 + var role = getQuery('role');
35 // 判断是否录制走不同的逻辑 36 // 判断是否录制走不同的逻辑
36 if (!CodingEditer.isRcording) { 37 if (!CodingEditer.isRcording) {
37 compileMode(el, userId, languageId) 38 compileMode(el, userId, languageId)
38 }else{ 39 }else{
39 if (_this.compileStatus) { 40 if (_this.compileStatus) {
40 Hourglass.pauseTimer(); // 暂停计时器 41 Hourglass.pauseTimer(); // 暂停计时器
41 - recorder.pause(); // 音频暂停 42 + if (role == 0) {
  43 + recorder.pause(); // 音频暂停
  44 + }
42 45
43 $('.compile-loading').show(); 46 $('.compile-loading').show();
44 $('.pause-shodow').show() 47 $('.pause-shodow').show()
@@ -53,8 +56,8 @@ @@ -53,8 +56,8 @@
53 } 56 }
54 57
55 compileMode(el, userId, languageId) 58 compileMode(el, userId, languageId)
  59 + $('.contrl-shodow').show();
56 } 60 }
57 - $('.contrl-shodow').show();  
58 }, 61 },
59 compileResult: function(data, value){ 62 compileResult: function(data, value){
60 if (!data) { 63 if (!data) {
@@ -112,8 +115,11 @@ @@ -112,8 +115,11 @@
112 $('.contrl-shodow').hide(); 115 $('.contrl-shodow').hide();
113 116
114 Hourglass.pauseTimer(); 117 Hourglass.pauseTimer();
115 - recorder.pause();  
116 118
  119 + var role = getQuery('role');
  120 + if (role == 0) {
  121 + recorder.pause();
  122 + }
117 CodingEditer.record_startime = new Date().getTime(); 123 CodingEditer.record_startime = new Date().getTime();
118 } 124 }
119 125
src/gxb-ide/ToolBox.js
@@ -49,7 +49,7 @@ @@ -49,7 +49,7 @@
49 var toolBox = this.options.el; 49 var toolBox = this.options.el;
50 $(toolBox).html(template) 50 $(toolBox).html(template)
51 51
52 - $('#start-recording img').attr('src', '../img/ideicon/record.svg'); 52 + $('#start-recording img').attr('src', '../img/ideicon/new-recording.svg');
53 $('#stop-recording img').attr('src', '../img/ideicon/stop.svg'); 53 $('#stop-recording img').attr('src', '../img/ideicon/stop.svg');
54 $('#re-recoding img').attr('src', '../img/ideicon/re-record.svg'); 54 $('#re-recoding img').attr('src', '../img/ideicon/re-record.svg');
55 $('#audio-play img').attr('src', '../img/ideicon/play.svg'); 55 $('#audio-play img').attr('src', '../img/ideicon/play.svg');
@@ -70,6 +70,7 @@ @@ -70,6 +70,7 @@
70 $('#cancel').on('click', function(){ _this.cancel(); }) 70 $('#cancel').on('click', function(){ _this.cancel(); })
71 $('#re-sure').on('click', function(){ _this.reSure(); }) 71 $('#re-sure').on('click', function(){ _this.reSure(); })
72 $('#re-cancel').on('click', function(){ _this.reCancel(); }) 72 $('#re-cancel').on('click', function(){ _this.reCancel(); })
  73 + $('.play-code').on('click', function(){ _this.playerPage(); })
73 }, 74 },
74 startRecording: function(callback){ 75 startRecording: function(callback){
75 console.log(this.options.userId); 76 console.log(this.options.userId);
@@ -89,7 +90,7 @@ @@ -89,7 +90,7 @@
89 _this.options.startCallback(); 90 _this.options.startCallback();
90 } 91 }
91 CodingEditer.isRcording = true; 92 CodingEditer.isRcording = true;
92 - recordAudio() 93 +
93 }, 94 },
94 stopRecording: function(){ 95 stopRecording: function(){
95 console.log('停止录制'); 96 console.log('停止录制');
@@ -179,8 +180,15 @@ @@ -179,8 +180,15 @@
179 }, 180 },
180 uploadAudio: function(){ 181 uploadAudio: function(){
181 console.log('uploadAudio'); 182 console.log('uploadAudio');
  183 + var _this = this;
182 $('.upload-tip').show(); 184 $('.upload-tip').show();
183 - recorder.upload(); 185 +
  186 + var role = getQuery('role');
  187 + if (role == 0) {
  188 + recorder.upload();
  189 + }else{
  190 + _this.saveCode();
  191 + }
184 }, 192 },
185 saveCode: function(){ 193 saveCode: function(){
186 var _this = this; 194 var _this = this;
@@ -262,10 +270,19 @@ @@ -262,10 +270,19 @@
262 console.log(CodingEditer.records) 270 console.log(CodingEditer.records)
263 alert('代码保存失败重新保存') 271 alert('代码保存失败重新保存')
264 } 272 }
  273 +
265 }); 274 });
266 }, 275 },
  276 + playerPage: function(){
  277 + CodingEditer.playCoding();
  278 + CodingEditer.editable(0)
  279 + },
267 cancel: function(){ 280 cancel: function(){
268 console.log('cancel'); 281 console.log('cancel');
  282 + $(window).unbind('beforeunload', function() {
  283 + return '确认退出? 将不保存你的代码';
  284 + });
  285 + window.close();
269 }, 286 },
270 /* 287 /*
271 * 修改代码状态 288 * 修改代码状态
@@ -285,14 +302,6 @@ @@ -285,14 +302,6 @@
285 } 302 }
286 }; 303 };
287 304
288 - function recordAudio(){  
289 - // HZRecorder.get(function(rec) {  
290 - // console.log(rec);  
291 - // recorder = rec;  
292 - // recorder.start();  
293 - // CodingEditer.initRecodesValue()  
294 - // });  
295 - }  
296 305
297 // 编译结果 306 // 编译结果
298 function compileResult(data, value) { 307 function compileResult(data, value) {
src/gxb-ide/img/new-recording.svg 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<svg width="56px" height="56px" viewBox="0 0 56 56" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
  3 + <!-- Generator: Sketch 41 (35326) - http://www.bohemiancoding.com/sketch -->
  4 + <title>开始录制</title>
  5 + <desc>Created with Sketch.</desc>
  6 + <defs>
  7 + <path d="M24,48 C37.254834,48 48,37.254834 48,24 C48,10.745166 37.254834,0 24,0 C10.745166,0 0,10.745166 0,24 C0,37.254834 10.745166,48 24,48 Z M24,44 C35.045695,44 44,35.045695 44,24 C44,12.954305 35.045695,4 24,4 C12.954305,4 4,12.954305 4,24 C4,35.045695 12.954305,44 24,44 Z" id="path-1"></path>
  8 + <filter x="-50%" y="-50%" width="200%" height="200%" filterUnits="objectBoundingBox" id="filter-2">
  9 + <feOffset dx="0" dy="1" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
  10 + <feGaussianBlur stdDeviation="2" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
  11 + <feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
  12 + </filter>
  13 + <rect id="path-3" x="8" y="8" width="32" height="32" rx="16"></rect>
  14 + <filter x="-50%" y="-50%" width="200%" height="200%" filterUnits="objectBoundingBox" id="filter-4">
  15 + <feOffset dx="0" dy="2" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
  16 + <feGaussianBlur stdDeviation="2" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
  17 + <feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
  18 + </filter>
  19 + </defs>
  20 + <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
  21 + <g id="03-班次-录制编程界面-其他语言-copy" transform="translate(-132.000000, -1005.000000)">
  22 + <g id="状态1-未开始录制" transform="translate(0.000000, 966.000000)">
  23 + <g id="开始录制" transform="translate(136.000000, 42.000000)">
  24 + <g id="Combined-Shape">
  25 + <use fill="black" fill-opacity="1" filter="url(#filter-2)" xlink:href="#path-1"></use>
  26 + <use fill="#FFFFFF" fill-rule="evenodd" xlink:href="#path-1"></use>
  27 + </g>
  28 + <g id="Rectangle-8">
  29 + <use fill="black" fill-opacity="1" filter="url(#filter-4)" xlink:href="#path-3"></use>
  30 + <use fill="#FF6668" fill-rule="evenodd" xlink:href="#path-3"></use>
  31 + </g>
  32 + </g>
  33 + </g>
  34 + </g>
  35 + </g>
  36 +</svg>
0 \ No newline at end of file 37 \ No newline at end of file
src/gxb-ide/toolBox.css
@@ -74,5 +74,6 @@ @@ -74,5 +74,6 @@
74 background: -webkit-linear-gradient(left, #1FB6FF, #62DDF5); 74 background: -webkit-linear-gradient(left, #1FB6FF, #62DDF5);
75 background: -moz-linear-gradient(left, #1FB6FF, #62DDF5); 75 background: -moz-linear-gradient(left, #1FB6FF, #62DDF5);
76 } 76 }
77 -  
78 -  
79 \ No newline at end of file 77 \ No newline at end of file
  78 +.start-recording img{
  79 + width: 50px !important;
  80 +}
src/img/ideicon/new-recording.svg 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<svg width="56px" height="56px" viewBox="0 0 56 56" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
  3 + <!-- Generator: Sketch 41 (35326) - http://www.bohemiancoding.com/sketch -->
  4 + <title>开始录制</title>
  5 + <desc>Created with Sketch.</desc>
  6 + <defs>
  7 + <path d="M24,48 C37.254834,48 48,37.254834 48,24 C48,10.745166 37.254834,0 24,0 C10.745166,0 0,10.745166 0,24 C0,37.254834 10.745166,48 24,48 Z M24,44 C35.045695,44 44,35.045695 44,24 C44,12.954305 35.045695,4 24,4 C12.954305,4 4,12.954305 4,24 C4,35.045695 12.954305,44 24,44 Z" id="path-1"></path>
  8 + <filter x="-50%" y="-50%" width="200%" height="200%" filterUnits="objectBoundingBox" id="filter-2">
  9 + <feOffset dx="0" dy="1" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
  10 + <feGaussianBlur stdDeviation="2" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
  11 + <feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
  12 + </filter>
  13 + <rect id="path-3" x="8" y="8" width="32" height="32" rx="16"></rect>
  14 + <filter x="-50%" y="-50%" width="200%" height="200%" filterUnits="objectBoundingBox" id="filter-4">
  15 + <feOffset dx="0" dy="2" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
  16 + <feGaussianBlur stdDeviation="2" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
  17 + <feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
  18 + </filter>
  19 + </defs>
  20 + <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
  21 + <g id="03-班次-录制编程界面-其他语言-copy" transform="translate(-132.000000, -1005.000000)">
  22 + <g id="状态1-未开始录制" transform="translate(0.000000, 966.000000)">
  23 + <g id="开始录制" transform="translate(136.000000, 42.000000)">
  24 + <g id="Combined-Shape">
  25 + <use fill="black" fill-opacity="1" filter="url(#filter-2)" xlink:href="#path-1"></use>
  26 + <use fill="#FFFFFF" fill-rule="evenodd" xlink:href="#path-1"></use>
  27 + </g>
  28 + <g id="Rectangle-8">
  29 + <use fill="black" fill-opacity="1" filter="url(#filter-4)" xlink:href="#path-3"></use>
  30 + <use fill="#FF6668" fill-rule="evenodd" xlink:href="#path-3"></use>
  31 + </g>
  32 + </g>
  33 + </g>
  34 + </g>
  35 + </g>
  36 +</svg>
0 \ No newline at end of file 37 \ No newline at end of file
src/js/c.js
@@ -91,6 +91,12 @@ $(function(){ @@ -91,6 +91,12 @@ $(function(){
91 console.log(CodingEditer.records); 91 console.log(CodingEditer.records);
92 }) 92 })
93 93
  94 + // $.getScript('../js/main.js', function(){alert('../js/gbdebug/mode/xml/xml.js');});
  95 + // $.getScript('../js/gbdebug/mode/xml/xml.js')
  96 + // $.getScript('../js/gbdebug/mode/javascript/javascript.js')
  97 + // $.getScript('../js/gbdebug/mode/css/css.js')
  98 + // $.getScript('../js/gbdebug/mode/htmlmixed/htmlmixed.js')
  99 +
94 100
95 function recordReady(){ 101 function recordReady(){
96 var seconds = 0; 102 var seconds = 0;
src/js/main.js 0 → 100644
src/js/player.js
@@ -26,6 +26,10 @@ $(function(){ @@ -26,6 +26,10 @@ $(function(){
26 26
27 CodingEditer.isRecordPage = 0; 27 CodingEditer.isRecordPage = 0;
28 28
29 - 29 + $('.play-code').on('click', function(){
  30 + console.log('=================')
  31 + CodingEditer.playCoding();
  32 + CodingEditer.editable(0)
  33 + })
30 34
31 }) 35 })
32 \ No newline at end of file 36 \ No newline at end of file
src/scss/main.scss
@@ -33,7 +33,7 @@ html, body{ @@ -33,7 +33,7 @@ html, body{
33 position: absolute; 33 position: absolute;
34 box-sizing: border-box; 34 box-sizing: border-box;
35 padding-top: 36px; 35 padding-top: 36px;
36 - padding-bottom: 300px; 36 + padding-bottom: 260px;
37 37
38 #ideDir{ 38 #ideDir{
39 width: 170px; 39 width: 170px;
@@ -80,7 +80,7 @@ html, body{ @@ -80,7 +80,7 @@ html, body{
80 .console-wrap{ 80 .console-wrap{
81 width: 100%; 81 width: 100%;
82 background-color: #FFF; 82 background-color: #FFF;
83 - height: 240px; 83 + height: 200px;
84 border-top: 1px solid #999d9e; 84 border-top: 1px solid #999d9e;
85 85
86 #toolbar{ 86 #toolbar{
@@ -132,8 +132,8 @@ html, body{ @@ -132,8 +132,8 @@ html, body{
132 } 132 }
133 133
134 #resultoutput{ 134 #resultoutput{
135 - height: 204px;  
136 - overflow: auto; 135 + height: 164px;
  136 + overflow-y: scroll;
137 } 137 }
138 138
139 #CompileBtn{ 139 #CompileBtn{
@@ -317,7 +317,16 @@ html, body{ @@ -317,7 +317,16 @@ html, body{
317 z-index: 999; 317 z-index: 999;
318 } 318 }
319 319
320 - 320 +.play-code{
  321 + background: transparent;
  322 + border: none;
  323 + width: 40px;
  324 + height: 40px;
  325 + margin-left: 48px;
  326 +}
  327 +.play-code img{
  328 + width: 100%;
  329 +}
321 330
322 331
323 332
src/v1.1/index.html
@@ -10,6 +10,9 @@ @@ -10,6 +10,9 @@
10 <link href="../common/fonts/iconfont.css" rel="stylesheet"> 10 <link href="../common/fonts/iconfont.css" rel="stylesheet">
11 11
12 <link href="../css/codemirror.css" rel="stylesheet"> 12 <link href="../css/codemirror.css" rel="stylesheet">
  13 + <link href="../css/cm-theme/gbtags.css" rel="stylesheet">
  14 + <link href="../css/cm-theme/eclipse.css" rel="stylesheet">
  15 + <link href="../css/cm-theme/gbtags-dark.css" rel="stylesheet">
13 16
14 <link rel="stylesheet" href="../gxb-ide/toolBox.css"> 17 <link rel="stylesheet" href="../gxb-ide/toolBox.css">
15 <link rel="stylesheet" href="../css/ide.css"> 18 <link rel="stylesheet" href="../css/ide.css">
@@ -185,9 +188,9 @@ @@ -185,9 +188,9 @@
185 <script src="../js/gbdebug/mode/javascript/javascript.js"></script> 188 <script src="../js/gbdebug/mode/javascript/javascript.js"></script>
186 <script src="../js/gbdebug/mode/css/css.js"></script> 189 <script src="../js/gbdebug/mode/css/css.js"></script>
187 <script src="../js/gbdebug/mode/htmlmixed/htmlmixed.js"></script> 190 <script src="../js/gbdebug/mode/htmlmixed/htmlmixed.js"></script>
188 -<!-- <script src="../js/gbdebug/mode/clike/clike.js"></script> -->  
189 -<!-- <script src="../js/gbdebug/mode/php/php.js"></script> -->  
190 -<!-- <script src="../js/gbdebug/mode/python/python.js"></script> --> 191 +<script src="../js/gbdebug/mode/clike/clike.js"></script>
  192 +<script src="../js/gbdebug/mode/php/php.js"></script>
  193 +<script src="../js/gbdebug/mode/python/python.js"></script>
191 194
192 </body> 195 </body>
193 </html> 196 </html>
194 \ No newline at end of file 197 \ No newline at end of file
src/v1.1/player.html
@@ -129,7 +129,8 @@ @@ -129,7 +129,8 @@
129 <div id="playFooter"> 129 <div id="playFooter">
130 <div class="" id="audioWrap"> 130 <div class="" id="audioWrap">
131 <button class="play-code" style="display: none;"> 131 <button class="play-code" style="display: none;">
132 - <i class="icon iconfont icon-play"></i> 132 + <img src="../img/ideicon/play.svg" alt="">
  133 + <!-- <i class="icon iconfont icon-play"></i> -->
133 </button> 134 </button>
134 </div> 135 </div>
135 </div> 136 </div>