Merge branch 'dev_shixun_project' of https://git.trustie.net/jacknudt/trustieforge into dev_shixun_project
This commit is contained in:
commit
4bb810f47a
|
@ -33,7 +33,7 @@
|
|||
</li>
|
||||
<li class="clearfix">
|
||||
<label class="panel-form-label fl">文件路径:</label>
|
||||
<%= f.text_field :path, :class => "panel-form-width-690 panel-form-height-30 fl", :no_label => true, :placeholder => "进入实训后将默认打开该文件,如:app/controllers/welcome_controller.rb" %>
|
||||
<%= f.text_field :path, :class => "panel-form-width-690 panel-form-height-30 fl", :no_label => true, :placeholder => "进入实训后将默认打开该文件,如:app/controllers/welcome_controller.rb", :maxlength => "256" %>
|
||||
</li>
|
||||
<li class="clearfix">
|
||||
<label class="panel-form-label fl">预备知识:</label>
|
||||
|
@ -270,17 +270,21 @@
|
|||
$('#edit_challenge_<%= @challenge.id %>').submit();
|
||||
}
|
||||
}
|
||||
challenge_answer_editor = KindEditor.create('#challenge_answer',
|
||||
{"width":"87.5%",
|
||||
"resizeType":0,
|
||||
"no_label":true,
|
||||
"autoHeightMode":true,
|
||||
"height":200,
|
||||
"allowFileManager":true,
|
||||
afterBlur:function () { this.sync(); },
|
||||
"uploadJson":"/kindeditor/upload",
|
||||
"fileManagerJson":"/kindeditor/filemanager"
|
||||
|
||||
var editor = CodeMirror.fromTextArea(document.getElementById("challenge_answer"), {
|
||||
mode: {name: 'text/x-java',
|
||||
version: 2,
|
||||
singleLineStringErrors: false},
|
||||
lineNumbers: true,
|
||||
indentUnit: 2,
|
||||
matchBrackets: true
|
||||
});
|
||||
|
||||
editor.on('change',function(cMirror){
|
||||
// get value right from instance
|
||||
$('#challenge_answer').val(cMirror.getValue());
|
||||
});
|
||||
|
||||
challenge_task_pass_editor = KindEditor.create('#challenge_task_pass',
|
||||
{"width":"87.5%",
|
||||
"resizeType":0,
|
||||
|
@ -292,23 +296,6 @@
|
|||
"uploadJson":"/kindeditor/upload",
|
||||
"fileManagerJson":"/kindeditor/filemanager"
|
||||
});
|
||||
challenge_task_editor = KindEditor.create('#challenge_ready_knowledge',
|
||||
{"width":"87.5%",
|
||||
"resizeType":0,
|
||||
"no_label":true,
|
||||
"autoHeightMode":true,
|
||||
"height":200,
|
||||
"allowFileManager":true,
|
||||
afterBlur:function () { this.sync(); },
|
||||
"uploadJson":"/kindeditor/upload",
|
||||
"fileManagerJson":"/kindeditor/filemanager"
|
||||
});
|
||||
|
||||
|
||||
editor.on('change',function(cMirror){
|
||||
// get value right from instance
|
||||
$('#challenge-answer').val(cMirror.getValue());
|
||||
});
|
||||
|
||||
|
||||
function add_tag(){
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
</li>
|
||||
<li class="clearfix">
|
||||
<label class="panel-form-label fl"><span class="c_red mr5">*</span>过关任务:</label>
|
||||
<div class="fl task-bg-grey">
|
||||
<div class="fl task-bg-grey" id="challenge_task_pass">
|
||||
<%= h @challenge.task_pass.html_safe %>
|
||||
</div>
|
||||
</li>
|
||||
|
@ -96,5 +96,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
$('#challenge_task_pass').find('img').css("max-width", "680px")
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue