Commit 6c32d532382fcb84db36d5ae9f12b4643777ecfb
1 parent
30b01359
dist
Showing
3 changed files
with
69 additions
and
7 deletions
dist/css/ide.css
| ... | ... | @@ -467,3 +467,28 @@ html, body { |
| 467 | 467 | |
| 468 | 468 | #stderr, #cmpinfo, #output { |
| 469 | 469 | padding: 12px 36px; } |
| 470 | + | |
| 471 | + | |
| 472 | +.nav-tabs>li:last-child{ | |
| 473 | + position: absolute; | |
| 474 | + right: 20px | |
| 475 | + } | |
| 476 | + #quickTool{ | |
| 477 | + display: none; | |
| 478 | + | |
| 479 | + } | |
| 480 | + #quickTool button{ | |
| 481 | + background: transparent; | |
| 482 | + color: #FFF; | |
| 483 | + border: 1px solid #fff; | |
| 484 | + border-radius: 24px; | |
| 485 | + } | |
| 486 | + .dropdown-menu{ | |
| 487 | + border-radius: 10px; | |
| 488 | + } | |
| 489 | + .dropdown-menu>li>a{ | |
| 490 | + color: #1FB6FF; | |
| 491 | + } | |
| 492 | + .dropdown-menu>li>a:hover{ | |
| 493 | + background-color: #62DCF5; | |
| 494 | + } | ... | ... |
dist/js/c.js
| ... | ... | @@ -2,13 +2,14 @@ |
| 2 | 2 | |
| 3 | 3 | |
| 4 | 4 | $(function(){ |
| 5 | - var _languageid = getQuery('languageid'); | |
| 5 | + var _languageid = getQuery('languageid'); //返回URL中的查询部分 | |
| 6 | 6 | var _userId = getQuery('userId'); |
| 7 | 7 | var _role = getQuery('role'); |
| 8 | 8 | var flag = true; |
| 9 | 9 | |
| 10 | 10 | if(_languageid == 35){ |
| 11 | 11 | $('.switch').show(); |
| 12 | + $('#quickTool').show(); | |
| 12 | 13 | $("#CompileBtn .ladda-label").html("自动运行") |
| 13 | 14 | }else{ |
| 14 | 15 | $("#CompileBtn .ladda-label").html("编译运行") |
| ... | ... | @@ -32,6 +33,7 @@ $(function(){ |
| 32 | 33 | CodingEditer.isHanld = 1 |
| 33 | 34 | } |
| 34 | 35 | }) |
| 36 | + | |
| 35 | 37 | |
| 36 | 38 | // new一个老师录制的控制条工具 |
| 37 | 39 | var techTool = new ToolBox({ |
| ... | ... | @@ -76,6 +78,25 @@ $(function(){ |
| 76 | 78 | $('#studentCompileBtn').show(); |
| 77 | 79 | } |
| 78 | 80 | |
| 81 | + $('.dropdown-menu').on('click', function(e) { | |
| 82 | + var $target = $(e.target); | |
| 83 | + $target.is('li') && $('#text').text($target.text()); | |
| 84 | + | |
| 85 | + var selectVal = $target.text(); | |
| 86 | + | |
| 87 | + if (selectVal == '图片') { | |
| 88 | + Dir.treeLinkEditor[0].CodeMirrorRecord.replaceSelection('<img src="//www.igeekbar.com/igeekbar/laitu/300x200&text=hello world/222222/ffffff" alt="占位图片">', "end") | |
| 89 | + }else if (selectVal == 'bootstrap.css') { | |
| 90 | + Dir.treeLinkEditor[0].CodeMirrorRecord.replaceSelection('<link href="//cdn.gbtags.com/bootswatch/3.2.0+1/custom/bootstrap.min.css" rel="stylesheet">', "end") | |
| 91 | + }else if(selectVal == 'bootstrap.js'){ | |
| 92 | + Dir.treeLinkEditor[0].CodeMirrorRecord.replaceSelection('<script src="//cdn.gbtags.com/twitter-bootstrap/3.2.0/js/bootstrap.min.js"></script>', "end") | |
| 93 | + }else if (selectVal == 'jQuery') { | |
| 94 | + Dir.treeLinkEditor[0].CodeMirrorRecord.replaceSelection('<script src="//cdn.gbtags.com/jquery/2.1.1/jquery.min.js"></script>', "end") | |
| 95 | + } | |
| 96 | + | |
| 97 | + }) | |
| 98 | + | |
| 99 | + | |
| 79 | 100 | |
| 80 | 101 | // 插入标准输入 |
| 81 | 102 | $(document).on('focus', '#runtimeArgus', function(){ | ... | ... |
dist/v1.1/index.html
| ... | ... | @@ -48,6 +48,8 @@ |
| 48 | 48 | vertical-align: middle; |
| 49 | 49 | padding-right: 2px; |
| 50 | 50 | } |
| 51 | + | |
| 52 | + | |
| 51 | 53 | </style> |
| 52 | 54 | |
| 53 | 55 | |
| ... | ... | @@ -65,9 +67,22 @@ |
| 65 | 67 | <li> |
| 66 | 68 | <a href="#replayzone" data-toggle="tab"> |
| 67 | 69 | <i class="icon iconfont icon-bofang2"></i>课程预览区 |
| 68 | - </a> | |
| 70 | + </a> | |
| 71 | + </li> | |
| 72 | + <li> | |
| 73 | + <div class="btn-group" id="quickTool"> | |
| 74 | + <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
| 75 | + <span id="text">快速引入文件</span> | |
| 76 | + <span class="caret"></span> | |
| 77 | + </button> | |
| 78 | + <ul class="dropdown-menu"> | |
| 79 | + <li><a href="#">图片</a></li> | |
| 80 | + <li><a href="#">bootstrap.css</a></li> | |
| 81 | + <li><a href="#">bootstrap.js</a></li> | |
| 82 | + <li><a href="#">jQuery</a></li> | |
| 83 | + </ul> | |
| 84 | + </div> | |
| 69 | 85 | </li> |
| 70 | - </ul> | |
| 71 | 86 | </div> |
| 72 | 87 | |
| 73 | 88 | <!-- 录制区 --> |
| ... | ... | @@ -86,7 +101,7 @@ |
| 86 | 101 | </div> |
| 87 | 102 | |
| 88 | 103 | <!-- 运行结果区 --> |
| 89 | - <div class="console-wrap"> | |
| 104 | + <div class="console-wrap" id="console-wrap"> | |
| 90 | 105 | <div class="CodeMirror-gutter"> |
| 91 | 106 | </div> |
| 92 | 107 | <div id="toolbar"> |
| ... | ... | @@ -97,7 +112,7 @@ |
| 97 | 112 | <li><a href="#stderr" role="tab" data-toggle="tab" class="text">错误</a></li> |
| 98 | 113 | <li><a href="#output" role="tab" data-toggle="tab" class="text">结果</a></li> |
| 99 | 114 | </ul> |
| 100 | - <div class="pull-right func"> | |
| 115 | + <div class="pull-right func"> | |
| 101 | 116 | <button class="btn switch"> |
| 102 | 117 | <img src="../img/switch.png" alt=""> |
| 103 | 118 | </button> |
| ... | ... | @@ -127,8 +142,8 @@ |
| 127 | 142 | <div class="tab-pane padall15" id="stderr"></div> |
| 128 | 143 | <div class="tab-pane padall15" id="output"></div> |
| 129 | 144 | </div> |
| 130 | - <div class="panel-body no-compile" id="ifrcontainer"> | |
| 131 | - <iframe id="resultiframe" frameBorder="0" width="100%"></iframe> | |
| 145 | + <div class="panel-body no-compile" id="ifrcontainer" > | |
| 146 | + <iframe id="resultiframe" frameBorder="0" width="100%" allowfullscreen></iframe> | |
| 132 | 147 | </div> |
| 133 | 148 | </div> |
| 134 | 149 | </div> |
| ... | ... | @@ -192,6 +207,7 @@ |
| 192 | 207 | <div class="tip-header"> |
| 193 | 208 | <span>提示</span> |
| 194 | 209 | </div> |
| 210 | + | |
| 195 | 211 | <div class="tip-content"> |
| 196 | 212 | <p>在开始录制之前可对文件名进行修改,开始录制后文件名将不可修改。</p> |
| 197 | 213 | </div> | ... | ... |