Commit d88708227e64f1c4dca91cd64f9b8534334bb8d6

Authored by ykxie
1 parent ea4f9efb

fix bug

gulp/config.js
... ... @@ -2,6 +2,10 @@ var src = './src';
2 2 var dest = './dist';
3 3  
4 4 module.exports = {
  5 + path: {
  6 + src: src + "/**/*",
  7 + dest: dest
  8 + },
5 9 srcSass: {
6 10 all: src + "/scss/**/*.scss",
7 11 src: src + "/scss/*.scss",
... ... @@ -42,5 +46,9 @@ module.exports = {
42 46 img: {
43 47 src: src + "/img/**/*",
44 48 dest: dest + "/img"
  49 + },
  50 + concat: {
  51 + src: src + "/gxb-ide/",
  52 + dest: dest + "/gxb-ide"
45 53 }
46 54 }
47 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 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 8 \ No newline at end of file
... ...
gulp/tasks/deploy.js
1 1 var gulp = require('gulp');
2 2  
3   -gulp.task('deploy', ['srcSass', 'html', 'css', 'img', 'uglifyJS', 'copy'])
4 3 \ No newline at end of file
  4 +gulp.task('deploy', ['srcSass', 'html', 'css', 'img', 'copy', 'concat'])
5 5 \ No newline at end of file
... ...
package.json
... ... @@ -25,5 +25,8 @@
25 25 "gulp-watch": "^4.3.10",
26 26 "pump": "^1.0.1",
27 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 106 position: absolute;
107 107 box-sizing: border-box;
108 108 padding-top: 36px;
109   - padding-bottom: 300px; }
  109 + padding-bottom: 260px; }
110 110 .record-wrap #ideDir {
111 111 width: 170px;
112 112 height: 100%;
... ... @@ -137,7 +137,7 @@ html, body {
137 137 .record-toolbox .console-wrap {
138 138 width: 100%;
139 139 background-color: #FFF;
140   - height: 240px;
  140 + height: 200px;
141 141 border-top: 1px solid #999d9e; }
142 142 .record-toolbox .console-wrap #toolbar {
143 143 width: 100%;
... ... @@ -176,8 +176,8 @@ html, body {
176 176 margin: 0 16px;
177 177 color: #fff; }
178 178 .record-toolbox #resultoutput {
179   - height: 204px;
180   - overflow: auto; }
  179 + height: 164px;
  180 + overflow-y: scroll; }
181 181 .record-toolbox #CompileBtn {
182 182 background-image: -webkit-linear-gradient(left, #1FB6FF 0%, #62DCF5 100%);
183 183 background-image: linear-gradient(to right, #1FB6FF 0%, #62DCF5 100%);
... ... @@ -320,3 +320,13 @@ html, body {
320 320 bottom: 0;
321 321 background-color: rgba(0, 0, 0, 0.4);
322 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 28 position: absolute;
29 29 box-sizing: border-box;
30 30 padding-top: 36px;
31   - padding-bottom: 300px; }
  31 + padding-bottom: 260px; }
32 32 .record-wrap #ideDir {
33 33 width: 170px;
34 34 height: 100%;
... ... @@ -59,7 +59,7 @@ html, body {
59 59 .record-toolbox .console-wrap {
60 60 width: 100%;
61 61 background-color: #FFF;
62   - height: 240px;
  62 + height: 200px;
63 63 border-top: 1px solid #999d9e; }
64 64 .record-toolbox .console-wrap #toolbar {
65 65 width: 100%;
... ... @@ -98,8 +98,8 @@ html, body {
98 98 margin: 0 16px;
99 99 color: #fff; }
100 100 .record-toolbox #resultoutput {
101   - height: 204px;
102   - overflow: auto; }
  101 + height: 164px;
  102 + overflow-y: scroll; }
103 103 .record-toolbox #CompileBtn {
104 104 background-image: -webkit-linear-gradient(left, #1FB6FF 0%, #62DCF5 100%);
105 105 background-image: linear-gradient(to right, #1FB6FF 0%, #62DCF5 100%);
... ... @@ -242,3 +242,13 @@ html, body {
242 242 bottom: 0;
243 243 background-color: rgba(0, 0, 0, 0.4);
244 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 53 },
54 54 initCodeMirror: function(langid){
55 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 282 }
282 283  
283 284  
284   -
285 285 // 初始化编程页面
286 286 function initProgramPage(treeLinkEditor, langid){
  287 + // alert(getMode(langid))
  288 + var modeName = getMode(langid) || 'text/x-java';
287 289 // 生成 CodeMirror
288 290 for (var i = 0; i < treeLinkEditor.length; i++) {
289 291 // 判断是否是播放页面,如果是则不显示录制区相关dom
290 292 if(!isReplayPage){
291 293 treeLinkEditor[i].CodeMirrorRecord = CodeMirror.fromTextArea($('#' + treeLinkEditor[i].record)[0], {
292 294 value: '',
293   - mode: "",
  295 + mode: modeName,
294 296 lineNumbers: true,
295 297 smartIndent: false,
296 298 onChange: function(em, changeobj) {
... ... @@ -315,7 +317,7 @@
315 317  
316 318 treeLinkEditor[i].CodeMirrorReplay = CodeMirror.fromTextArea($('#' + treeLinkEditor[i].replay)[0], {
317 319 value: '',
318   - mode: "text/x-java",
  320 + mode: modeName,
319 321 lineNumbers: true,
320 322 smartIndent: false,
321 323 onChange: function(em, changeobj) {
... ... @@ -332,6 +334,45 @@
332 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 378 * by Kira 2017-3-9
... ... @@ -339,17 +380,16 @@
339 380 function buildRecords(editor, changeobj){
340 381 var intervaltime,
341 382 currenttime = new Date().getTime();
342   -
  383 + var _role = getQuery('role');
343 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 394 var recordobj = {
355 395 intervaltime: intervaltime,
... ...
src/gxb-ide/Dir.js
... ... @@ -60,6 +60,7 @@
60 60 console.log('=======================');
61 61 console.log('isPlayPage ----- ' + isPlayPage);
62 62 console.log('role ----- ' + role);
  63 + var role = getQuery('role');
63 64  
64 65 if (isPlayPage == 0) {
65 66 $.ajax({
... ... @@ -586,10 +587,11 @@
586 587 dataType: "json",
587 588 contentType: "application/json",
588 589 success: function(res) {
  590 + console.log('0000--------------------')
589 591 console.log(res)
590 592 setTitle(res.languageid);
591 593  
592   - var coderecords = res.codeRecordList
  594 + var coderecords = res.codeRecordList || res.studentRecordList;
593 595 var audioUrl = res.audioUrl;
594 596  
595 597 var treeArr = res.programmingFileList;
... ... @@ -600,6 +602,7 @@
600 602 CodingEditer.initCodeMirror(treeLinkEditor);
601 603  
602 604 initTrigger(coderecords)
  605 +
603 606 AudioPlayer(audioUrl)
604 607 },
605 608 error: function(error) {
... ... @@ -621,27 +624,34 @@
621 624  
622 625 // 初始化播放音频控制条
623 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 657 // 设置 title
... ...
src/gxb-ide/Iterm.js
... ... @@ -32,13 +32,16 @@
32 32 var el = document.querySelector('#CompileBtn');
33 33 var userId = _this.options.userId;
34 34 var languageId = _this.options.languageId;
  35 + var role = getQuery('role');
35 36 // 判断是否录制走不同的逻辑
36 37 if (!CodingEditer.isRcording) {
37 38 compileMode(el, userId, languageId)
38 39 }else{
39 40 if (_this.compileStatus) {
40 41 Hourglass.pauseTimer(); // 暂停计时器
41   - recorder.pause(); // 音频暂停
  42 + if (role == 0) {
  43 + recorder.pause(); // 音频暂停
  44 + }
42 45  
43 46 $('.compile-loading').show();
44 47 $('.pause-shodow').show()
... ... @@ -53,8 +56,8 @@
53 56 }
54 57  
55 58 compileMode(el, userId, languageId)
  59 + $('.contrl-shodow').show();
56 60 }
57   - $('.contrl-shodow').show();
58 61 },
59 62 compileResult: function(data, value){
60 63 if (!data) {
... ... @@ -112,8 +115,11 @@
112 115 $('.contrl-shodow').hide();
113 116  
114 117 Hourglass.pauseTimer();
115   - recorder.pause();
116 118  
  119 + var role = getQuery('role');
  120 + if (role == 0) {
  121 + recorder.pause();
  122 + }
117 123 CodingEditer.record_startime = new Date().getTime();
118 124 }
119 125  
... ...
src/gxb-ide/ToolBox.js
... ... @@ -49,7 +49,7 @@
49 49 var toolBox = this.options.el;
50 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 53 $('#stop-recording img').attr('src', '../img/ideicon/stop.svg');
54 54 $('#re-recoding img').attr('src', '../img/ideicon/re-record.svg');
55 55 $('#audio-play img').attr('src', '../img/ideicon/play.svg');
... ... @@ -70,6 +70,7 @@
70 70 $('#cancel').on('click', function(){ _this.cancel(); })
71 71 $('#re-sure').on('click', function(){ _this.reSure(); })
72 72 $('#re-cancel').on('click', function(){ _this.reCancel(); })
  73 + $('.play-code').on('click', function(){ _this.playerPage(); })
73 74 },
74 75 startRecording: function(callback){
75 76 console.log(this.options.userId);
... ... @@ -89,7 +90,7 @@
89 90 _this.options.startCallback();
90 91 }
91 92 CodingEditer.isRcording = true;
92   - recordAudio()
  93 +
93 94 },
94 95 stopRecording: function(){
95 96 console.log('停止录制');
... ... @@ -179,8 +180,15 @@
179 180 },
180 181 uploadAudio: function(){
181 182 console.log('uploadAudio');
  183 + var _this = this;
182 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 193 saveCode: function(){
186 194 var _this = this;
... ... @@ -262,10 +270,19 @@
262 270 console.log(CodingEditer.records)
263 271 alert('代码保存失败重新保存')
264 272 }
  273 +
265 274 });
266 275 },
  276 + playerPage: function(){
  277 + CodingEditer.playCoding();
  278 + CodingEditer.editable(0)
  279 + },
267 280 cancel: function(){
268 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 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 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 37 \ No newline at end of file
... ...
src/gxb-ide/toolBox.css
... ... @@ -74,5 +74,6 @@
74 74 background: -webkit-linear-gradient(left, #1FB6FF, #62DDF5);
75 75 background: -moz-linear-gradient(left, #1FB6FF, #62DDF5);
76 76 }
77   -
78   -
79 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 37 \ No newline at end of file
... ...
src/js/c.js
... ... @@ -91,6 +91,12 @@ $(function(){
91 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 101 function recordReady(){
96 102 var seconds = 0;
... ...
src/js/main.js 0 → 100644
src/js/player.js
... ... @@ -26,6 +26,10 @@ $(function(){
26 26  
27 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 36 \ No newline at end of file
... ...
src/scss/main.scss
... ... @@ -33,7 +33,7 @@ html, body{
33 33 position: absolute;
34 34 box-sizing: border-box;
35 35 padding-top: 36px;
36   - padding-bottom: 300px;
  36 + padding-bottom: 260px;
37 37  
38 38 #ideDir{
39 39 width: 170px;
... ... @@ -80,7 +80,7 @@ html, body{
80 80 .console-wrap{
81 81 width: 100%;
82 82 background-color: #FFF;
83   - height: 240px;
  83 + height: 200px;
84 84 border-top: 1px solid #999d9e;
85 85  
86 86 #toolbar{
... ... @@ -132,8 +132,8 @@ html, body{
132 132 }
133 133  
134 134 #resultoutput{
135   - height: 204px;
136   - overflow: auto;
  135 + height: 164px;
  136 + overflow-y: scroll;
137 137 }
138 138  
139 139 #CompileBtn{
... ... @@ -317,7 +317,16 @@ html, body{
317 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 10 <link href="../common/fonts/iconfont.css" rel="stylesheet">
11 11  
12 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 17 <link rel="stylesheet" href="../gxb-ide/toolBox.css">
15 18 <link rel="stylesheet" href="../css/ide.css">
... ... @@ -185,9 +188,9 @@
185 188 <script src="../js/gbdebug/mode/javascript/javascript.js"></script>
186 189 <script src="../js/gbdebug/mode/css/css.js"></script>
187 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 195 </body>
193 196 </html>
194 197 \ No newline at end of file
... ...
src/v1.1/player.html
... ... @@ -129,7 +129,8 @@
129 129 <div id="playFooter">
130 130 <div class="" id="audioWrap">
131 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 134 </button>
134 135 </div>
135 136 </div>
... ...