Merge branch 'yuanke' into develop

This commit is contained in:
huang 2016-05-20 15:37:44 +08:00
commit d108f0a684
38 changed files with 134 additions and 15 deletions

View File

@ -141,6 +141,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_message_description_<%= reply.id %>'); showNormalImage('reply_message_description_<%= reply.id %>');
autoUrl('reply_message_description_<%= reply.id %>');
}); });
</script> </script>
<div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();"> <div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();">
@ -215,5 +216,6 @@
var postContent = $("#message_description_<%= @article.id %>").html(); var postContent = $("#message_description_<%= @article.id %>").html();
postContent = postContent.replace(/&nbsp;/g," "); postContent = postContent.replace(/&nbsp;/g," ");
$("#message_description_<%= @article.id %>").html(postContent); $("#message_description_<%= @article.id %>").html(postContent);
autoUrl('message_description_<%= @article.id %>');
}); });
</script> </script>

View File

@ -120,6 +120,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_message_description_<%= reply.id %>'); showNormalImage('reply_message_description_<%= reply.id %>');
autoUrl('reply_message_description_<%= reply.id %>');
}); });
</script> </script>
<div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();"> <div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();">
@ -214,5 +215,6 @@
postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; "); postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; ");
$(this).html(postContent); $(this).html(postContent);
}); });
autoUrl('message_description_<%= @article.id %>');
}); });
</script> </script>

View File

@ -1,6 +1,12 @@
<div style="padding-top: 10px"> <div style="padding-top: 10px">
<% if memos.any? %> <% if memos.any? %>
<% memos.each do |topic| %> <% memos.each do |topic| %>
<script type="text/javascript">
$(function(){
showNormalImage('postDetailDes_<%= topic.id %>');
autoUrl('postDetailDes_<%= topic.id %>');
});
</script>
<div class="postDetailRow"> <div class="postDetailRow">
<div class="postDetailPortrait"> <div class="postDetailPortrait">
<!--<img src="images/homepageImage.jpg" width="50" height="50" alt="贴吧图片" /></a>--> <!--<img src="images/homepageImage.jpg" width="50" height="50" alt="贴吧图片" /></a>-->
@ -16,7 +22,7 @@
<a href="javascript:void(0);" class="linkGrey2 disablePostLikeIcon ml10 mt20" style="cursor: default" title="点赞人数" > <%= get_praise_num(topic)%></a> <a href="javascript:void(0);" class="linkGrey2 disablePostLikeIcon ml10 mt20" style="cursor: default" title="点赞人数" > <%= get_praise_num(topic)%></a>
</div> </div>
<div class="postDetailDes"><%= topic.content.html_safe%> <div class="postDetailDes" id = "postDetailDes_<%= topic.id %>"><%= topic.content.html_safe%>
<!--<a href="javascript:void(0);" class="linkBlue2 underline ml8">显示全部</a>--> <!--<a href="javascript:void(0);" class="linkBlue2 underline ml8">显示全部</a>-->
</div> </div>
<% author = topic.last_reply.try(:author)%> <% author = topic.last_reply.try(:author)%>

View File

@ -28,7 +28,7 @@
<%= render :partial => 'action_menu' %> <%= render :partial => 'action_menu' %>
<div class="cl"></div> <div class="cl"></div>
<% if @issue.description? || @issue.attachments.any? -%> <% if @issue.description? || @issue.attachments.any? -%>
<div class="talk_info mb10 issue_desc" style="word-break:break-all;"> <div class="talk_info mb10 issue_desc" id="issue_desc_<%= @issue.id %>" style="word-break:break-all;">
<% if @issue.description? %> <% if @issue.description? %>
<%#= link_to l(:button_quote), quoted_issue_path(@issue.id), :remote => true, :method => 'post', :class => 'icon icon-comment' if authorize_for('issues', 'edit') %> <%#= link_to l(:button_quote), quoted_issue_path(@issue.id), :remote => true, :method => 'post', :class => 'icon icon-comment' if authorize_for('issues', 'edit') %>
<%= textAreailizable @issue, :description, :attachments => @issue.attachments %> <%= textAreailizable @issue, :description, :attachments => @issue.attachments %>
@ -43,4 +43,11 @@
<!--属性--> <!--属性-->
<%= render :partial => 'issues/attributes_show' %> <%= render :partial => 'issues/attributes_show' %>
<div class="cl"></div> <div class="cl"></div>
</div> </div>
<script type="text/javascript">
$(function(){
showNormalImage('issue_desc_<%= @issue.id %>');
autoUrl('issue_desc_<%= @issue.id %>');
});
</script>

View File

@ -3,6 +3,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= reply.id %>'); showNormalImage('reply_content_<%= reply.id %>');
autoUrl('reply_content_<%= reply.id %>');
}); });
</script> </script>
<% replies_all_i=replies_all_i + 1 %> <% replies_all_i=replies_all_i + 1 %>

View File

@ -99,7 +99,7 @@
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
$("#activity_description_<%= reply.id %> p,#activity_description__<%= reply.id %> span,#activity_description_<%= reply.id %> em").each(function(){ $("#activity_description_<%= reply.id %> p,#activity_description_<%= reply.id %> span,#activity_description_<%= reply.id %> em").each(function(){
var postContent = $(this).html(); var postContent = $(this).html();
postContent = postContent.replace(/&nbsp;/g," "); postContent = postContent.replace(/&nbsp;/g," ");
postContent= postContent.replace(/ {2}/g,"&nbsp; "); postContent= postContent.replace(/ {2}/g,"&nbsp; ");
@ -107,6 +107,7 @@
postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; "); postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; ");
$(this).html(postContent); $(this).html(postContent);
}); });
autoUrl('activity_description_<%= reply.id %>');
description_show_hide(<%= reply.id %>); description_show_hide(<%= reply.id %>);
}); });
</script> </script>
@ -147,6 +148,7 @@
postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; "); postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; ");
$(this).html(postContent); $(this).html(postContent);
}); });
autoUrl('activity_description_<%= @memo.id %>');
description_show_hide(<%= @memo.id %>); description_show_hide(<%= @memo.id %>);
}); });
</script> </script>

View File

@ -109,6 +109,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_message_description_<%= reply.id %>'); showNormalImage('reply_message_description_<%= reply.id %>');
autoUrl('reply_message_description_<%= reply.id %>');
}); });
</script> </script>
<div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();"> <div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();">
@ -188,5 +189,6 @@
postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; "); postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; ");
$(this).html(postContent); $(this).html(postContent);
}); });
autoUrl('message_description_<%= @topic.id %>');
}); });
</script> </script>

View File

@ -138,6 +138,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_message_description_<%= reply.id %>'); showNormalImage('reply_message_description_<%= reply.id %>');
autoUrl('reply_message_description_<%= reply.id %>');
}); });
</script> </script>
<div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();"> <div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();">
@ -210,5 +211,6 @@
postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; "); postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; ");
$(this).html(postContent); $(this).html(postContent);
}); });
autoUrl('message_description_<%= @topic.id %>');
}); });
</script> </script>

View File

@ -165,6 +165,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_message_description_<%= reply.id %>'); showNormalImage('reply_message_description_<%= reply.id %>');
autoUrl('reply_message_description_<%= reply.id %>');
}); });
</script> </script>
<div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();"> <div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();">
@ -245,5 +246,6 @@
postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; "); postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; ");
$(this).html(postContent); $(this).html(postContent);
}); });
autoUrl('message_description_<%= @topic.id %>');
}); });
</script> </script>

View File

@ -115,6 +115,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_message_description_<%= reply.id %>'); showNormalImage('reply_message_description_<%= reply.id %>');
autoUrl('reply_message_description_<%= reply.id %>');
}); });
</script> </script>
<div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();"> <div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();">
@ -210,5 +211,6 @@
postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; "); postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; ");
$(this).html(postContent); $(this).html(postContent);
}); });
autoUrl('message_description_<%= @news.id %>');
}); });
</script> </script>

View File

@ -97,6 +97,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_message_description_<%= reply.id %>'); showNormalImage('reply_message_description_<%= reply.id %>');
autoUrl('reply_message_description_<%= reply.id %>');
}); });
</script> </script>
<div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();"> <div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();">
@ -185,5 +186,6 @@
postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; "); postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; ");
$(this).html(postContent); $(this).html(postContent);
}); });
autoUrl('message_description_<%= @news.id %>');
}); });
</script> </script>

View File

@ -107,6 +107,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_message_description_<%= reply.id %>'); showNormalImage('reply_message_description_<%= reply.id %>');
autoUrl('reply_message_description_<%= reply.id %>');
}); });
</script> </script>
<div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();"> <div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();">
@ -195,5 +196,6 @@
postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; "); postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; ");
$(this).html(postContent); $(this).html(postContent);
}); });
autoUrl('message_description_<%= @news.id %>');
}); });
</script> </script>

View File

@ -84,6 +84,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_message_description_<%= reply.id %>'); showNormalImage('reply_message_description_<%= reply.id %>');
autoUrl('reply_message_description_<%= reply.id %>');
}); });
</script> </script>
<% user = User.find(reply.creator_id) %> <% user = User.find(reply.creator_id) %>
@ -158,6 +159,7 @@
postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; "); postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; ");
$(this).html(postContent); $(this).html(postContent);
}); });
autoUrl('intro_content_<%= @document.id %>');
}); });
function expand_reply(container, btnid) { function expand_reply(container, btnid) {
var target = $(container); var target = $(container);

View File

@ -315,6 +315,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= comment.id %>'); showNormalImage('reply_content_<%= comment.id %>');
autoUrl('reply_content_<%= comment.id %>');
}); });
</script> </script>
<% replies_all_i = replies_all_i + 1 %> <% replies_all_i = replies_all_i + 1 %>

View File

@ -100,6 +100,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= reply.id %>'); showNormalImage('reply_content_<%= reply.id %>');
autoUrl('reply_content_<%= reply.id %>');
}); });
</script> </script>
<% replies_all_i=replies_all_i+1 %> <% replies_all_i=replies_all_i+1 %>

View File

@ -69,6 +69,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= comment.id %>'); showNormalImage('reply_content_<%= comment.id %>');
autoUrl('reply_content_<%= comment.id %>');
}); });
</script> </script>
<% replies_all_i = replies_all_i + 1 %> <% replies_all_i = replies_all_i + 1 %>

View File

@ -80,6 +80,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= reply.id %>'); showNormalImage('reply_content_<%= reply.id %>');
autoUrl('reply_content_<%= reply.id %>');
}); });
</script> </script>
<% replies_all_i=replies_all_i + 1 %> <% replies_all_i=replies_all_i + 1 %>

View File

@ -105,6 +105,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= reply.id %>'); showNormalImage('reply_content_<%= reply.id %>');
autoUrl('reply_content_<%= reply.id %>');
}); });
</script> </script>
<% replies_all_i=replies_all_i+1 %> <% replies_all_i=replies_all_i+1 %>

View File

@ -89,6 +89,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= comment.id %>'); showNormalImage('reply_content_<%= comment.id %>');
autoUrl('reply_content_<%= comment.id %>');
}); });
</script> </script>
<% replies_all_i = replies_all_i + 1 %> <% replies_all_i = replies_all_i + 1 %>

View File

@ -79,6 +79,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= reply.id %>'); showNormalImage('reply_content_<%= reply.id %>');
autoUrl('reply_content_<%= reply.id %>');
}); });
</script> </script>
<% replies_all_i=replies_all_i+1 %> <% replies_all_i=replies_all_i+1 %>

View File

@ -59,6 +59,7 @@
postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; "); postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; ");
$(this).html(postContent); $(this).html(postContent);
}); });
autoUrl('intro_content_<%= @document.id %>');
function expand_reply(container, btnid) { function expand_reply(container, btnid) {
var target = $(container); var target = $(container);
var btn = $(btnid); var btn = $(btnid);

View File

@ -88,6 +88,12 @@
<ul> <ul>
<% reply_id = 0 %> <% reply_id = 0 %>
<% comments_for_doc.each do |comment| %> <% comments_for_doc.each do |comment| %>
<script type="text/javascript">
$(function(){
showNormalImage('reply_content_<%= comment.id %>');
autoUrl('reply_content_<%= comment.id %>');
});
</script>
<% reply_id += 1 %> <% reply_id += 1 %>
<li style="display:<%= reply_id > 3 ? 'none' : '' %>"> <li style="display:<%= reply_id > 3 ? 'none' : '' %>">
<div class="homepagePostReplyPortrait"><%= link_to image_tag(url_to_avatar(User.find(comment.creator_id)), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_id) %></div> <div class="homepagePostReplyPortrait"><%= link_to image_tag(url_to_avatar(User.find(comment.creator_id)), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_id) %></div>
@ -104,7 +110,7 @@
</span> </span>
</div> </div>
<% unless comment.content.blank? %> <% unless comment.content.blank? %>
<div class="homepagePostReplyContent"><%= comment.content.html_safe %></div> <div class="homepagePostReplyContent" id="reply_content_<%= comment.id %>"><%= comment.content.html_safe %></div>
<% end %> <% end %>
</div> </div>
<div class="cl"></div> <div class="cl"></div>

View File

@ -69,6 +69,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= comment.id %>'); showNormalImage('reply_content_<%= comment.id %>');
autoUrl('reply_content_<%= comment.id %>');
}); });
</script> </script>
<% replies_all_i = replies_all_i + 1 %> <% replies_all_i = replies_all_i + 1 %>
@ -125,4 +126,4 @@
$(function(){ $(function(){
user_card_show_hide(); user_card_show_hide();
}); });
</script> </script>

View File

@ -97,6 +97,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_message_description_<%= reply.id %>'); showNormalImage('reply_message_description_<%= reply.id %>');
autoUrl('reply_message_description_<%= reply.id %>');
}); });
</script> </script>
<% user = User.find(reply.creator_id) %> <% user = User.find(reply.creator_id) %>
@ -164,6 +165,7 @@
postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; "); postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; ");
$(this).html(postContent); $(this).html(postContent);
}); });
autoUrl('intro_content_<%= @document.id %>');
var replyCount = $(".homepagePostReplyContainer").size(); var replyCount = $(".homepagePostReplyContainer").size();
if (replyCount >3){ if (replyCount >3){
for(var i= 3; i < replyCount+1; i++){ for(var i= 3; i < replyCount+1; i++){

View File

@ -321,6 +321,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= comment.id %>'); showNormalImage('reply_content_<%= comment.id %>');
autoUrl('reply_content_<%= comment.id %>');
}); });
</script> </script>
<% replies_all_i = replies_all_i + 1 %> <% replies_all_i = replies_all_i + 1 %>

View File

@ -56,6 +56,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= comment.id %>'); showNormalImage('reply_content_<%= comment.id %>');
autoUrl('reply_content_<%= comment.id %>');
}); });
</script> </script>
<% replies_all_i = replies_all_i + 1 %> <% replies_all_i = replies_all_i + 1 %>

View File

@ -117,6 +117,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= reply.id %>'); showNormalImage('reply_content_<%= reply.id %>');
autoUrl('reply_content_<%= reply.id %>');
}); });
</script> </script>
<% replies_all_i=replies_all_i+1 %> <% replies_all_i=replies_all_i+1 %>
@ -179,4 +180,4 @@
$(function(){ $(function(){
user_card_show_hide(); user_card_show_hide();
}); });
</script> </script>

View File

@ -94,6 +94,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= comment.id %>'); showNormalImage('reply_content_<%= comment.id %>');
autoUrl('reply_content_<%= comment.id %>');
}); });
</script> </script>
<% replies_all_i = replies_all_i + 1 %> <% replies_all_i = replies_all_i + 1 %>

View File

@ -1,6 +1,6 @@
<div class="homepagePostIntro break_word upload_img maxh360 table_maxWidth " id="activity_description_<%= user_activity_id%>"> <div class="homepagePostIntro break_word upload_img maxh360 table_maxWidth " id="activity_description_<%= user_activity_id%>">
<div id="intro_content_<%= user_activity_id%>"> <div id="intro_content_<%= user_activity_id%>">
<%= content.to_s.html_safe%> <%= content.to_s.html_safe %>
</div> </div>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
@ -13,6 +13,7 @@
postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; "); postContent=postContent.replace(/&nbsp; /g,"&nbsp;&nbsp; ");
$(this).html(postContent); $(this).html(postContent);
}); });
autoUrl('intro_content_<%= user_activity_id%>');
description_show_hide(<%=user_activity_id %>); description_show_hide(<%=user_activity_id %>);
}); });
</script> </script>

View File

@ -29,6 +29,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= reply.id %>'); showNormalImage('reply_content_<%= reply.id %>');
autoUrl('reply_content_<%= reply.id %>');
}); });
</script> </script>
<% replies_all_i=replies_all_i + 1 %> <% replies_all_i=replies_all_i + 1 %>

View File

@ -112,6 +112,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= reply.id %>'); showNormalImage('reply_content_<%= reply.id %>');
autoUrl('reply_content_<%= reply.id %>');
}); });
</script> </script>
<% replies_all_i=replies_all_i+1 %> <% replies_all_i=replies_all_i+1 %>

View File

@ -91,6 +91,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= comment.id %>'); showNormalImage('reply_content_<%= comment.id %>');
autoUrl('reply_content_<%= comment.id %>');
}); });
</script> </script>
<% replies_all_i = replies_all_i + 1 %> <% replies_all_i = replies_all_i + 1 %>

View File

@ -75,6 +75,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= comment.id %>'); showNormalImage('reply_content_<%= comment.id %>');
autoUrl('reply_content_<%= comment.id %>');
}); });
</script> </script>
<% replies_all_i = replies_all_i + 1 %> <% replies_all_i = replies_all_i + 1 %>

View File

@ -331,6 +331,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
showNormalImage('reply_content_<%= comment.id %>'); showNormalImage('reply_content_<%= comment.id %>');
autoUrl('reply_content_<%= comment.id %>');
}); });
</script> </script>
<% replies_all_i = replies_all_i + 1 %> <% replies_all_i = replies_all_i + 1 %>

View File

@ -86,6 +86,12 @@
<div class="" id="reply_div_<%= user_activity_id %>"> <div class="" id="reply_div_<%= user_activity_id %>">
<ul> <ul>
<% fetch_user_leaveWord_reply(activity).reorder("created_on desc").each do |comment| %> <% fetch_user_leaveWord_reply(activity).reorder("created_on desc").each do |comment| %>
<script type="text/javascript">
$(function(){
showNormalImage('reply_content_<%= user_activity_id %>');
autoUrl('reply_content_<%= user_activity_id %>');
});
</script>
<% replies_all_i = replies_all_i + 1 %> <% replies_all_i = replies_all_i + 1 %>
<li class="homepagePostReplyContainer" nhname="reply_rec" onmouseover="$('#message_delete_<%= comment.id%>').show();" onmouseout="$('#message_delete_<%= comment.id%>').hide();" style="display:<%= replies_all_i > 3 ? 'none' : '' %>"> <li class="homepagePostReplyContainer" nhname="reply_rec" onmouseover="$('#message_delete_<%= comment.id%>').show();" onmouseout="$('#message_delete_<%= comment.id%>').hide();" style="display:<%= replies_all_i > 3 ? 'none' : '' %>">
<div class="homepagePostReplyPortrait"> <div class="homepagePostReplyPortrait">

View File

@ -1317,3 +1317,54 @@ function pop_up_box(value,tWidth,tTop,tLeft){
} }
//yk 自动识别URL 并加上链接
//var strRegex = '((https?|ftp|news):\/\/)?([a-z]([a-z0-9\-]*[\.。])+([a-z]{3}|aero|arpa|biz|com|coop|edu|gov|info|int|jobs|mil|museum|name|nato|net|org|pro|travel)|(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))(\/[a-z0-9_\-\.~]+)*(\/([a-z0-9_\-\.]*)(\?[a-z0-9+_\-\.%=&]*)?)?(#[a-z][a-z0-9_]*)?';
function autoUrl(id){
if ($("#"+id).children().length > 0 ){
$("#"+id+" p,#"+ id +" span,#"+id+" em,#"+id+" h1,#"+id+" h2,#"+id+" h3,#"+id+" h4,#"+id+" strong,#"+id+" b,#"+id+" font,#"+id+" i").each(function(){
if ($(this).children().length == 0){
var html = $(this).text(); //.replace(/(^\s*)|(\s*$)/g, "")
console.log("html="+html);
// var re=new RegExp(strRegex,"g");
html = html.replace(/((https?|ftp|news):\/\/)?([a-z]([a-z0-9\-]*[\.。])+([a-z]{3}|aero|arpa|biz|com|coop|edu|gov|info|int|jobs|mil|museum|name|nato|net|org|pro|travel)|(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))(\/[a-z0-9_\-\.~]+)*(\/([a-z0-9_\-\.]*)(\?[a-z0-9+_\-\.%=&]*)?)?(#[a-z][a-z0-9_]*)?/g,function(full) {
//没有://的都加上http://
var reStr = full;
if (full.length > 0){
if (full.indexOf("://") >= 0){
reStr = "<a target='_Blank' href="+"'"+full+"'"+">"+full+"</a>";
}
else{
reStr = "<a target='_Blank' href="+"'http://"+full+"'"+">"+full+"</a>";
}
console.log("reStr="+reStr);
}
return reStr ;
});
$(this).html(html);
}
});
}
else{
var html = $("#"+id).text(); //.replace(/(^\s*)|(\s*$)/g, "")
console.log("!!!!html="+html);
// var re=new RegExp(strRegex,"g");
html = html.replace(/((https?|ftp|news):\/\/)?([a-z]([a-z0-9\-]*[\.。])+([a-z]{3}|aero|arpa|biz|com|coop|edu|gov|info|int|jobs|mil|museum|name|nato|net|org|pro|travel)|(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))(\/[a-z0-9_\-\.~]+)*(\/([a-z0-9_\-\.]*)(\?[a-z0-9+_\-\.%=&]*)?)?(#[a-z][a-z0-9_]*)?/g,function(full) {
//没有://的都加上http://
var reStr = full;
if (full.length > 0){
if (full.indexOf("://") >= 0){
reStr = "<a target='_Blank' href="+"'"+full+"'"+">"+full+"</a>";
}
else{
reStr = "<a target='_Blank' href="+"'http://"+full+"'"+">"+full+"</a>";
}
console.log("reStr="+reStr);
}
return reStr ;
});
$("#"+id).html(html);
}
}

View File

@ -672,6 +672,7 @@ a.postTypeGrey:hover {color:#269ac9;}
.homepagePostDes {float:left; width:655px; margin-left:15px; overflow:hidden;} .homepagePostDes {float:left; width:655px; margin-left:15px; overflow:hidden;}
.homepagePostTo {font-size:14px; color:#484848; margin-bottom:5px;} .homepagePostTo {font-size:14px; color:#484848; margin-bottom:5px;}
.homepagePostTitle {font-size:14px; color:#484848; margin-bottom:5px; font-weight:bold;} .homepagePostTitle {font-size:14px; color:#484848; margin-bottom:5px; font-weight:bold;}
.homepagePostTitle td,.homepagePostTitle tr {border: 1px solid; border-color: inherit;}
.homepagePostSubmitContainer {height:25px; margin-top: 8px; margin-bottom: 5px;} .homepagePostSubmitContainer {height:25px; margin-top: 8px; margin-bottom: 5px;}
.homepagePostSubmit {font-size:14px; color:#888888; border:1px solid #dddddd; background-color:#eaeaea; float:left; margin-right:20px; padding:0px 10px;} .homepagePostSubmit {font-size:14px; color:#888888; border:1px solid #dddddd; background-color:#eaeaea; float:left; margin-right:20px; padding:0px 10px;}
.homepagePostSubmit:hover {background-color:#d8d8d8;} .homepagePostSubmit:hover {background-color:#d8d8d8;}
@ -681,10 +682,9 @@ a.postTypeGrey:hover {color:#269ac9;}
.homepagePostReply {width:720px; margin:0px auto; background-color:#f1f1f1; margin-top:10px;} .homepagePostReply {width:720px; margin:0px auto; background-color:#f1f1f1; margin-top:10px;}
.homepagePostIntro ol li{list-style-type: decimal;margin-left: 40px;} .homepagePostIntro ol li{list-style-type: decimal;margin-left: 40px;}
.homepagePostIntro ul li{list-style-type: disc;margin-left: 40px;} .homepagePostIntro ul li{list-style-type: disc;margin-left: 40px;}
.homepagePostReplyBanner {width:718px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888; position: relative;}
.borderBottomNone {border-bottom:none !important;}
.homepagePostIntro td,.homepagePostIntro tr {border: 1px solid; border-color: inherit;} .homepagePostIntro td,.homepagePostIntro tr {border: 1px solid; border-color: inherit;}
.homepagePostReplyBanner {width:718px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888; position: relative;}
.borderBottomNone {border-bottom:none !important;}
.homepagePostReplyBanner {width:718px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888;} .homepagePostReplyBanner {width:718px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888;}
.borderBottomNone {border-bottom:none !important;} .borderBottomNone {border-bottom:none !important;}
.topBorder {border-top: 1px solid #e4e4e4;} .topBorder {border-top: 1px solid #e4e4e4;}
@ -721,6 +721,7 @@ a.postOptionLink:hover {color:#ffffff; background-color:#269ac9;}
.homepagePostReplyContent {font-size:12px; color:#484848; margin:3px 5px 12px 5px;font: 14px/1.5 "sans serif",tahoma,verdana,helvetica;font-family:"微软雅黑","宋体";} .homepagePostReplyContent {font-size:12px; color:#484848; margin:3px 5px 12px 5px;font: 14px/1.5 "sans serif",tahoma,verdana,helvetica;font-family:"微软雅黑","宋体";}
.homepagePostReplyContent ol li{list-style-type: decimal;margin-left: 40px;} .homepagePostReplyContent ol li{list-style-type: decimal;margin-left: 40px;}
.homepagePostReplyContent ul li{list-style-type: disc;margin-left: 40px;} .homepagePostReplyContent ul li{list-style-type: disc;margin-left: 40px;}
.homepagePostReplyContent td,.homepagePostReplyContent tr {border: 1px solid; border-color: inherit;}
.table_maxWidth table {max-width: 642px;} .table_maxWidth table {max-width: 642px;}
.homepagePostProjectState {width:52px; height:20px; line-height:20px; border-radius:1px; background-color:#28be6c; color:#ffffff; text-align:center; vertical-align:middle; font-size:12px; display:inline-block; margin-left:5px;} .homepagePostProjectState {width:52px; height:20px; line-height:20px; border-radius:1px; background-color:#28be6c; color:#ffffff; text-align:center; vertical-align:middle; font-size:12px; display:inline-block; margin-left:5px;}
.homepagePostAssignTo {float:left; font-size:14px; color:#269ac9;} .homepagePostAssignTo {float:left; font-size:14px; color:#269ac9;}
@ -864,7 +865,7 @@ a.sortArrowActiveU {background:url(images/post_image_list.png) -17px -20px no-re
.postDetailDes p,div,em{word-break: break-all;word-wrap: break-word;} .postDetailDes p,div,em{word-break: break-all;word-wrap: break-word;}
.postDetailDes ol li{list-style-type: decimal;margin-left: 40px;} .postDetailDes ol li{list-style-type: decimal;margin-left: 40px;}
.postDetailDes ul li{list-style-type: disc;margin-left: 40px;} .postDetailDes ul li{list-style-type: disc;margin-left: 40px;}
.postDetailDes td,.homepagePostReplyContent tr {border: 1px solid; border-color: inherit;} .postDetailDes td,.postDetailDes tr {border: 1px solid; border-color: inherit;}
.homepagePostIntro p,.homepagePostIntro div,.homepagePostIntro em, .homepagePostIntro span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important; } /*line-height: 18px !important;*/ .homepagePostIntro p,.homepagePostIntro div,.homepagePostIntro em, .homepagePostIntro span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important; } /*line-height: 18px !important;*/
.postDetailCreater {color:#888888; font-size:12px; float:left; margin-right:25px;} .postDetailCreater {color:#888888; font-size:12px; float:left; margin-right:25px;}
.postDetailDate {color:#888888; font-size:12px; float:left;} .postDetailDate {color:#888888; font-size:12px; float:left;}
@ -1456,7 +1457,7 @@ span.at a{color:#269ac9;text-decoration: none;}
.pic_edit2:hover{display:inline-block; background:url(../images/public_icon.png) -32px -32px no-repeat; width:20px; height:15px;} .pic_edit2:hover{display:inline-block; background:url(../images/public_icon.png) -32px -32px no-repeat; width:20px; height:15px;}
.w70{ width:70px;} .w70{ width:70px;}
.w80{ width:80px;} .w80{ width:80px;}
.label03{ width:70px; text-align:right; display:block; float:left;} .label03{ width:70px; text-align:right; display:block; float:left;white-space: nowrap;}
.pro_info_p{color:#0781b4 !important; float:left; width:80px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; } .pro_info_p{color:#0781b4 !important; float:left; width:80px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; }
.proInfoP{color:#000000 !important; float:left; width:80px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; } .proInfoP{color:#000000 !important; float:left; width:80px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; }

View File

@ -470,7 +470,7 @@ a:hover.st_add{ color:#ff8e15;}
.newpro_box select{ height:29px; float:left; margin-bottom:10px;} .newpro_box select{ height:29px; float:left; margin-bottom:10px;}
/*.label{ width:80px; text-align:right; font-size:14 background-image: url(../images/true.png); }*/ /*.label{ width:80px; text-align:right; font-size:14 background-image: url(../images/true.png); }*/
.label02{ width:110px; text-align:right; font-size:14px; display:block; float:left;} .label02{ width:110px; text-align:right; font-size:14px; display:block; float:left;}
.label03{ width:70px; text-align:right; display:block; float:left;} .label03{ width:70px; text-align:right; display:block; float:left;white-space: nowrap;}
.collapsible{ border-left:none;border-right:none;border-bottom:none; border-top:1px solid #e4e4e4; padding-top:10px; } .collapsible{ border-left:none;border-right:none;border-bottom:none; border-top:1px solid #e4e4e4; padding-top:10px; }
.icon-reload { background-image: url(../images/reload.png); } .icon-reload { background-image: url(../images/reload.png); }
.icon { .icon {
@ -1240,4 +1240,4 @@ a.pages-big{ width:50px;}
.pages{width:330px; margin:20px auto 10px;} .pages{width:330px; margin:20px auto 10px;}
.red-cir-btn{ background:#e74c3c; padding:1px 5px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;} .red-cir-btn{ background:#e74c3c; padding:1px 5px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
.green-cir-btn{ background:#28be6c; padding:1px 5px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;} .green-cir-btn{ background:#28be6c; padding:1px 5px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}