Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop

This commit is contained in:
cxt 2017-03-31 15:10:45 +08:00
commit e7f2461ca6
9 changed files with 31 additions and 14 deletions

View File

@ -57,6 +57,13 @@ class SyllabusesController < ApplicationController
end
def delete_syllabus
if @syllabus.courses.empty?
@status = 1
elsif @syllabus.courses.not_deleted.empty?
@status = 2
else
@status = 3
end
respond_to do |format|
format.js
end

View File

@ -59,13 +59,18 @@
if($mail_correct == false){
return
}else{
// 改变邮箱地址
$.get('<%= account_change_email_path(:user_id => @user.id) %>',
{ valid: "mail",
value: document.getElementById("user_mail").value },
function (data){
$("#user_email_show").html(data.email);
hideModal();
return;
$("#user_email_show").html(data.email);
// 更改邮箱地址后,直接给用户发送邮件
$.ajax({
url: "<%= resendmail_path(:user => @user) %>"
});
hideModal();
return;
});
}
}

View File

@ -18,8 +18,8 @@
<li>请注意查看邮箱中的“订阅邮件”、“垃圾邮件”可能Trustie的邮件被误杀了</li>
<li>请点击重新发送激活邮件按钮</li>
<li>如果重发注册验证邮箱邮件仍然没有收到,请<a href="javascript:void(0);" class="link-blue" id="change_email">更换邮箱地址</a>,重新发送激活邮件</li>
<li>如果您始终无法收到激活邮件,请直接给我们留言:</li>
<div class="mt10">
<li>如果您始终无法收到激活邮件,请直接给我们<a href="javascript:void(0);" class="link-blue" id="leave_message">留言</a></li>
<div class="mt10 undis" id="message_box">
<textarea style="resize: none;width: 570px;" class="email_prompt_mes" placeholder="<%= l(:label_email_feedback_tips) %>"></textarea>
<div class="c1"></div>
<button class="email_sub_btn fr" onclick="leave_email_activation_message('<%= leave_email_activation_message_path(1)%>','<%= @user.id %>');">确定</button>
@ -36,6 +36,9 @@
url: "<%= change_user_email_user_path(@user) %>"
});
});
$("#leave_message").click(function(){
$("#message_box").toggle();
})
});

View File

@ -19,7 +19,7 @@
<p class="sy_tab_con_p" style="margin-bottom: 0px; padding-bottom: 100px;">尚未发布竞赛说明,敬请期待~</p>
<% else %>
<div class="description_div">
<div class="syllabuscon upload_img ke-block break_word" id="syllabus_description_<%= @contest.id %>">
<div class="syllabuscon upload_img ke-block break_word break_full_word" id="syllabus_description_<%= @contest.id %>">
<%= @contest.description.html_safe %>
</div>
<div class="mt10" style="font-weight:normal; font-size: 12px;">

View File

@ -52,7 +52,7 @@
</div>
<% if test.status.to_i == -2 %>
<div class="ProResultCon ">
<%= test.results.first %>
<%= test.results.first.to_s.force_encoding("UTF-8") %>
</div>
<% else %>
<div class="ProResultTable">

View File

@ -6,15 +6,17 @@
</div>
<div style='text-align:center;font-family: "微软雅黑","宋体"' class="mt20 f14">
<% if @syllabus.courses.not_deleted.empty? %>
<% if @status == 1 %>
确认删除该课程吗?
<% elsif @status == 2 %>
该课程下存在归档班级,不能删除。
<% else %>
该课程下已经存在班级,不能删除。
<% end %>
</div>
<div style='width:164px; margin:0 auto; margin-top: 15px; text-align:center; font-family: "微软雅黑","宋体"'>
<% if @syllabus.courses.not_deleted.empty? %>
<% if @status == 1 %>
<a href='javascript:void(0);' class='sy_btn_grey fl mr5' style="margin-left: 25px;" onclick='hideModal()'>取消</a>
<%=link_to '确认', syllabus_path(@syllabus), :class => 'sy_btn_blue fl', :method => 'delete'%>
<% else %>

View File

@ -8,13 +8,13 @@
<span style="font-size:14px;">已处理</span>
<% elsif ma.status == 4 %>
<% operator_message = AppliedMessage.where("applied_id=? and user_id=? and status = 4", ma.applied_id, ma.user_id).first %>
<% operator = User.find(operator_message.applied_user_id).show_name %>
<% operator = User.find(operator_message.applied_user_id).try(:show_name) %>
<span style="font-size:14px" title="<%= operator %>已拒绝">
<%= operator %>已拒绝
</span>
<% elsif ma.status == 5 %>
<% elsif ma.status == 5 && !AppliedMessage.where("applied_id=? and user_id=? and status = 4", ma.applied_id, ma.applied_user_id).first.nil? %>
<% operator_message = AppliedMessage.where("applied_id=? and user_id=? and status = 4", ma.applied_id, ma.applied_user_id).first %>
<% operator = User.find(operator_message.applied_user_id).show_name %>
<% operator = User.find(operator_message.applied_user_id).try(:show_name) %>
<span style="font-size:14px" title="<%= operator %>已拒绝">
<%= operator %>已拒绝
</span>

View File

@ -147,7 +147,7 @@
<div class="cl"></div>
</div>
<% if test.status.to_i == -2 %>
<div class="ProResultCon"><pre><%= test.results.first %></pre></div>
<div class="ProResultCon"><pre><%= test.results.first.to_s.force_encoding("UTF-8") %></pre></div>
<% else %>
<div class="ProResultTable " >
<ul class="ProResultUl " >

View File

@ -6079,7 +6079,7 @@ _plugin('core', function(K) {
// if (imglist.length > 0){
// df(self);
// }
self.insertHtml(html, true);
self.insertHtml(html, true); // 火狐浏览器复制图片会出现2个
df(self);
}
K(doc.body).bind('paste', function(e){