39 lines
1.9 KiB
Plaintext
39 lines
1.9 KiB
Plaintext
<div class="task-popup-title clearfix task-popup-bggrey" style="width: 500px">
|
|
<h3 class="fl ">问题报告</h3>
|
|
<a href="javascript:void(0)" onclick="hideModal();"><i class="fa fa-times-circle font-18 link-color-grey fr mt5"></i></a>
|
|
</div>
|
|
<div class="task-popup-content">
|
|
<p class="font-16">这个任务有什么问题或错误?</p>
|
|
<p class="font-12 color-grey">请尽可能清晰的描述</p>
|
|
<textarea class="task-form-100 panel-box-sizing mt10" placeholder="限100字以内" id="error_contents"></textarea>
|
|
<p class="color-red undis" id="error_tip">问题内容不能为空</p>
|
|
</div>
|
|
<div class=" clearfix mb20 mr15">
|
|
<a href="javascript:void(0);" onclick="hideModal();" class="task-btn fr">取消</a>
|
|
<a href="javascript:void(0);" onclick="problem_report('<%= User.current.id %>');" class="task-btn task-btn-orange fr mr10">确定</a>
|
|
</div>
|
|
<script>
|
|
// 给导师和管理员发送error
|
|
function problem_report(user){
|
|
var contents = $("#error_contents").val().trim();
|
|
if(contents == "" || contents == undefined || contents == null){
|
|
$("#error_tip").show();
|
|
return;
|
|
}
|
|
$.ajax({
|
|
url: '<%= leave_email_activation_message_path(1) %>',
|
|
data: {user: user, text: $("#error_contents").val(), game_id: '<%= @game.id %>', shixun_name:'<%= @myshixun.name %>', shixun_author_id:'<%= @game_challenge.user_id %>', position:'<%= @game_challenge.position %>'},
|
|
type: "POST",
|
|
success: function (data) {
|
|
hideModal();
|
|
var htmlvalue = "<%= j (render :partial => 'games/send_success_pop') %>";
|
|
pop_box_new(htmlvalue,460,300);
|
|
$("#error_contents").val("");
|
|
}
|
|
});
|
|
}
|
|
|
|
$("#error_contents").live("focus", function(){
|
|
$("#error_tip").hide();
|
|
})
|
|
</script> |