帖子、博客、通知、文章详情页面的单词折行
This commit is contained in:
parent
0b2184c3d9
commit
6ae7da99be
|
@ -94,7 +94,7 @@
|
|||
</div>
|
||||
<div class="postDetailDate mb5"><%= format_time( @article.created_on)%></div>
|
||||
<div class="cl"></div>
|
||||
<div class="memo-content upload_img break_word" id="message_description_<%= @article.id %>" style="word-break: break-all; word-wrap:break-word;margin-bottom: 0px !important;" >
|
||||
<div class="homepagePostIntro memo-content upload_img break_word" id="message_description_<%= @article.id %>" style="word-break: break-all; word-wrap:break-word;margin-bottom: 0px !important;" >
|
||||
<%= @article.content.html_safe%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
@ -208,4 +208,11 @@
|
|||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
var postContent = $("#message_description_<%= @article.id %>").html();
|
||||
postContent = postContent.replace(/ /g," ");
|
||||
$("#message_description_<%= @article.id %>").html(postContent);
|
||||
});
|
||||
</script>
|
|
@ -94,7 +94,7 @@
|
|||
</div>
|
||||
<div class="postDetailDate mb5"><%= format_time( @article.created_on)%></div>
|
||||
<div class="cl"></div>
|
||||
<div class="memo-content upload_img break_word" id="message_description_<%= @article.id %>" style="word-break: break-all; word-wrap:break-word;margin-bottom: 0px !important;" >
|
||||
<div class="homepagePostIntro memo-content upload_img break_word" id="message_description_<%= @article.id %>" style="word-break: break-all; word-wrap:break-word;margin-bottom: 0px !important;" >
|
||||
<%= @article.content.html_safe%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
@ -214,4 +214,11 @@
|
|||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
var postContent = $("#message_description_<%= @article.id %>").html();
|
||||
postContent = postContent.replace(/ /g," ");
|
||||
$("#message_description_<%= @article.id %>").html(postContent);
|
||||
});
|
||||
</script>
|
|
@ -74,7 +74,7 @@
|
|||
<%= link_to @memo.author.name, user_path(@memo.author), :class => "linkBlue2", :target=> "_blank"%></div>
|
||||
<div class="postDetailDate mb5"><%= format_date( @memo.created_at)%></div>
|
||||
<div class="cl"></div>
|
||||
<div class="memo-content" style="word-break: break-all; word-wrap:break-word;margin-bottom: 0px !important;" >
|
||||
<div class="homepagePostIntro memo-content" id="message_description_<%= @memo.id %>" style="word-break: break-all; word-wrap:break-word;margin-bottom: 0px !important;" >
|
||||
<%= @memo.content.html_safe%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
@ -136,4 +136,11 @@
|
|||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
var postContent = $("#message_description_<%= @memo.id %>").html();
|
||||
postContent = postContent.replace(/ /g," ");
|
||||
$("#message_description_<%= @memo.id %>").html(postContent);
|
||||
});
|
||||
</script>
|
|
@ -80,7 +80,7 @@
|
|||
</div>
|
||||
<div class="postDetailDate mb5"><%= format_time( @topic.created_on)%></div>
|
||||
<div class="cl"></div>
|
||||
<div class="memo-content upload_img break_word" id="message_description_<%= @topic.id %>" style="word-break: break-all; word-wrap:break-word;margin-bottom: 0px !important;" >
|
||||
<div class="homepagePostIntro memo-content upload_img break_word" id="message_description_<%= @topic.id %>" style="word-break: break-all; word-wrap:break-word;margin-bottom: 0px !important;" >
|
||||
<%= @topic.content.html_safe%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
@ -168,4 +168,11 @@
|
|||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
var postContent = $("#message_description_<%= @topic.id %>").html();
|
||||
postContent = postContent.replace(/ /g," ");
|
||||
$("#message_description_<%= @topic.id %>").html(postContent);
|
||||
});
|
||||
</script>
|
|
@ -109,7 +109,7 @@
|
|||
</div>
|
||||
<div class="postDetailDate mb5"><%= format_time( @topic.created_on)%></div>
|
||||
<div class="cl"></div>
|
||||
<div class="memo-content upload_img break_word" id="message_description_<%= @topic.id %>" style="word-break: break-all; word-wrap:break-word;margin-bottom: 0px !important;" >
|
||||
<div class="homepagePostIntro memo-content upload_img break_word" id="message_description_<%= @topic.id %>" style="word-break: break-all; word-wrap:break-word;margin-bottom: 0px !important;" >
|
||||
<%= @topic.content.html_safe%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
@ -197,4 +197,11 @@
|
|||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
var postContent = $("#message_description_<%= @topic.id %>").html();
|
||||
postContent = postContent.replace(/ /g," ");
|
||||
$("#message_description_<%= @topic.id %>").html(postContent);
|
||||
});
|
||||
</script>
|
|
@ -135,7 +135,7 @@
|
|||
</div>
|
||||
<div class="postDetailDate mb5"><%= format_time( @topic.created_on)%></div>
|
||||
<div class="cl"></div>
|
||||
<div class="memo-content upload_img break_word" id="message_description_<%= @topic.id %>" style="word-break: break-all; word-wrap:break-word;margin-bottom: 0px !important;" >
|
||||
<div class="homepagePostIntro memo-content upload_img break_word" id="message_description_<%= @topic.id %>" style="word-break: break-all; word-wrap:break-word;margin-bottom: 0px !important;" >
|
||||
<%= @topic.content.html_safe%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
@ -225,3 +225,10 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
var postContent = $("#message_description_<%= @topic.id %>").html();
|
||||
postContent = postContent.replace(/ /g," ");
|
||||
$("#message_description_<%= @topic.id %>").html(postContent);
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
</div>
|
||||
<div class="postDetailDate mb5"><%= format_time( @news.created_on)%></div>
|
||||
<div class="cl"></div>
|
||||
<div class="memo-content upload_img break_word" id="message_description_<%= @news.id %>" style="word-break: break-all; word-wrap:break-word;margin-bottom: 0px !important;" >
|
||||
<div class="homepagePostIntro memo-content upload_img break_word" id="message_description_<%= @news.id %>" style="word-break: break-all; word-wrap:break-word;margin-bottom: 0px !important;" >
|
||||
<%= @news.description.html_safe%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
@ -182,3 +182,10 @@
|
|||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
var postContent = $("#message_description_<%= @news.id %>").html();
|
||||
postContent = postContent.replace(/ /g," ");
|
||||
$("#message_description_<%= @news.id %>").html(postContent);
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
</div>
|
||||
<div class="postDetailDate mb5"><%= format_time( @news.created_on)%></div>
|
||||
<div class="cl"></div>
|
||||
<div class="memo-content upload_img break_word" id="message_description_<%= @news.id %>" style="word-break: break-all; word-wrap:break-word;margin-bottom: 0px !important;" >
|
||||
<div class="homepagePostIntro memo-content upload_img break_word" id="message_description_<%= @news.id %>" style="word-break: break-all; word-wrap:break-word;margin-bottom: 0px !important;" >
|
||||
<%= @news.description.html_safe%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
@ -172,3 +172,10 @@
|
|||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
var postContent = $("#message_description_<%= @news.id %>").html();
|
||||
postContent = postContent.replace(/ /g," ");
|
||||
$("#message_description_<%= @news.id %>").html(postContent);
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
</div>
|
||||
<div class="postDetailDate mb5"><%= format_time( @news.created_on)%></div>
|
||||
<div class="cl"></div>
|
||||
<div class="memo-content upload_img break_word" id="message_description_<%= @news.id %>" style="word-break: break-all; word-wrap:break-word;margin-bottom: 0px !important;" >
|
||||
<div class="homepagePostIntro memo-content upload_img break_word" id="message_description_<%= @news.id %>" style="word-break: break-all; word-wrap:break-word;margin-bottom: 0px !important;" >
|
||||
<%= @news.description.html_safe%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
@ -182,3 +182,10 @@
|
|||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
var postContent = $("#message_description_<%= @news.id %>").html();
|
||||
postContent = postContent.replace(/ /g," ");
|
||||
$("#message_description_<%= @news.id %>").html(postContent);
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -20,10 +20,12 @@
|
|||
</div>
|
||||
<div class="cl"></div>
|
||||
<% unless document.content.blank? %>
|
||||
<div class="homepagePostIntro" style="width:640px;" id="intro_content_<%= document.id%>">
|
||||
<%= document.content.html_safe %>
|
||||
</div>
|
||||
<%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>document.id, :content=>document.content} %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<div id="intro_content_show_<%= document.id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
|
||||
<div id="intro_content_hide_<%= document.id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
||||
<div class="cl"></div>
|
||||
<div class="mt10" style="font-weight:normal;">
|
||||
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => document} %>
|
||||
</div>
|
||||
|
@ -133,9 +135,6 @@
|
|||
|
||||
<script type="text/javascript">
|
||||
function expand_reply(container, btnid) {
|
||||
var postContent = $("#intro_content_<%= document.id%>").html();
|
||||
postContent = postContent.replace(/ /g," ");
|
||||
$("#intro_content_<%= document.id%>").html(postContent);
|
||||
var target = $(container);
|
||||
var btn = $(btnid);
|
||||
if (btn.data('init') == '0') {
|
||||
|
|
|
@ -129,6 +129,3 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(description_show_hide(<%=user_activity_id %>));
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue