Commit ce5502a33aecaea7ada8141991c5f0e90453b23c

Authored by ykxie
1 parent f1455930

fix bug

example/disable.html 0 → 100644
src/css/ide.css
... ... @@ -178,15 +178,16 @@ html, body {
178 178 .record-toolbox #resultoutput {
179 179 height: 164px;
180 180 overflow-y: scroll; }
181   - .record-toolbox #CompileBtn {
182   - background-image: -webkit-linear-gradient(left, #1FB6FF 0%, #62DCF5 100%);
183   - background-image: linear-gradient(to right, #1FB6FF 0%, #62DCF5 100%);
184   - -webkit-transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) all !important;
185   - transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) all !important;
  181 + .record-toolbox .btn {
186 182 border: none;
187 183 color: #fff;
188 184 padding-top: 5px;
189 185 padding-bottom: 5px; }
  186 + .record-toolbox .compile-btn {
  187 + background-image: -webkit-linear-gradient(left, #1FB6FF 0%, #62DCF5 100%);
  188 + background-image: linear-gradient(to right, #1FB6FF 0%, #62DCF5 100%);
  189 + -webkit-transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) all !important;
  190 + transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) all !important; }
190 191 .record-toolbox .record-ctrl {
191 192 height: 60px;
192 193 width: 100%;
... ...
src/css/main.css
... ... @@ -100,15 +100,16 @@ html, body {
100 100 .record-toolbox #resultoutput {
101 101 height: 164px;
102 102 overflow-y: scroll; }
103   - .record-toolbox #CompileBtn {
104   - background-image: -webkit-linear-gradient(left, #1FB6FF 0%, #62DCF5 100%);
105   - background-image: linear-gradient(to right, #1FB6FF 0%, #62DCF5 100%);
106   - -webkit-transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) all !important;
107   - transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) all !important;
  103 + .record-toolbox .btn {
108 104 border: none;
109 105 color: #fff;
110 106 padding-top: 5px;
111 107 padding-bottom: 5px; }
  108 + .record-toolbox .compile-btn {
  109 + background-image: -webkit-linear-gradient(left, #1FB6FF 0%, #62DCF5 100%);
  110 + background-image: linear-gradient(to right, #1FB6FF 0%, #62DCF5 100%);
  111 + -webkit-transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) all !important;
  112 + transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) all !important; }
112 113 .record-toolbox .record-ctrl {
113 114 height: 60px;
114 115 width: 100%;
... ...
src/gxb-ide/CodingEditer.js
... ... @@ -451,16 +451,11 @@
451 451 if (CodingEditer.triggertotal === CodingEditer.records.length && !replay_type) {
452 452 CodingEditer.editable(0);
453 453 CodingEditer.flag = true
454   - if (CodingEditer.isRecordPage) {
455   - $('#recordertab a:first').tab('show');
456   - }
457 454  
458 455 for (var i = 0; i < CodingEditer.records.length; i++) {
459 456 CodingEditer.records[i].trigger = 0;
460 457 }
461 458  
462   - Hourglass.stopTimer();
463   -
464 459 CodingEditer.triggertotal = 0;
465 460 }
466 461  
... ...
src/gxb-ide/Iterm.js
... ... @@ -4,6 +4,8 @@
4 4 this.initIterm.apply(this, arguments);
5 5 }
6 6  
  7 + var isCompile = false;
  8 +
7 9 Iterm.prototype = {
8 10 constructor: Iterm,
9 11 compileStatus: true,
... ... @@ -34,11 +36,16 @@
34 36 // var languageId = _this.options.languageId;
35 37 var languageId = _this.options.languageId || Dir.languageid;
36 38 var role = getQuery('role');
  39 +
  40 +
  41 +
37 42 // 判断是否录制走不同的逻辑
38 43 if (!CodingEditer.isRcording) {
39 44 compileMode(el, userId, languageId)
40 45 }else{
41   - if (_this.compileStatus) {
  46 +
  47 + if (_this.compileStatus && !_this.isCompile) {
  48 + $('#CompileBtn').removeClass('compile-btn');
42 49 Hourglass.pauseTimer(); // 暂停计时器
43 50 if (role == 0) {
44 51 recorder.pause(); // 音频暂停
... ... @@ -53,10 +60,13 @@
53 60 CodingEditer.addRecord(treeNode, check_tree_time);
54 61  
55 62 _this.compileStatus = false;
  63 + isCompile = true;
  64 +
  65 + compileMode(el, userId, languageId)
  66 + $('.contrl-shodow').show();
56 67 }
57 68 console.log('******************************' + languageId)
58   - compileMode(el, userId, languageId)
59   - $('.contrl-shodow').show();
  69 +
60 70 }
61 71 },
62 72 compileResult: function(data, value){
... ... @@ -121,6 +131,9 @@
121 131 recorder.pause();
122 132 }
123 133 CodingEditer.record_startime = new Date().getTime();
  134 +
  135 + $('#CompileBtn').addClass('compile-btn');
  136 + isCompile = false;
124 137 }
125 138  
126 139 // 编译
... ...
src/gxb-ide/ToolBox.js
... ... @@ -173,6 +173,14 @@
173 173 $('#audio')[0].play();
174 174 Hourglass.init()
175 175 CodingEditer.playCoding()
  176 + $('#audio')[0].addEventListener('ended', function () {
  177 + console.log('over');
  178 + if (CodingEditer.isRecordPage) {
  179 + $('#recordertab a:first').tab('show');
  180 + }
  181 + Hourglass.stopTimer();
  182 +
  183 + }, false);
176 184 }else{
177 185 console.log('播放代码=-------------------------');
178 186 return false;
... ...
src/scss/main.scss
... ... @@ -135,17 +135,19 @@ html, body{
135 135 height: 164px;
136 136 overflow-y: scroll;
137 137 }
138   -
139   - #CompileBtn{
140   - background-image: -webkit-linear-gradient(left, #1FB6FF 0%, #62DCF5 100%);
141   - background-image: linear-gradient(to right, #1FB6FF 0%, #62DCF5 100%);
142   - -webkit-transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) all !important;
143   - transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) all !important;
  138 +
  139 + .btn{
144 140 border: none;
145 141 color: #fff;
146 142 padding-top: 5px;
147 143 padding-bottom: 5px;
148 144 }
  145 + .compile-btn{
  146 + background-image: -webkit-linear-gradient(left, #1FB6FF 0%, #62DCF5 100%);
  147 + background-image: linear-gradient(to right, #1FB6FF 0%, #62DCF5 100%);
  148 + -webkit-transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) all !important;
  149 + transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) all !important;
  150 + }
149 151  
150 152 .record-ctrl{
151 153 height: 60px;
... ...
src/v1.1/index.html
... ... @@ -102,9 +102,9 @@
102 102 <li><a href="#output" role="tab" data-toggle="tab" class="text">结果</a></li>
103 103 </ul>
104 104 <div class="pull-right func">
105   - <a class="btn btn-success" id="CompileBtn">
  105 + <button class="btn compile-btn" id="CompileBtn">
106 106 <span class="ladda-label">编译运行</span>
107   - </a>
  107 + </button>
108 108 <a id="full-screen" class=""><i class="icon iconfont icon-quanping1"></i></a>
109 109 <a id="back-screen" class="" style="display: none;"><i class="icon iconfont icon-quanping1"></i></a>
110 110 </div>
... ...
src/v1.1/player.html
... ... @@ -104,7 +104,7 @@
104 104 <li><a href="#output" role="tab" data-toggle="tab" class="text">结果</a></li>
105 105 </ul>
106 106 <div class="pull-right func">
107   - <a class="btn btn-success" id="CompileBtn">
  107 + <a class="btn btn-success compile-btn" id="CompileBtn">
108 108 <span class="ladda-label">编译运行</span>
109 109 </a>
110 110 <a id="full-screen" class=""><i class="icon iconfont icon-quanping1"></i></a>
... ...