Commit 52865f489ebf2108a75239ec5acb1e4288566bfc
1 parent
93108b72
add readOnly
Showing
15 changed files
with
43 additions
and
745 deletions
src/gxb-ide/ToolBox.js
| @@ -36,6 +36,7 @@ | @@ -36,6 +36,7 @@ | ||
| 36 | uploadCallback: null, // 上传音频 | 36 | uploadCallback: null, // 上传音频 |
| 37 | saveCallback: null, // 上传代码 | 37 | saveCallback: null, // 上传代码 |
| 38 | cancelCallback: null, // 关闭 | 38 | cancelCallback: null, // 关闭 |
| 39 | + compileCallback: null // 编译 | ||
| 39 | }, | 40 | }, |
| 40 | init: function(options){ | 41 | init: function(options){ |
| 41 | var _this = this; | 42 | var _this = this; |
| @@ -65,31 +66,24 @@ | @@ -65,31 +66,24 @@ | ||
| 65 | startRecording: function(callback){ | 66 | startRecording: function(callback){ |
| 66 | console.log('startRecord'); | 67 | console.log('startRecord'); |
| 67 | var _this = this; | 68 | var _this = this; |
| 68 | - | ||
| 69 | if (typeof _this.options.startRecordingCallback == 'function') { | 69 | if (typeof _this.options.startRecordingCallback == 'function') { |
| 70 | console.log('startRecordingCallback'); | 70 | console.log('startRecordingCallback'); |
| 71 | _this.options.startRecordingCallback(); | 71 | _this.options.startRecordingCallback(); |
| 72 | } | 72 | } |
| 73 | + recordAudio() | ||
| 74 | + // HZRecorder.get(function(rec) { | ||
| 75 | + // console.log(rec); | ||
| 76 | + // recorder = rec; | ||
| 77 | + // recorder.start(); | ||
| 78 | + // CodingEditer.initRecodesValue(); | ||
| 73 | 79 | ||
| 74 | - HZRecorder.get(function(rec) { | ||
| 75 | - console.log(rec); | ||
| 76 | - recorder = rec; | ||
| 77 | - recorder.start(); | ||
| 78 | - // CodingEditer.resetCodeMirrorValue(0); | ||
| 79 | - CodingEditer.initRecodesValue(); | ||
| 80 | - | ||
| 81 | - }); | 80 | + // }); |
| 82 | 81 | ||
| 83 | }, | 82 | }, |
| 84 | stopRecording: function(){ | 83 | stopRecording: function(){ |
| 85 | console.log('停止录制'); | 84 | console.log('停止录制'); |
| 86 | var _this = this; | 85 | var _this = this; |
| 87 | - // 录制完成后禁止修改 | ||
| 88 | - var treeLinkEditor = Dir.treeLinkEditor | ||
| 89 | - for (var i = 0; i < treeLinkEditor.length; i++) { | ||
| 90 | - treeLinkEditor[i].CodeMirrorRecord.setOption('readOnly', true); | ||
| 91 | - treeLinkEditor[i].CodeMirrorReplay.setOption('readOnly', true); | ||
| 92 | - } | 86 | + _this.readOnly(1) |
| 93 | 87 | ||
| 94 | if (typeof _this.options.stopCallback == 'function') { | 88 | if (typeof _this.options.stopCallback == 'function') { |
| 95 | console.log('stopCallback'); | 89 | console.log('stopCallback'); |
| @@ -102,7 +96,11 @@ | @@ -102,7 +96,11 @@ | ||
| 102 | }, | 96 | }, |
| 103 | restartRecord: function(){ | 97 | restartRecord: function(){ |
| 104 | console.log('重新录制代码'); | 98 | console.log('重新录制代码'); |
| 105 | - // CodingEditer.resetCodeMirrorValue(2); | 99 | + var _this = this; |
| 100 | + $('#recordertab a:first').tab('show'); | ||
| 101 | + CodingEditer.records = []; | ||
| 102 | + _this.readOnly(0) | ||
| 103 | + recordAudio() | ||
| 106 | }, | 104 | }, |
| 107 | playCode: function(){ | 105 | playCode: function(){ |
| 108 | console.log('播放代码'); | 106 | console.log('播放代码'); |
| @@ -117,9 +115,35 @@ | @@ -117,9 +115,35 @@ | ||
| 117 | }, | 115 | }, |
| 118 | cancel: function(){ | 116 | cancel: function(){ |
| 119 | console.log('cancel'); | 117 | console.log('cancel'); |
| 118 | + }, | ||
| 119 | + /* | ||
| 120 | + * 修改代码状态 | ||
| 121 | + */ | ||
| 122 | + readOnly: function(){ | ||
| 123 | + // status: 1 禁止修改,0 允许修改 | ||
| 124 | + var treeLinkEditor = Dir.treeLinkEditor; | ||
| 125 | + | ||
| 126 | + if (status == 0 && status == 1) { | ||
| 127 | + for (var i = 0; i < treeLinkEditor.length; i++) { | ||
| 128 | + treeLinkEditor[i].CodeMirrorRecord.setOption('readOnly', status); | ||
| 129 | + treeLinkEditor[i].CodeMirrorReplay.setOption('readOnly', status); | ||
| 130 | + } | ||
| 131 | + }else{ | ||
| 132 | + console.log('status undefind'); | ||
| 133 | + } | ||
| 120 | } | 134 | } |
| 121 | }; | 135 | }; |
| 122 | 136 | ||
| 137 | + function recordAudio(){ | ||
| 138 | + HZRecorder.get(function(rec) { | ||
| 139 | + console.log(rec); | ||
| 140 | + recorder = rec; | ||
| 141 | + recorder.start(); | ||
| 142 | + CodingEditer.initRecodesValue(); | ||
| 143 | + | ||
| 144 | + }); | ||
| 145 | + } | ||
| 146 | + | ||
| 123 | // 编译结果 | 147 | // 编译结果 |
| 124 | function compileResult(data, value) { | 148 | function compileResult(data, value) { |
| 125 | var runtimeArgus = value || ''; | 149 | var runtimeArgus = value || ''; |
src/gxb-ide/ToolBox111.js deleted
100644 → 0
| 1 | -;(function(window){ | ||
| 2 | - var ToolBox = { | ||
| 3 | - compileMode: function(userId, languageid){ | ||
| 4 | - // 获取标准输入值 | ||
| 5 | - var runtimeArgus = $('#runtimeArgus').val() || ''; | ||
| 6 | - var mainPath = Dir.mainPath; | ||
| 7 | - var _fileList = Dir.getTreeData(); | ||
| 8 | - | ||
| 9 | - var compileData = { | ||
| 10 | - "userId": userId, | ||
| 11 | - "langId": languageid, | ||
| 12 | - "mainPath": mainPath, | ||
| 13 | - "mainArgus": "", | ||
| 14 | - "runtimeArgus": runtimeArgus, | ||
| 15 | - "rand": "123456", | ||
| 16 | - "fileList": _fileList || [] | ||
| 17 | - } | ||
| 18 | - | ||
| 19 | - console.log(compileData); | ||
| 20 | - | ||
| 21 | - $.ajax({ | ||
| 22 | - type: "POST", | ||
| 23 | - url: gxb_api + "/gxb-web/programmingMulti/codeRun/api", | ||
| 24 | - data: JSON.stringify(compileData), | ||
| 25 | - dataType: "json", | ||
| 26 | - contentType: "application/json", | ||
| 27 | - success: function(data) { | ||
| 28 | - console.log(data); | ||
| 29 | - | ||
| 30 | - compileResult(data) | ||
| 31 | - ladda.remove(); | ||
| 32 | - | ||
| 33 | - CodingEditer.compileResultData = data; | ||
| 34 | - | ||
| 35 | - }, | ||
| 36 | - error: function(XMLHttpRequest, textStatus, errorThrown) { | ||
| 37 | - ladda.remove(); | ||
| 38 | - alert('错误'); | ||
| 39 | - console.log(XMLHttpRequest); | ||
| 40 | - }, | ||
| 41 | - }); | ||
| 42 | - } | ||
| 43 | - } | ||
| 44 | - | ||
| 45 | - // 编译结果 | ||
| 46 | - function compileResult(data, value) { | ||
| 47 | - var runtimeArgus = value || ''; | ||
| 48 | - console.info('compileResult') | ||
| 49 | - if (value != '') { | ||
| 50 | - $('#cmprun-tabs a[href="#stdin"]').tab('show'); | ||
| 51 | - $('#stdin input').val(runtimeArgus); | ||
| 52 | - }else{ | ||
| 53 | - return; | ||
| 54 | - } | ||
| 55 | - | ||
| 56 | - if (data.status == 200) { | ||
| 57 | - | ||
| 58 | - $('#cmpinfo').html('<p class="text-warning">' + data.compilerInfo.replace(/\n/g, "<br />") + "</p>"); | ||
| 59 | - $('#stderr').html('<p class="text-danger">' + data.error.replace(/\n/g, "<br />") + "</p>"); | ||
| 60 | - $('#output').html('<p class="text-success">' + data.content.replace(/\n/g, "<br />") + "</p>"); | ||
| 61 | - | ||
| 62 | - if(data.compilerInfo.length){ | ||
| 63 | - $('#cmprun-tabs a[href="#cmpinfo"]').tab('show'); | ||
| 64 | - }else if(data.error.length){ | ||
| 65 | - $('#cmprun-tabs a[href="#stderr"]').tab('show'); | ||
| 66 | - }else if(data.content.length){ | ||
| 67 | - $('#cmprun-tabs a[href="#output"]').tab('show'); | ||
| 68 | - } | ||
| 69 | - | ||
| 70 | - if(!data.compilerInfo.length){ | ||
| 71 | - $('#cmpinfo').prepend('<p class="alert alert-success"><i class="glyphicon glyphicon-ok-sign"></i> 编译已成功</p>'); | ||
| 72 | - } | ||
| 73 | - }else if(data.status == 500){ | ||
| 74 | - $('#cmprun-tabs a[href="#stderr"]').tab('show'); | ||
| 75 | - $('#stderr').html('<p class="text-danger">' + data.error.replace(/\n/g, "<br />") + "</p>"); | ||
| 76 | - }else{ | ||
| 77 | - $('#cmpinfo').html('<p class="alert alert-danger"><i class="glyphicon glyphicon-exclamation-sign"></i> 请求失败 </p>'); | ||
| 78 | - $('#cmprun-tabs a[href="#cmpinfo"]').tab('show'); | ||
| 79 | - } | ||
| 80 | - } | ||
| 81 | - | ||
| 82 | - window.ToolBox = ToolBox; | ||
| 83 | -})(window) | ||
| 84 | - | ||
| 85 | - | ||
| 86 | - | ||
| 87 | -// 云编译 | ||
| 88 | -// function compileRun(ladda){ | ||
| 89 | -// // 获取标准输入值 | ||
| 90 | -// var runtimeArgus = $('#runtimeArgus').val() || ''; | ||
| 91 | - | ||
| 92 | -// fileList = ZTREE.getTreeData(); | ||
| 93 | -// console.log(fileList); | ||
| 94 | -// if(!fileList){ | ||
| 95 | -// alert('请输入代码'); | ||
| 96 | -// ladda.remove(); | ||
| 97 | -// return false; | ||
| 98 | -// } | ||
| 99 | -// var compileData = { | ||
| 100 | -// "userId": _userId, | ||
| 101 | -// "langId": _languageid, | ||
| 102 | -// "mainPath": mainPath, | ||
| 103 | -// "mainArgus": "", | ||
| 104 | -// "runtimeArgus": runtimeArgus, | ||
| 105 | -// "rand": "123456", | ||
| 106 | -// "fileList": fileList | ||
| 107 | -// } | ||
| 108 | -// console.log(compileData); | ||
| 109 | -// $.ajax({ | ||
| 110 | -// type: "POST", | ||
| 111 | -// url: gxb_api + "/gxb-web/programmingMulti/codeRun/api", | ||
| 112 | -// data: JSON.stringify(compileData), | ||
| 113 | -// dataType: "json", | ||
| 114 | -// contentType: "application/json", | ||
| 115 | -// success: function(data) { | ||
| 116 | -// console.log(data); | ||
| 117 | - | ||
| 118 | -// compileResult(data) | ||
| 119 | -// ladda.remove(); | ||
| 120 | - | ||
| 121 | -// $('.compile-loading').hide(); | ||
| 122 | -// $('.compile-reslut').show(); | ||
| 123 | -// GBCodePlayBack.compileResultData = data; | ||
| 124 | - | ||
| 125 | -// }, | ||
| 126 | -// error: function(XMLHttpRequest, textStatus, errorThrown) { | ||
| 127 | -// ladda.remove(); | ||
| 128 | -// alert('错误'); | ||
| 129 | -// console.log(XMLHttpRequest); | ||
| 130 | -// }, | ||
| 131 | -// }); | ||
| 132 | -// } | ||
| 133 | \ No newline at end of file | 0 | \ No newline at end of file |
src/gxb-ide/c.html deleted
100644 → 0
| 1 | -<!DOCTYPE html> | ||
| 2 | -<html lang="en"> | ||
| 3 | -<head> | ||
| 4 | - <meta charset="UTF-8"> | ||
| 5 | - <meta name="renderer" content="webkit"> | ||
| 6 | - <title>录制课程 - 互动编程</title> | ||
| 7 | - <link rel="stylesheet" href="../css/reset.css"> | ||
| 8 | - <link rel="stylesheet" href="../css/responsive/css/bootstrap.min.css"> | ||
| 9 | - <link href="../css/validationEngine.jquery.css" rel="stylesheet"> | ||
| 10 | - <link href="../css/codemirror.css" rel="stylesheet"> | ||
| 11 | - <link href="../css/cm-theme/gbtags.css" rel="stylesheet"> | ||
| 12 | - <link href="../css/cm-theme/eclipse.css" rel="stylesheet"> | ||
| 13 | - <link href="../css/cm-theme/gbtags-dark.css" rel="stylesheet"> | ||
| 14 | - <link href="../css/font/iconfont.css" rel="stylesheet"> | ||
| 15 | - <link href="../css/font_all/iconfont.css" rel="stylesheet"> | ||
| 16 | - <link href="../css/layout.css" rel="stylesheet"> | ||
| 17 | - <link href="../css/main.css" rel="stylesheet"> | ||
| 18 | - <link href="../css/recording.css" rel="stylesheet"> | ||
| 19 | - <!-- <link href="http://lab.hakim.se/ladda/dist/ladda.min.css" rel="stylesheet"> --> | ||
| 20 | - <link rel="stylesheet" href="../js/zTree_v3-3.5.27/css/zTreeStyle/zTreeStyle.css"> | ||
| 21 | - | ||
| 22 | - <script> | ||
| 23 | - var gxb_api = "https://restful1.gaoxiaobang.com"; | ||
| 24 | - // var gxb_api = "http://192.168.80.223:8080" | ||
| 25 | - | ||
| 26 | - </script> | ||
| 27 | - | ||
| 28 | - <script src="../js/jquery-1.7.1.js"></script> | ||
| 29 | - <script src="../js/bootstrap.js"></script> | ||
| 30 | - | ||
| 31 | - <script src="../js/humps-2.0.0/humps.js"></script> | ||
| 32 | - | ||
| 33 | - <script src="../js/util/util.js"></script> | ||
| 34 | - <script src="../js/util/Hourglass.js"></script> | ||
| 35 | - | ||
| 36 | - | ||
| 37 | - <script src="../js/spin.js"></script> | ||
| 38 | - <script src="../js/ladda.js"></script> | ||
| 39 | - | ||
| 40 | - <script src="../js/jquery-ui-1.8.20.custom.js"></script> | ||
| 41 | - <script src="../js/codemirror.js"></script> | ||
| 42 | - <!-- <script src="../js/handlebars-1.3.js"></script> --> | ||
| 43 | - <script src="../js/emmet.js"></script> | ||
| 44 | - <script src="../js/jshint-2.6.min.js"></script> | ||
| 45 | - <script src="../js/jstorage.js"></script> | ||
| 46 | - | ||
| 47 | - <script src="../js/05-util.js"></script> | ||
| 48 | - <script src="../js/03-http.js"></script> | ||
| 49 | - | ||
| 50 | - <script src="../js/jquery.validationEngine.js"></script> | ||
| 51 | - <script src="../js/jquery.validationEngine-zh.js"></script> | ||
| 52 | - <script src="../js/jquery.isotope.js"></script> | ||
| 53 | - | ||
| 54 | - <link rel="stylesheet" href="../css/demo.css"> | ||
| 55 | - <script type="text/javascript" src="../js/zTree_v3-3.5.27/js/jquery.ztree.core.js"></script> | ||
| 56 | - <script type="text/javascript" src="../js/zTree_v3-3.5.27/js/jquery.ztree.exedit.js"></script> | ||
| 57 | - <script src="../js/gb.js"></script> | ||
| 58 | - <!-- <script src="../js/gbreplayer.js"></script> --> | ||
| 59 | - | ||
| 60 | - <script src="../js/gbdebug/mode/xml/xml.js"></script> | ||
| 61 | - <script src="../js/gbdebug/mode/javascript/javascript.js"></script> | ||
| 62 | - <script src="../js/gbdebug/mode/css/css.js"></script> | ||
| 63 | - <script src="../js/gbdebug/mode/htmlmixed/htmlmixed.js"></script> | ||
| 64 | - <script src="../js/gbdebug/mode/clike/clike.js"></script> | ||
| 65 | - <script src="../js/gbdebug/mode/php/php.js"></script> | ||
| 66 | - <script src="../js/gbdebug/mode/python/python.js"></script> | ||
| 67 | - <style type="text/css"> | ||
| 68 | - #recordzone, | ||
| 69 | - #replayzone{ | ||
| 70 | - display: none; | ||
| 71 | - } | ||
| 72 | - #recordzone.active, | ||
| 73 | - #replayzone.active{ | ||
| 74 | - display: block; | ||
| 75 | - } | ||
| 76 | - .editor{ | ||
| 77 | - height: 100%; | ||
| 78 | - float: left; | ||
| 79 | - position: relative; | ||
| 80 | - } | ||
| 81 | - </style> | ||
| 82 | -</head> | ||
| 83 | -<body> | ||
| 84 | - <div class="wrapper"> | ||
| 85 | - <div id="appContainer"> | ||
| 86 | - <div class="editor"> | ||
| 87 | - <div id="appLeft"> | ||
| 88 | - <div class="tree-header">目录</div> | ||
| 89 | - <ul id="folder" class="ztree"></ul> | ||
| 90 | - <div id="handleLM"></div> | ||
| 91 | - </div> | ||
| 92 | - <div id="appMian"> | ||
| 93 | - <div id="appMainHeader"> | ||
| 94 | - <ul id="recordertab" class="nav nav-tabs pull-left"> | ||
| 95 | - <li class="active"><a href="#recordzone" data-toggle="tab"><i class="icon iconfont icon-suspend"></i>课程录制区</a></li> | ||
| 96 | - <li><a href="#replayzone" data-toggle="tab"><i class="icon iconfont icon-yulan"></i>课程预览区</a></li> | ||
| 97 | - </ul> | ||
| 98 | - <div id="editorwrapper" class="pull-right"> | ||
| 99 | - <div class="btn-group"> | ||
| 100 | - <div id="htmlbutton" class="btn btn-default btn-sm" data-toggle="tooltip" data-placement="bottom" data-original-title="当前课程环境:Java" data-editorname="html">JAVA</div> | ||
| 101 | - <div class="btn btn-default btn-sm" data-toggle="tooltip" data-placement="bottom" data-original-title="JDK版本">JDK 7</div> | ||
| 102 | - </div> | ||
| 103 | - </div> | ||
| 104 | - </div> | ||
| 105 | - <div id="textarea"> | ||
| 106 | - <div id="recordzone" class="active"></div> | ||
| 107 | - <div id="replayzone"></div> | ||
| 108 | - </div> | ||
| 109 | - <div id="handleMR"></div> | ||
| 110 | - </div> | ||
| 111 | - <div class="pause-shodow hidden"> | ||
| 112 | - <div class="compile-loading"> | ||
| 113 | - <img src="../img/loading.png" alt=""> | ||
| 114 | - </div> | ||
| 115 | - <div class="compile-reslut" style="display: none;"> | ||
| 116 | - <div class="tip-header"> | ||
| 117 | - <span>成功获取编译运行结果</span> | ||
| 118 | - </div> | ||
| 119 | - <div class="tip-content"> | ||
| 120 | - <p>保存编译结果后,播放到此处会在运行区域直接显示结果。需要保存结果后继续录制吗?</p> | ||
| 121 | - </div> | ||
| 122 | - <div class="tip-footer"> | ||
| 123 | - <button class="btn btn-success btn-sm" id="save_compile">保存并继续录制</button> | ||
| 124 | - <button class="btn btn-danger btn-sm" id="cancel_compile">不保存继续录制</button> | ||
| 125 | - </div> | ||
| 126 | - </div> | ||
| 127 | - </div> | ||
| 128 | - </div> | ||
| 129 | - | ||
| 130 | - <div id="appRight"> | ||
| 131 | - <div id="resultpanel" class="panel panel-default editor-result"> | ||
| 132 | - <div class="panel-heading result-header"> | ||
| 133 | - <div class="pull-left"> | ||
| 134 | - <div id="compileBtnGroup" class="btn-group"></div> | ||
| 135 | - </div> | ||
| 136 | - <div class="pull-right"> | ||
| 137 | - <a id="full-screen" href="javascript:;" data-toggle="tooltip" data-placement="left" data-original-title="全屏录制" class="btn btn-link"><i class="icon iconfont icon-fangda"></i></a> | ||
| 138 | - <a id="back-screen" href="javascript:;" data-toggle="tooltip" data-placement="left" data-original-title="退出全屏录制" class="btn btn-link" style="display: none;"><i class="icon iconfont icon-fangda"></i></a> | ||
| 139 | - </div> | ||
| 140 | - <div class="btn-group"> | ||
| 141 | - <button type="button" class="btn btn-success" id="play" data-status="0" title="" style="display: none;"><</button> | ||
| 142 | - <!-- <p id="replay">预览录制</p> --> | ||
| 143 | - </div> | ||
| 144 | - <!-- <div class="btn-group pull-right" id="fontendrun"> | ||
| 145 | - <button id="autorun" type="button" class="btn" title="切换自动/手动运行代码" data-placement="bottom" data-autorun="1"></button> | ||
| 146 | - <button id="runnow" type="button" class="btn" title="手动运行代码" data-placement="bottom" disabled="disabled"> | ||
| 147 | - 自动运行 | ||
| 148 | - </button> | ||
| 149 | - </div> --> | ||
| 150 | - </div> | ||
| 151 | - <div class="panel-body hidden" id="cmprun-output"> | ||
| 152 | - <div id="resultoutput"> | ||
| 153 | - <!-- Nav tabs --> | ||
| 154 | - <ul class="nav nav-tabs result-tabs" role="tablist" id="cmprun-tabs"> | ||
| 155 | - <li class="active"><a href="#stdin" role="tab" data-toggle="tab" class="text-warning">标准</a></li> | ||
| 156 | - <li><a href="#cmpinfo" role="tab" data-toggle="tab" class="text-warning">编译</a></li> | ||
| 157 | - <li><a href="#stderr" role="tab" data-toggle="tab" class="text-danger">错误</a></li> | ||
| 158 | - <li><a href="#output" role="tab" data-toggle="tab" class="text-success">结果</a></li> | ||
| 159 | - </ul> | ||
| 160 | - <!-- Tab panes --> | ||
| 161 | - <div class="tab-content"> | ||
| 162 | - <div class="tab-pane active padall15" id="stdin"> | ||
| 163 | - <input type="text" class="form-control" id="runtimeArgus" placeholder="标准输入"> | ||
| 164 | - </div> | ||
| 165 | - <div class="tab-pane padall15" id="cmpinfo"></div> | ||
| 166 | - <div class="tab-pane padall15" id="stderr"></div> | ||
| 167 | - <div class="tab-pane padall15" id="output"></div> | ||
| 168 | - </div> | ||
| 169 | - </div> | ||
| 170 | - </div> | ||
| 171 | - <div class="panel-body" id="ifrcontainer"> | ||
| 172 | - <iframe id="resultiframe" frameBorder="0" width="100%"></iframe> | ||
| 173 | - </div> | ||
| 174 | - </div> | ||
| 175 | - </div> | ||
| 176 | - </div> | ||
| 177 | - <div id="appFooter"> | ||
| 178 | - <!-- 录音控制条 --> | ||
| 179 | - <input type="hidden" class="audio-url" value=""> | ||
| 180 | - <div class="recording-ctrl-bar"> | ||
| 181 | - <button id="start-recording" class="btn new-recording" type="button" data="1" title="开始录制"></button> | ||
| 182 | - <button id="re-recoding" class="btn new-recording" type="button" data="1" title="重新录制" style="display: none;"></button> | ||
| 183 | - <button class="btn pause-recording hidden" id="pause" data-status='0' title="录制暂停中"> | ||
| 184 | - <img src="../img/pause.svg" alt=""> | ||
| 185 | - </button> | ||
| 186 | - | ||
| 187 | - <button class="audio-play hidden" title="播放预览" data="1"> | ||
| 188 | - <i class="icon iconfont icon-play"></i> | ||
| 189 | - </button> | ||
| 190 | - <div class="recording-time" id="timer" value="">00:00:00</div> | ||
| 191 | - <div class="audio-view" style="display: none;"> | ||
| 192 | - <audio id="audio"></audio> | ||
| 193 | - </div> | ||
| 194 | - <div class="save-wrap"> | ||
| 195 | - <input type="button" id="upload" class="upload-teach" disabled="disabled" value="保存"> | ||
| 196 | - <input type="button" id="savecorde" class="upload-stud" style="display: none;" disabled="disabled" value="保存"> | ||
| 197 | - <input type="button" id="cancel" value="关闭"> | ||
| 198 | - </div> | ||
| 199 | - </div> | ||
| 200 | - </div> | ||
| 201 | - </div> | ||
| 202 | - | ||
| 203 | - | ||
| 204 | - <!-- 重新开始 --> | ||
| 205 | - <div class="re-tips" style="display: none;"> | ||
| 206 | - <div class="re-reslut"> | ||
| 207 | - <div class="tip-header"> | ||
| 208 | - <span>提示</span> | ||
| 209 | - </div> | ||
| 210 | - <div class="tip-content"> | ||
| 211 | - <p>你确定要重新录制吗?</p> | ||
| 212 | - </div> | ||
| 213 | - <div class="tip-footer"> | ||
| 214 | - <button class="btn btn-success btn-sm" id="re-sure">确定</button> | ||
| 215 | - <button class="btn btn-danger btn-sm" id="re-cancel">取消</button> | ||
| 216 | - </div> | ||
| 217 | - </div> | ||
| 218 | - </div> | ||
| 219 | - | ||
| 220 | - | ||
| 221 | - <script src="../js/recorder/Myna.js"></script> | ||
| 222 | - <script src="../js/recording/recording.js"></script> | ||
| 223 | - | ||
| 224 | - <script> | ||
| 225 | - var | ||
| 226 | - </script> | ||
| 227 | -</body> | ||
| 228 | -</html> | ||
| 229 | - | ||
| 230 | - | ||
| 231 | - |
src/gxb-ide/demo.html deleted
100644 → 0
| 1 | -<!DOCTYPE html> | ||
| 2 | -<html lang="en"> | ||
| 3 | -<head> | ||
| 4 | - <meta charset="UTF-8"> | ||
| 5 | - <title>Document</title> | ||
| 6 | - <script src="../js/jquery-1.7.1.js"></script> | ||
| 7 | - | ||
| 8 | - | ||
| 9 | -<script> | ||
| 10 | - // var str; | ||
| 11 | - // var ff; | ||
| 12 | - // $(function(){ | ||
| 13 | - // var _url = "../js/10.json"; | ||
| 14 | - // $.ajax({ | ||
| 15 | - // type: "GET", | ||
| 16 | - // url: _url, | ||
| 17 | - // dataType: "json", | ||
| 18 | - // contentType: "application/json", | ||
| 19 | - // success: function(res) { | ||
| 20 | - // console.log(res); | ||
| 21 | - // ff = res; | ||
| 22 | - // fun(res) | ||
| 23 | - // }, | ||
| 24 | - // error: function(XMLHttpRequest, textStatus, errorThrown) { | ||
| 25 | - // console.log('Ajax langs.json error'); | ||
| 26 | - // console.log(XMLHttpRequest); | ||
| 27 | - // } | ||
| 28 | - // }); | ||
| 29 | - // }) | ||
| 30 | - | ||
| 31 | - // function fun(res){ | ||
| 32 | - // str = res; | ||
| 33 | - // } | ||
| 34 | -</script> | ||
| 35 | -<style> | ||
| 36 | - *{ | ||
| 37 | - margin: 0; | ||
| 38 | - padding: 0; | ||
| 39 | - } | ||
| 40 | - html, body{ | ||
| 41 | - width: 100%; | ||
| 42 | - height: 100%; | ||
| 43 | - } | ||
| 44 | - .programing{ | ||
| 45 | - width: 100%; | ||
| 46 | - height: 100%; | ||
| 47 | - position: absolute; | ||
| 48 | - overflow: hidden; | ||
| 49 | - box-sizing: border-box; | ||
| 50 | - } | ||
| 51 | - .record-title{ | ||
| 52 | - height: 60px; | ||
| 53 | - position: absolute; | ||
| 54 | - background-color: #999; | ||
| 55 | - top: 0; | ||
| 56 | - } | ||
| 57 | - .console-wrap{ | ||
| 58 | - height: 60px; | ||
| 59 | - position: absolute; | ||
| 60 | - background-color: #00F; | ||
| 61 | - bottom: 0; | ||
| 62 | - } | ||
| 63 | - | ||
| 64 | - .record-wrap{ | ||
| 65 | - padding: 60px 0; | ||
| 66 | - height: 100%; | ||
| 67 | - box-sizing: border-box; | ||
| 68 | - } | ||
| 69 | - | ||
| 70 | -</style> | ||
| 71 | -</head> | ||
| 72 | -<body> | ||
| 73 | - <div class="programing"> | ||
| 74 | - <div class="record-title">sd</div> | ||
| 75 | - <div class="record-wrap">ds</div> | ||
| 76 | - <div class="console-wrap">fad</div> | ||
| 77 | - </div> | ||
| 78 | -</body> | ||
| 79 | -</html> | ||
| 80 | - | ||
| 81 | - | ||
| 82 | - | ||
| 83 | - |
src/gxb-ide/java.html deleted
100644 → 0
| 1 | -<!DOCTYPE html> | ||
| 2 | -<html lang="en"> | ||
| 3 | -<head> | ||
| 4 | - <meta charset="UTF-8"> | ||
| 5 | - <title>JAVA</title> | ||
| 6 | - <link rel="stylesheet" href="../css/responsive/css/bootstrap.min.css"> | ||
| 7 | - <link href="../css/codemirror.css" rel="stylesheet"> | ||
| 8 | - <link href="../css/reset.css" rel="stylesheet"> | ||
| 9 | - <link rel="stylesheet" href="../js/zTree_v3-3.5.27/css/zTreeStyle/zTreeStyle.css"> | ||
| 10 | - | ||
| 11 | - <link href="../common/fonts/iconfont.css" rel="stylesheet"> | ||
| 12 | - | ||
| 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"> | ||
| 16 | - | ||
| 17 | - <!-- <link href="../css/layout.css" rel="stylesheet"> --> | ||
| 18 | - <!-- <link href="../css/main.css" rel="stylesheet"> --> | ||
| 19 | - | ||
| 20 | - <!-- <link href="../css/recording.css" rel="stylesheet"> --> | ||
| 21 | - <!-- <link rel="stylesheet" href="../css/demo.css"> --> | ||
| 22 | - | ||
| 23 | - <link rel="stylesheet" href="../css/ide.css"> | ||
| 24 | - | ||
| 25 | - <script src="../js/jquery-1.7.1.js"></script> | ||
| 26 | - <script src="../js/bootstrap.js"></script> | ||
| 27 | - <script src="../js/codemirror.js"></script> | ||
| 28 | - <script type="text/javascript" src="../js/zTree_v3-3.5.27/js/jquery.ztree.core.js"></script> | ||
| 29 | - <script type="text/javascript" src="../js/zTree_v3-3.5.27/js/jquery.ztree.exedit.js"></script> | ||
| 30 | - <script src="../js/emmet.js"></script> | ||
| 31 | - <script src="../js/util/util.js"></script> | ||
| 32 | - | ||
| 33 | - <script src="Dir.js"></script> | ||
| 34 | - <script src="CodingEditer.js"></script> | ||
| 35 | - <script src="ToolBox.js"></script> | ||
| 36 | - <script src="Ide.js"></script> | ||
| 37 | - <script src="java.js"></script> | ||
| 38 | - | ||
| 39 | - <script src="../js/gbdebug/mode/xml/xml.js"></script> | ||
| 40 | - <script src="../js/gbdebug/mode/javascript/javascript.js"></script> | ||
| 41 | - <script src="../js/gbdebug/mode/css/css.js"></script> | ||
| 42 | - <script src="../js/gbdebug/mode/htmlmixed/htmlmixed.js"></script> | ||
| 43 | - <script src="../js/gbdebug/mode/clike/clike.js"></script> | ||
| 44 | - | ||
| 45 | - <script> | ||
| 46 | - var gxb_api = "https://restful1.gaoxiaobang.com"; | ||
| 47 | - // var gxb_api = "http://192.168.80.223:8080" | ||
| 48 | - | ||
| 49 | - </script> | ||
| 50 | - <script> | ||
| 51 | - $(function(){ | ||
| 52 | - var languageid = 10; | ||
| 53 | - var userId = 826920; | ||
| 54 | - var ide = new GxbIde({ | ||
| 55 | - el: '#folder', | ||
| 56 | - languageid: languageid | ||
| 57 | - }); | ||
| 58 | - | ||
| 59 | - $('.getValue').click(function(){ | ||
| 60 | - // var treeLinkEditor = Dir.treeLinkEditor; | ||
| 61 | - console.log(CodingEditer.records); | ||
| 62 | - CodingEditer.getCodeMirrorValue(); | ||
| 63 | - CodingEditer.playCoding(); | ||
| 64 | - }) | ||
| 65 | - | ||
| 66 | - $('#compileBtn').click(function(){ | ||
| 67 | - ToolBox.compileMode(userId, languageid); | ||
| 68 | - }) | ||
| 69 | - | ||
| 70 | - }) | ||
| 71 | - | ||
| 72 | - </script> | ||
| 73 | - | ||
| 74 | - <script> | ||
| 75 | - | ||
| 76 | - </script> | ||
| 77 | - | ||
| 78 | -</head> | ||
| 79 | -<body> | ||
| 80 | - <div> | ||
| 81 | - | ||
| 82 | - | ||
| 83 | - </div> | ||
| 84 | - <div class="programing"> | ||
| 85 | - | ||
| 86 | - <!-- 控制条 --> | ||
| 87 | - <div class="record-title"> | ||
| 88 | - <ul id="recordertab" class="nav nav-tabs pull-left"> | ||
| 89 | - <li class="active"> | ||
| 90 | - <a href="#recordzone" data-toggle="tab"> | ||
| 91 | - <i class="icon iconfont icon-suspend"></i>课程录制区 | ||
| 92 | - </a> | ||
| 93 | - </li> | ||
| 94 | - <li> | ||
| 95 | - <a href="#replayzone" data-toggle="tab"> | ||
| 96 | - <i class="icon iconfont icon-yulan"></i>课程预览区 | ||
| 97 | - </a> | ||
| 98 | - </li> | ||
| 99 | - </ul> | ||
| 100 | - </div> | ||
| 101 | - | ||
| 102 | - <!-- 录制区 --> | ||
| 103 | - <div class="record-wrap"> | ||
| 104 | - <!-- 录制区 --> | ||
| 105 | - <div class="gxb-record"> | ||
| 106 | - <div id="ideDir"> | ||
| 107 | - <div class="tree-header">目录</div> | ||
| 108 | - <ul id="folder" class="ztree"></ul> | ||
| 109 | - <div id="handleLM"></div> | ||
| 110 | - </div> | ||
| 111 | - | ||
| 112 | - <div id="ideEditer" class="tab-content"> | ||
| 113 | - <div id="recordzone" class="tab-pane active"></div> | ||
| 114 | - <div id="replayzone" class="tab-pane"></div> | ||
| 115 | - </div> | ||
| 116 | - </div> | ||
| 117 | - </div> | ||
| 118 | - | ||
| 119 | - | ||
| 120 | - | ||
| 121 | - <!-- 控录制录制 --> | ||
| 122 | - <div class="record-toolbox"> | ||
| 123 | - <!-- 运行结果区 --> | ||
| 124 | - <div class="console-wrap"> | ||
| 125 | - <div id="toolbar"> | ||
| 126 | - <!-- Nav tabs --> | ||
| 127 | - <ul class="nav nav-tabs result-tabs need-compile" role="tablist" id="cmprun-tabs"> | ||
| 128 | - <li class="active"><a href="#stdin" role="tab" data-toggle="tab" class="text">标准</a></li> | ||
| 129 | - <li><a href="#cmpinfo" role="tab" data-toggle="tab" class="text">编译</a></li> | ||
| 130 | - <li><a href="#stderr" role="tab" data-toggle="tab" class="text">错误</a></li> | ||
| 131 | - <li><a href="#output" role="tab" data-toggle="tab" class="text">结果</a></li> | ||
| 132 | - </ul> | ||
| 133 | - <div class="pull-right func"> | ||
| 134 | - <a class="btn btn-success" id="compileBtn">编译运行</a> | ||
| 135 | - <a id="full-screen" class=""><i class="icon iconfont icon-quanping1"></i></a> | ||
| 136 | - <!-- <a id="back-screen" class=""><i class="icon iconfont icon-quanping1"></i></a> --> | ||
| 137 | - </div> | ||
| 138 | - </div> | ||
| 139 | - | ||
| 140 | - <!-- Tab panes --> | ||
| 141 | - <div id="resultoutput" class="tab-content need-compile"> | ||
| 142 | - <div class="tab-pane active padall15" id="stdin"> | ||
| 143 | - <input type="text" class="form-control" id="runtimeArgus" placeholder="标准输入"> | ||
| 144 | - </div> | ||
| 145 | - <div class="tab-pane padall15" id="cmpinfo"></div> | ||
| 146 | - <div class="tab-pane padall15" id="stderr"></div> | ||
| 147 | - <div class="tab-pane padall15" id="output"></div> | ||
| 148 | - </div> | ||
| 149 | - <div class="panel-body no-compile" id="ifrcontainer"> | ||
| 150 | - <iframe id="resultiframe" frameBorder="0" width="100%"></iframe> | ||
| 151 | - </div> | ||
| 152 | - </div> | ||
| 153 | - | ||
| 154 | - <div class="record-ctrl"> | ||
| 155 | - <button id="start-recording" class="btn new-recording" type="button" data="1" title="开始录制"> | ||
| 156 | - <i class="icon iconfont icon-luying"></i> | ||
| 157 | - </button> | ||
| 158 | - <button id="re-recoding" class="btn new-recording" type="button" data="1" title="重新录制"> | ||
| 159 | - <i class="icon iconfont icon-luzhi"></i> | ||
| 160 | - </button> | ||
| 161 | - <button class="btn audio-play" title="播放预览" data="1"> | ||
| 162 | - <i class="icon iconfont icon-bofang1"></i> | ||
| 163 | - </button> | ||
| 164 | - | ||
| 165 | - <div class="recording-time" id="timer" value="">00:00:00</div> | ||
| 166 | - | ||
| 167 | - </div> | ||
| 168 | - | ||
| 169 | - </div> | ||
| 170 | - | ||
| 171 | - </div> | ||
| 172 | - | ||
| 173 | - | ||
| 174 | -</body> | ||
| 175 | -</html> | ||
| 176 | \ No newline at end of file | 0 | \ No newline at end of file |
src/gxb-ide/java.js deleted
100644 → 0
| 1 | - | ||
| 2 | -$(function(){ | ||
| 3 | - var languageid = 10; | ||
| 4 | - var userId = 826920; | ||
| 5 | - var ide = new GxbIde({ | ||
| 6 | - el: '#folder', | ||
| 7 | - languageid: languageid | ||
| 8 | - }); | ||
| 9 | - | ||
| 10 | - $('.getValue').click(function(){ | ||
| 11 | - // var treeLinkEditor = Dir.treeLinkEditor; | ||
| 12 | - console.log(CodingEditer.records); | ||
| 13 | - CodingEditer.getCodeMirrorValue(); | ||
| 14 | - CodingEditer.playCoding(); | ||
| 15 | - }) | ||
| 16 | - | ||
| 17 | - $('#compileBtn').click(function(){ | ||
| 18 | - ToolBox.compileMode(userId, languageid); | ||
| 19 | - }) | ||
| 20 | - | ||
| 21 | -}) |
src/gxb-ide/play.svg deleted
100644 → 0
| 1 | -<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1489818235863" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1686" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M512.583314 9.142857c-277.736229 0-502.857143 225.1392-502.857143 502.857143 0 277.736229 225.120914 502.857143 502.857143 502.857143s502.857143-225.120914 502.857143-502.857143C1015.440457 234.282057 790.319543 9.142857 512.583314 9.142857L512.583314 9.142857zM512.583314 943.019886C274.9056 943.019886 81.563429 749.677714 81.563429 512c0-237.661257 193.342171-431.019886 431.019886-431.019886S943.6032 274.338743 943.6032 512C943.6032 749.677714 750.262857 943.019886 512.583314 943.019886L512.583314 943.019886z" p-id="1687" fill="#e6e6e6"></path><path d="M420.677486 743.149714c-2.770286 0-5.5424-0.6656-8.1024-1.963886-6.0672-3.051886-9.856-9.259886-9.856-15.994514L402.719086 314.671543c0-6.6816 3.717486-12.820114 9.645714-15.9232 5.893486-3.086629 13.083429-2.631314 18.554514 1.175771l287.3472 199.899429c4.770743 3.3152 7.647086 8.735086 7.7184 14.520686 0.069486 5.807543-2.666057 11.278629-7.332571 14.716343L431.305143 739.642514C428.149029 741.957486 424.429714 743.149714 420.677486 743.149714z" p-id="1688" fill="#e6e6e6"></path></svg> | ||
| 2 | \ No newline at end of file | 0 | \ No newline at end of file |
src/gxb-ide/re-record.svg deleted
100644 → 0
| 1 | -<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1489818646107" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3332" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M511.998444 0C240.420987 0 20.48 220.354294 20.48 492.30019 20.48 764.24609 240.419389 984.600379 511.998444 984.600379 783.514911 984.600379 1003.52 764.24609 1003.52 492.30019 1003.52 220.354294 783.514911 0 511.998444 0M511.998444 853.320851C332.759982 853.320851 186.875372 707.270439 186.875372 527.680156 186.875372 348.155646 332.76158 202.105233 511.998444 202.105233L511.998444 131.277963 681.605366 244.571529 511.998444 357.800886 511.998444 287.044088C379.54945 287.044088 271.679611 395.020947 271.679611 527.745929 271.679611 660.470911 379.547894 768.382001 511.998444 768.382001 644.45055 768.382001 752.320389 660.336234 752.320389 527.680156 752.320389 504.249074 771.259761 485.209162 794.655252 485.209162 818.119598 485.209162 837.060526 504.250638 837.060526 527.680156 837.124628 707.270439 691.240018 853.320851 511.998444 853.320851" p-id="3333" fill="#e6e6e6"></path></svg> | ||
| 2 | \ No newline at end of file | 0 | \ No newline at end of file |
src/gxb-ide/record.svg deleted
100644 → 0
| 1 | -<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1489817777577" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1517" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M512 0.347136C229.875712 0.347136 0.347136 229.870592 0.347136 512S229.875712 1023.652864 512 1023.652864 1023.652864 794.129408 1023.652864 512 794.124288 0.347136 512 0.347136zM512 1004.345344C240.519168 1004.345344 19.654656 783.475712 19.654656 512S240.519168 19.654656 512 19.654656 1004.345344 240.524288 1004.345344 512 783.480832 1004.345344 512 1004.345344zM506.389504 635.112448l5.518336 0c74.887168 0 135.824384-60.937216 135.824384-135.824384l0-152.36096c0-74.887168-60.937216-135.824384-135.824384-135.824384l-5.518336 0c-74.887168 0-135.824384 60.918784-135.824384 135.824384l0 152.36096C370.56512 574.176256 431.501312 635.112448 506.389504 635.112448zM512 48.64C256.093184 48.64 48.64 256.093184 48.64 512S256.093184 975.36 512 975.36 975.36 767.906816 975.36 512 767.906816 48.64 512 48.64zM343.246848 346.908672c0-89.94816 73.194496-163.142656 163.142656-163.142656l5.518336 0c89.94816 0 163.142656 73.176064 163.142656 163.142656l0 152.361984c0 89.94816-73.194496 163.142656-163.142656 163.142656l-5.518336 0c-89.966592 0-163.142656-73.176064-163.142656-163.14368L343.246848 346.908672zM737.972224 491.165696c0 121.565184-95.357952 221.02016-215.175168 228.141056l0 92.772352 115.465216 0c7.539712 0 13.659136 6.119424 13.659136 13.659136s-6.119424 13.659136-13.659136 13.659136L379.998208 839.397376c-7.539712 0-13.659136-6.119424-13.659136-13.659136 0-7.539712 6.119424-13.659136 13.659136-13.659136l115.4816 0 0-92.772352c-119.817216-7.119872-215.175168-106.575872-215.175168-228.141056l0-57.239552c0-7.539712 6.119424-13.659136 13.659136-13.659136 7.539712 0 13.659136 6.119424 13.659136 13.659136l0 57.240576c0 111.112192 90.386432 201.516032 201.516032 201.516032 111.112192 0 201.516032-90.40384 201.516032-201.516032l0-54.945792c0-7.539712 6.119424-13.659136 13.659136-13.659136s13.659136 6.119424 13.659136 13.658112L737.973248 491.165696z" fill="#f8fbf9" p-id="1518"></path></svg> | ||
| 2 | \ No newline at end of file | 0 | \ No newline at end of file |
src/gxb-ide/test.js deleted
100644 → 0
src/gxb-ide/toolbox.html deleted
100644 → 0
| 1 | -<!DOCTYPE html> | ||
| 2 | -<html lang="en"> | ||
| 3 | -<head> | ||
| 4 | - <meta charset="UTF-8"> | ||
| 5 | - <title>Document</title> | ||
| 6 | - <link rel="stylesheet" href="toolBox.css"> | ||
| 7 | - <script src="../js/jquery-1.7.1.js"></script> | ||
| 8 | - <script src="Dir.js"></script> | ||
| 9 | - <script src="CodingEditer.js"></script> | ||
| 10 | - <script src="ToolBox.js"></script> | ||
| 11 | -<script> | ||
| 12 | - $(function(){ | ||
| 13 | - var techTool = new ToolBox(); | ||
| 14 | - | ||
| 15 | - console.log(techTool) | ||
| 16 | - console.log(techTool.startRecording()) | ||
| 17 | - | ||
| 18 | - $('#text').click(function(){ | ||
| 19 | - console.log('opopop') | ||
| 20 | - techTool.startRecording() | ||
| 21 | - }) | ||
| 22 | - }) | ||
| 23 | -</script> | ||
| 24 | -</head> | ||
| 25 | -<body> | ||
| 26 | - <div id="toolBox"> | ||
| 27 | - </div> | ||
| 28 | - <p id="text">dskjfhkks</p> | ||
| 29 | -</body> | ||
| 30 | -</html> | ||
| 31 | \ No newline at end of file | 0 | \ No newline at end of file |
src/gxb-ide/web.js renamed to src/gxb-ide/util.js
src/gxb-ide/web.html deleted
100644 → 0
| 1 | -<!DOCTYPE html> | ||
| 2 | -<html lang="en"> | ||
| 3 | -<head> | ||
| 4 | - <meta charset="UTF-8"> | ||
| 5 | - <title>Document</title> | ||
| 6 | - <script src="../js/handlebars-v4.0.5.js"></script> | ||
| 7 | - <script src="../js/jquery-1.7.1.js"></script> | ||
| 8 | - | ||
| 9 | -<script> | ||
| 10 | - var id = 10; | ||
| 11 | - if (id === 10) { | ||
| 12 | - $.getScript("test.js"); //加载js文件 | ||
| 13 | - } | ||
| 14 | - | ||
| 15 | -</script> | ||
| 16 | -</head> | ||
| 17 | -<body> | ||
| 18 | - | ||
| 19 | - <div id="entry"> | ||
| 20 | - | ||
| 21 | - </div> | ||
| 22 | - | ||
| 23 | -<script> | ||
| 24 | - $(function(){ | ||
| 25 | - var source = $("#entry-template").html(); | ||
| 26 | - var template = Handlebars.compile(source); | ||
| 27 | - var html = template(); | ||
| 28 | - | ||
| 29 | - $('#entry').html(html); | ||
| 30 | - | ||
| 31 | - }) | ||
| 32 | - | ||
| 33 | -</script> | ||
| 34 | - | ||
| 35 | -<script id="entry-template" type="text/x-handlebars-template"> | ||
| 36 | - <div class="entry"> | ||
| 37 | - <h1>Hello</h1> | ||
| 38 | - <div class="body"> | ||
| 39 | - dksjflka | ||
| 40 | - </div> | ||
| 41 | - </div> | ||
| 42 | -</script> | ||
| 43 | - | ||
| 44 | -</body> | ||
| 45 | -</html> | ||
| 46 | \ No newline at end of file | 0 | \ No newline at end of file |
src/js/c.js
| @@ -26,6 +26,7 @@ $(function(){ | @@ -26,6 +26,7 @@ $(function(){ | ||
| 26 | // ToolBox.compileMode(userId, languageid); | 26 | // ToolBox.compileMode(userId, languageid); |
| 27 | // }) | 27 | // }) |
| 28 | 28 | ||
| 29 | + // 录制代码 | ||
| 29 | 30 | ||
| 30 | // 播放代码 | 31 | // 播放代码 |
| 31 | $('.audio-play').click(function() { | 32 | $('.audio-play').click(function() { |
src/v1.1/c.html
| @@ -47,10 +47,7 @@ | @@ -47,10 +47,7 @@ | ||
| 47 | var _languageid = getQuery('languageid'); | 47 | var _languageid = getQuery('languageid'); |
| 48 | var _userId = getQuery('userId'); | 48 | var _userId = getQuery('userId'); |
| 49 | 49 | ||
| 50 | - console.log('--------------------') | ||
| 51 | - console.log(_languageid) | ||
| 52 | - console.log(_userId) | ||
| 53 | - | 50 | + |
| 54 | var techTool = new ToolBox({ | 51 | var techTool = new ToolBox({ |
| 55 | el: '#toolBox', | 52 | el: '#toolBox', |
| 56 | startCallback: function(){ | 53 | startCallback: function(){ |
| @@ -63,10 +60,7 @@ | @@ -63,10 +60,7 @@ | ||
| 63 | languageId: _languageid | 60 | languageId: _languageid |
| 64 | }); | 61 | }); |
| 65 | 62 | ||
| 66 | - console.log(techTool) | ||
| 67 | - | ||
| 68 | - $('#text').click(function(){ | ||
| 69 | - }) | 63 | + |
| 70 | }) | 64 | }) |
| 71 | </script> | 65 | </script> |
| 72 | 66 |