路径的获取
This commit is contained in:
parent
87401900d3
commit
0760e7d9e0
|
|
@ -18,8 +18,8 @@
|
|||
<div id="shixun_form">
|
||||
<li class="clearfix">
|
||||
<label class="panel-form-label fl"><span class="c_red mr5">*</span>文件路径:</label>
|
||||
<%#= f.text_field :path, :class => "panel-form-width-690 panel-box-sizing fl", :no_label => true, :placeholder => "进入实训后将默认打开该文件,如:src/test/welcome.java", :maxlength => "256" %>
|
||||
<input id="shixun_file_path" class="panel-form-width-690 panel-box-sizing fl">
|
||||
<%= f.text_field :path, :class => "panel-form-width-690 panel-box-sizing fl", :id => "shixun_file_path", :no_label => true, :placeholder => "进入实训后将默认打开该文件,如:src/test/welcome.java", :maxlength => "256" %>
|
||||
<!--<input id="shixun_file_path" class="panel-form-width-690 panel-box-sizing fl">-->
|
||||
<span style="display: none" class="c_red ml95" id="challenge_file_path">文件路径不能为空</span>
|
||||
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -24,8 +24,24 @@
|
|||
<% end %>
|
||||
</ul>
|
||||
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-blue fr" style="margin-top: 20px;margin-left:20px;">确定</a>
|
||||
<a href="javascript:void(0);" class="pop_close task-btn mb10 fr" style="margin-top: 20px;">取消</a>
|
||||
<a href="javascript:void(0);" class="task-btn task-btn-blue fr" style="margin-top: 20px;margin-left:20px;" id = "add_path">确定</a>
|
||||
<a href="javascript:void(0);" class="pop_close task-btn mb10 fr" style="margin-top: 20px;" id = "back_page">取消</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
var $Path = '';
|
||||
$(".old-icon-file").click(function(){
|
||||
$Path = $(this).html();
|
||||
return $Path;
|
||||
});
|
||||
$("#add_path").click(function(){
|
||||
$("#shixun_file_path").val($Path);
|
||||
$("#popupWrap").hide();
|
||||
});
|
||||
$("#back_page").click(function(){
|
||||
$("#popupWrap").hide();
|
||||
})
|
||||
</script>
|
||||
Loading…
Reference in New Issue