个人动态、课程动态、讨论区、单个帖子页面的图片可点击
This commit is contained in:
parent
a16dc09afa
commit
770f2f14bd
|
@ -72,7 +72,6 @@
|
|||
$(function () {
|
||||
init_activity_KindEditor_data(<%= topic.id%>, null, "87%");
|
||||
showNormalImage('activity_description_<%= topic.id %>');
|
||||
//showNormalImage('reply_content_<%#= topic.id %>');
|
||||
/*var description_images=$("div#activity_description_<%#= topic.id %>").find("img");
|
||||
if (description_images.length>0) {
|
||||
for (var i=0; i<description_images.length; i++){
|
||||
|
@ -81,17 +80,7 @@
|
|||
image.wrap(element);
|
||||
}
|
||||
}
|
||||
$('#activity_description_<%#= topic.id %> a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false});
|
||||
|
||||
var reply_images=$("div#reply_content_<%#= topic.id %>").find("img");
|
||||
if (reply_images.length>0) {
|
||||
for (var i=0; i<reply_images.length; i++){
|
||||
var image=$(reply_images[i]);
|
||||
var element=$("<a></a>").attr("href",image.attr('src'));
|
||||
image.wrap(element);
|
||||
}
|
||||
}
|
||||
$('#reply_content_<%#= topic.id %> a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false});*/
|
||||
$('#activity_description_<%#= topic.id %> a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false});*/
|
||||
});
|
||||
</script>
|
||||
<% if topic %>
|
||||
|
|
|
@ -74,25 +74,7 @@
|
|||
|
||||
$(function () {
|
||||
init_activity_KindEditor_data(<%= activity.id%>, null, "87%");
|
||||
var description_images=$("div#activity_description_<%= activity.id %>").find("img");
|
||||
if (description_images.length>0) {
|
||||
for (var i=0; i<description_images.length; i++){
|
||||
var image=$(description_images[i]);
|
||||
var element=$("<a></a>").attr("href",image.attr('src'));
|
||||
image.wrap(element);
|
||||
}
|
||||
}
|
||||
$('#activity_description_<%= activity.id %> a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false});
|
||||
|
||||
var reply_images=$("div#reply_content_<%= activity.id %>").find("img");
|
||||
if (reply_images.length>0) {
|
||||
for (var i=0; i<reply_images.length; i++){
|
||||
var image=$(reply_images[i]);
|
||||
var element=$("<a></a>").attr("href",image.attr('src'));
|
||||
image.wrap(element);
|
||||
}
|
||||
}
|
||||
$('#reply_content_<%= activity.id %> a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false});
|
||||
showNormalImage('activity_description_<%= activity.id %>');
|
||||
});
|
||||
</script>
|
||||
<% if activity && activity.course_act%>
|
||||
|
|
|
@ -25,8 +25,7 @@
|
|||
}
|
||||
$(function() {
|
||||
init_activity_KindEditor_data(<%= @topic.id%>,null,"85%");
|
||||
/*showNormalImage('activity_description_<%#= topic.id %>');
|
||||
showNormalImage('reply_content_<%#= topic.id %>');*/
|
||||
showNormalImage('message_description_<%= @topic.id %>');
|
||||
});
|
||||
</script>
|
||||
<div class="postRightContainer ml10" onmouseover="$('#message_setting_<%= @topic.id%>').show();" onmouseout="$('#message_setting_<%= @topic.id%>').hide();">
|
||||
|
@ -99,7 +98,11 @@
|
|||
</div>
|
||||
<div class="" id="reply_div_<%= @topic.id %>">
|
||||
<% @replies.each_with_index do |reply,i| %>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_message_description_<%= reply.id %>');
|
||||
});
|
||||
</script>
|
||||
<div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(reply.author), :width => 33,:height => 33), user_path(reply.author) %>
|
||||
|
|
|
@ -48,6 +48,11 @@
|
|||
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||
<ul>
|
||||
<% course.journals_for_messages.where('m_parent_id IS NULL').reorder("created_on desc").each do |comment| %>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= comment.id %>');
|
||||
});
|
||||
</script>
|
||||
<% replies_all_i = replies_all_i + 1 %>
|
||||
<li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i > 3 ? 'none' : '' %>">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
|
@ -62,9 +67,14 @@
|
|||
<% end %>
|
||||
<%= format_time(comment.created_on) %>
|
||||
</div>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img" id="reply_content_<%= user_activity_id %>">
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img" id="reply_content_<%= comment.id %>">
|
||||
<%= comment.notes.html_safe %></div>
|
||||
<% fetch_user_leaveWord_reply(comment).each do |reply| unless fetch_user_leaveWord_reply(comment).nil? %>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_to_content_<%= reply.id %>');
|
||||
});
|
||||
</script>
|
||||
<div class="recall">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(reply.user), :width => "33", :height => "33", :class =>"mt8"), user_path(reply.user_id), :alt => "用户头像" %>
|
||||
|
@ -84,7 +94,7 @@
|
|||
<% end %>
|
||||
<%= format_time reply.created_on %>
|
||||
</div>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img" style="max-width: 580px;" id="reply_content_<%= user_activity_id %>">
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img" style="max-width: 580px;" id="reply_to_content_<%= reply.id %>">
|
||||
<%= reply.notes.html_safe %></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
|
|
@ -77,6 +77,11 @@
|
|||
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||
<ul>
|
||||
<% activity.children.reorder("created_on desc").each do |reply|%>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= reply.id %>');
|
||||
});
|
||||
</script>
|
||||
<% replies_all_i=replies_all_i+1 %>
|
||||
<li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i>3 ? 'none' : '' %>">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
|
@ -91,7 +96,7 @@
|
|||
<% end %>
|
||||
<%= format_time(reply.created_on) %>
|
||||
</div>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img" id="reply_content_<%= user_activity_id %>">
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img" id="reply_content_<%= reply.id %>">
|
||||
<%= reply.content.html_safe %>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -102,6 +107,7 @@
|
|||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if !activity.locked? && authorize_for_course('messages', 'reply') %>
|
||||
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
|
||||
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %></div>
|
||||
<div class="homepagePostReplyInputContainer mb10">
|
||||
|
@ -121,5 +127,6 @@
|
|||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -46,6 +46,11 @@
|
|||
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||
<ul>
|
||||
<% activity.comments.reorder("created_on desc").each do |comment| %>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= comment.id %>');
|
||||
});
|
||||
</script>
|
||||
<% replies_all_i = replies_all_i + 1 %>
|
||||
<li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i > 3 ? 'none' : '' %>">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
|
@ -60,7 +65,7 @@
|
|||
<% end %>
|
||||
<%= format_time(comment.created_on) %>
|
||||
</div>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img" id="reply_content_<%= user_activity_id %>">
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img" id="reply_content_<%= comment.id %>">
|
||||
<%= comment.comments.html_safe %></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -83,6 +83,11 @@
|
|||
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||
<ul>
|
||||
<% activity.journals.reorder("created_on desc").each do |reply| %>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= reply.id %>');
|
||||
});
|
||||
</script>
|
||||
<% replies_all_i=replies_all_i + 1 %>
|
||||
<li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i>3 ? 'none' : '' %>">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
|
@ -97,7 +102,7 @@
|
|||
<% end %>
|
||||
<%= format_time(reply.created_on) %>
|
||||
</div>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img" id="reply_content_<%= user_activity_id %>">
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img" id="reply_content_<%= reply.id %>">
|
||||
<% if reply.details.any? %>
|
||||
<% details_to_strings(reply.details).each do |string| %>
|
||||
<p><%= string %></p>
|
||||
|
|
|
@ -60,6 +60,11 @@
|
|||
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||
<ul>
|
||||
<% activity.children.reorder("created_on desc").each do |reply| %>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= reply.id %>');
|
||||
});
|
||||
</script>
|
||||
<% replies_all_i=replies_all_i+1 %>
|
||||
<li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i>3 ? 'none' : '' %>">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
|
@ -74,7 +79,7 @@
|
|||
<% end %>
|
||||
<%= format_time(reply.created_on) %>
|
||||
</div>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img" id="reply_content_<%= user_activity_id %>">
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img" id="reply_content_<%= reply.id %>">
|
||||
<%= reply.content.html_safe %></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -37,27 +37,8 @@
|
|||
}
|
||||
|
||||
$(function() {
|
||||
init_activity_KindEditor_data(<%= user_activity.id%>,null,"87%");
|
||||
var description_images=$("div#activity_description_<%= user_activity.id %>").find("img");
|
||||
if (description_images.length>0) {
|
||||
for (var i=0; i<description_images.length; i++){
|
||||
var image=$(description_images[i]);
|
||||
var element=$("<a></a>").attr("href",image.attr('src'));
|
||||
image.wrap(element);
|
||||
}
|
||||
}
|
||||
$('#activity_description_<%= user_activity.id %> a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false});
|
||||
|
||||
var reply_images=$("div#reply_content_<%= user_activity.id %>").find("img");
|
||||
if (reply_images.length>0) {
|
||||
for (var i=0; i<reply_images.length; i++){
|
||||
var image=$(reply_images[i]);
|
||||
var element=$("<a></a>").attr("href",image.attr('src'));
|
||||
image.wrap(element);
|
||||
}
|
||||
}
|
||||
$('#reply_content_<%= user_activity.id %> a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false});
|
||||
|
||||
init_activity_KindEditor_data(<%= user_activity.id%>, null, "87%");
|
||||
showNormalImage('activity_description_<%= user_activity.id %>');
|
||||
});
|
||||
</script>
|
||||
<% act= user_activity.act unless user_activity.act_type == "ProjectCreateInfo" %>
|
||||
|
|
Loading…
Reference in New Issue