parent
f395967ac9
commit
af59cd9ba7
|
@ -74,6 +74,7 @@ class JournalsController < ApplicationController
|
|||
text = text.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]')
|
||||
@content = "> #{ll(Setting.default_language, :text_user_wrote, user)}\n> "
|
||||
@content << text.gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n"
|
||||
@content = "<blockquote style='word-break: break-all;word-wrap: break-word;'>" << @content
|
||||
@id = user.id
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
render_404
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
<%= render :partial => 'history', :locals => {:issue => @issue, :journals => @journals} %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div id="journal_issue_note" class="wiki"></div>
|
||||
<input name="issue_quote_new" type="hidden" value="<%= %>" />
|
||||
<fieldset><legend>回复</legend>
|
||||
<%= f.text_area :notes, :style => "width:99%;", :rows => "5", :no_label => true %>
|
||||
</fieldset>
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
<!-- modified by bai -->
|
||||
<div id="change-<%= journal.id %>" class="<%= journal.css_classes %>" style=" word-wrap: break-word; word-break: break-all">
|
||||
<!-- end -->
|
||||
<div class="ping_C mb10 ml10">
|
||||
<div class="ping_C mb10">
|
||||
<div class="ping_dispic"><a href="#" target="_blank"><%= image_tag(url_to_avatar(journal.user), :class => "ping_dispic",:width => 46,:height => 46) %></a></div>
|
||||
<div class="ping_discon" style="width: 600px;">
|
||||
<div class="ping_discon">
|
||||
<div class="ping_distop">
|
||||
<a href="#" target="_blank" class="c_blue fb fl mb10 "><%= journal.user %></a><span class="c_grey fr"><%= format_time journal.created_on %></span>
|
||||
<div class="cl"></div>
|
||||
|
@ -20,7 +20,9 @@
|
|||
<!--编辑、引用、回复按钮-->
|
||||
<div class="ping_disfoot"><%= render_links_easy(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %></div>
|
||||
<!--回复内容、引用内容-->
|
||||
<p><%= render_notes_issue(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %></p>
|
||||
<p>
|
||||
<%= render_notes_issue(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %>
|
||||
</p>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -109,6 +109,9 @@
|
|||
<%= render :partial => 'edit' %>
|
||||
</div>
|
||||
<p style="padding-top: 5px"></p>
|
||||
|
||||
<!--引用时不能修改,剥离出引用内容-->
|
||||
|
||||
<a remote="true" href="javascript:void(0)" class="blue_btn fr mr80" onclick="issue_desc_editor.sync();$('#issue-form').submit();">
|
||||
<%= l(:button_submit) %>
|
||||
</a>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
$('#issue_notes').val("<%= raw escape_javascript(@content) %>");
|
||||
$('#journal_issue_note').html("<%= raw escape_javascript(@content.html_safe) %>");
|
||||
$("input[name='issue_quote_new']").val("<%= raw escape_javascript(@content.html_safe) %>");
|
||||
<%
|
||||
# when quoting a private journal, check the private checkbox
|
||||
if @journal && @journal.private_notes?
|
||||
%>
|
||||
$('#issue_private_notes').attr('checked', true);
|
||||
<% end %>
|
||||
|
||||
showAndScrollTo("update", "notes");
|
||||
$('#notes').scrollTop = $('#notes').scrollHeight - $('#notes').clientHeight;
|
||||
|
||||
|
|
Loading…
Reference in New Issue