48 lines
1.6 KiB
Plaintext
48 lines
1.6 KiB
Plaintext
<div id="training_project_exec_tip">
|
|
<%= render :partial => "projects/settings/training_project_exec_tip" %>
|
|
</div>
|
|
|
|
<div class=" sy_new_tchbox clear ">
|
|
<div id="training_project_filter_tip">
|
|
<%= render :partial => "projects/settings/training_projects_filter_tip" %>
|
|
</div>
|
|
<div id="training_project_filter_tip">
|
|
|
|
</div>
|
|
<div class="cl"></div>
|
|
<div class="clear">
|
|
<%= form_tag(url_for(:controller => 'projects', :action => 'add_script', :project_id => @project.id), :id => 'project_script_form', :method => "post", :remote => true) do %>
|
|
<textarea id="project_script" name="project_script" style="width:746px; height:300px;border: 1px solid #c8c8c8; padding:5px;margin-bottom: 5px;" placeholder="请输入脚本"><%= @project.script %></textarea>
|
|
<span id ="project_script_tip" class="c_red" style="display: none">内容不能为空</span>
|
|
<a href="javascript:void(0)" class="fr btn btn-grey">取消</a>
|
|
<a href="javascript:void(0)" class="fr btn btn-blue mr5" onclick="project_script_commit()">确定</a>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
function regex_pr_comment()
|
|
{
|
|
var comment = $.trim($("#project_script").val());
|
|
if(comment.length == 0)
|
|
{
|
|
$("#project_script_tip").show();
|
|
return false;
|
|
}
|
|
else
|
|
{
|
|
$("#project_script_tip").hide();
|
|
return true;
|
|
}
|
|
}
|
|
|
|
//提交pull request_comment
|
|
function project_script_commit()
|
|
{
|
|
if(regex_pr_comment())
|
|
{
|
|
$("#project_script_form").submit();
|
|
}
|
|
}
|
|
</script>
|