Merge branch 'develop' into szzh
This commit is contained in:
commit
4044cc6674
|
@ -1035,11 +1035,12 @@ class BidsController < ApplicationController
|
|||
def alert_anonymous_comment
|
||||
@bid = Bid.find params[:id]
|
||||
@course = @bid.courses.first
|
||||
@cur_size = 0
|
||||
@totle_size = 0
|
||||
if @bid.comment_status == 0
|
||||
@totle_size = searchStudent(@course).size
|
||||
@cur_size = @bid.homeworks.size
|
||||
elsif @bid.comment_status == 1
|
||||
@totle_size = 0
|
||||
@bid.homeworks.map { |homework| @totle_size += homework.homework_evaluations.count}
|
||||
@cur_size = 0
|
||||
@bid.homeworks.map { |homework| @cur_size += homework.rates(:quality).where("seems_rateable_rates.is_teacher_score = 0").count}
|
||||
|
|
|
@ -189,16 +189,7 @@ class MessagesController < ApplicationController
|
|||
|
||||
@content = "> #{ll(Setting.default_language, :text_user_wrote, @message.author)}\n> "
|
||||
@temp = Message.new
|
||||
#@temp.content = "> #{ll(Setting.default_language, :text_user_wrote, @message.author)}> "
|
||||
@content << @message.content.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n"
|
||||
@content_html = textilizable(@content)
|
||||
@temp.content = @content_html
|
||||
#@content = "#{ll(Setting.default_language, :text_user_wrote, @message.author)} <br/> "
|
||||
#@content << @message.content.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n") + "</blockquote>\n\n<br/>"
|
||||
#@content = "<blockquote>" << @content
|
||||
#@temp = Message.new
|
||||
#@temp.content = @content
|
||||
|
||||
@temp.content = "<blockquote>#{@message.content.html_safe}</blockquote>".html_safe
|
||||
end
|
||||
|
||||
def preview
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//ckeditor.setData("<%= raw escape_javascript(@content) %>");
|
||||
$('#message_quote').html("<%= raw escape_javascript(@temp.content) %>");
|
||||
$('#message_quote').html("<%= raw escape_javascript(@temp.content.html_safe) %>");
|
||||
$('#quote').val("<%= raw escape_javascript(@content) %>");
|
||||
showAndScrollTo("new_memo", "cke_editor01");
|
|
@ -1,5 +1,5 @@
|
|||
$('#message_subject').val("<%= raw escape_javascript(@subject) %>");
|
||||
$('#message_quote').html("<%= raw escape_javascript(@temp.content) %>");
|
||||
$('#message_quote').html("<%= raw escape_javascript(@temp.content.html_safe) %>");
|
||||
//$('#message_content').val("<#%= raw escape_javascript(@content) %>");
|
||||
$('#quote_quote').html("<%= raw escape_javascript(@content) %>");
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<input type="text" name="news[title]" class="hwork_input" id="news_title" size="60" onkeyup="regexTitle();" maxlength="60" placeholder="60个字符以内" value="<%= is_new ? '' : @news.title %>">
|
||||
<p id="title_notice_span" class="ml55"></p>
|
||||
</li>
|
||||
<li class="ml45">
|
||||
<li class="ml45 mb10">
|
||||
<% if is_new %>
|
||||
<%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %>
|
||||
<label class="fl" ><span class="c_red">*</span> <%= l(:field_description) %> :</label>
|
||||
|
|
|
@ -101,10 +101,9 @@
|
|||
<%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %>
|
||||
<%= kindeditor_tag :comment, '',:height=>'100',:editor_id =>'comment_editor', :placeholder=>"最多250个字"%>
|
||||
</div>
|
||||
<p>
|
||||
<p class="mt10">
|
||||
<a href="#" class="grey_btn fr ml10" onclick="clearMessage();"><%= l(:label_cancel_with_space) %></a>
|
||||
<a href="#" class="blue_btn fr" onclick="submitComment();"><%= l(:label_comment_with_space) %></a>
|
||||
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
@ -200,9 +200,8 @@ function regexDescription()
|
|||
}
|
||||
}
|
||||
|
||||
function submitNews(is_new)
|
||||
function submitNews()
|
||||
{
|
||||
alert(is_new)
|
||||
if(regexTitle() && regexDescription())
|
||||
{
|
||||
news_description_editor.sync();
|
||||
|
|
|
@ -175,7 +175,7 @@ a:hover.work_edit{color: #fff; background: #64bdd9;}
|
|||
.wzan a{ display: block;}
|
||||
a.wzan_img{background:url(images/pic_zan.png) 0 -59px no-repeat; display:block; height:31px; width:30px; color:#fff;}
|
||||
a.wzan_visited{background:url(images/pic_zan.png) 0 0 no-repeat;}
|
||||
.msg_box{ width:670px; height:173px; border-bottom:1px dashed #CCC; padding-top:10px;}
|
||||
.msg_box{ width:670px; height:200px; border-bottom:1px dashed #CCC; padding-top:10px;}
|
||||
.msg_box h4{ }
|
||||
.msg_box textarea{width:658px;height:90px;padding:5px;overflow:hidden;background-color: #ffffff; border:1px solid #CCC; margin:5px 0px; color:#666; font-size:12px; }
|
||||
/*.msg_box a{ float:right; display:block; width:50px; height:22px; background:#15bccf; padding-top:3px; color:#fff; margin-left:10px; text-align:center; margin-top:5px; }*/
|
||||
|
|
Loading…
Reference in New Issue