课程讨论区的展开更多不可用
This commit is contained in:
parent
c230ff5bed
commit
a7c006c59f
|
@ -1,20 +1,3 @@
|
||||||
<%= content_for(:header_tags) do %>
|
|
||||||
<%= import_ke(enable_at: false, prettify: false) %>
|
|
||||||
<%= javascript_include_tag "init_activity_KindEditor" %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<style type="text/css">
|
|
||||||
/*回复框*/
|
|
||||||
.homepagePostReplyInputContainer .ke-toolbar {display: none; width: 400px; border: none; background: none; padding: 0px 0px;}
|
|
||||||
.homepagePostReplyInputContainer .ke-toolbar-icon {line-height: 26px; font-size: 14px; padding-left: 26px;}
|
|
||||||
.homepagePostReplyInputContainer .ke-toolbar-icon-url {background-image: url(/images/public_icon.png)}
|
|
||||||
.homepagePostReplyInputContainer .ke-outline {padding: 0px 0px; line-height: 26px; font-size: 14px;}
|
|
||||||
.homepagePostReplyInputContainer .ke-icon-emoticons {background-position: 0px -671px; width: 50px; height: 26px;}
|
|
||||||
.homepagePostReplyInputContainer .ke-icon-emoticons:hover {background-position: -79px -671px; width: 50px; height: 26px;}
|
|
||||||
.homepagePostReplyInputContainer .ke-outline {border: none;}
|
|
||||||
.homepagePostReplyInputContainer .ke-inline-block {display: none;}
|
|
||||||
.homepagePostReplyInputContainer .ke-container {float: left;}
|
|
||||||
</style>
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function(){
|
$(function(){
|
||||||
$("#RSide").removeAttr("id");
|
$("#RSide").removeAttr("id");
|
||||||
|
@ -45,61 +28,8 @@
|
||||||
<% if User.current.logged? %>
|
<% if User.current.logged? %>
|
||||||
<%= labelled_form_for @message, :url =>{:controller=>'messages',:action => 'new', :board_id => @board.id, :is_board => 'true'},
|
<%= labelled_form_for @message, :url =>{:controller=>'messages',:action => 'new', :board_id => @board.id, :is_board => 'true'},
|
||||||
:html => {:nhname=>'form',:multipart => true, :id => 'message-form'} do |f| %>
|
:html => {:nhname=>'form',:multipart => true, :id => 'message-form'} do |f| %>
|
||||||
<%= render :partial => 'course_new', :locals => {:f => f, :topic => @message, :edit_mode => false, :course => course} %>
|
<%= render :partial => 'course_new', :locals => {:f => f, :topic => @message, :edit_mode => false, :course => @board.course} %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<%= render :partial=> 'course_show_detail',:locals =>{:topics => @topics, :page => 0} %>
|
||||||
<% if topics%>
|
|
||||||
<% topics.each do |topic| %>
|
|
||||||
<script>
|
|
||||||
function expand_reply(container, btnid) {
|
|
||||||
var target = $(container);
|
|
||||||
var btn = $(btnid);
|
|
||||||
if (btn.data('init') == '0') {
|
|
||||||
btn.data('init', 1);
|
|
||||||
btn.html('收起回复');
|
|
||||||
target.show();
|
|
||||||
} else {
|
|
||||||
btn.data('init', 0);
|
|
||||||
btn.html('展开更多');
|
|
||||||
target.hide();
|
|
||||||
target.eq(0).show();
|
|
||||||
target.eq(1).show();
|
|
||||||
target.eq(2).show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function expand_reply_input(id) {
|
|
||||||
$(id).toggle();
|
|
||||||
}
|
|
||||||
|
|
||||||
$(function () {
|
|
||||||
init_activity_KindEditor_data(<%= topic.id%>, null, "87%");
|
|
||||||
showNormalImage('activity_description_<%= 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++){
|
|
||||||
var image=$(description_images[i]);
|
|
||||||
var element=$("<a></a>").attr("href",image.attr('src'));
|
|
||||||
image.wrap(element);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$('#activity_description_<%#= topic.id %> a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false});*/
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<% if topic %>
|
|
||||||
<%= render :partial => 'users/course_message', :locals => {:activity => topic, :user_activity_id => topic.id} %>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% if topics.count == 10 %>
|
|
||||||
<div id="show_more_course_topic" class="loadMore mt10 f_grey">展开更多<%= link_to "", boards_topic_path(@board, :course_id => @board.course.id ,:page => page), :id => "more_topic_link", :remote => "true", :class => "none" %></div>
|
|
||||||
<% end %>
|
|
||||||
<% end%>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
$("#show_more_course_topic").mouseover(function () {
|
|
||||||
$("#more_topic_link").click();
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
|
@ -0,0 +1,70 @@
|
||||||
|
<%= content_for(:header_tags) do %>
|
||||||
|
<%= import_ke(enable_at: false, prettify: false) %>
|
||||||
|
<%= javascript_include_tag "init_activity_KindEditor" %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<style type="text/css">
|
||||||
|
/*回复框*/
|
||||||
|
.homepagePostReplyInputContainer .ke-toolbar {display: none; width: 400px; border: none; background: none; padding: 0px 0px;}
|
||||||
|
.homepagePostReplyInputContainer .ke-toolbar-icon {line-height: 26px; font-size: 14px; padding-left: 26px;}
|
||||||
|
.homepagePostReplyInputContainer .ke-toolbar-icon-url {background-image: url(/images/public_icon.png)}
|
||||||
|
.homepagePostReplyInputContainer .ke-outline {padding: 0px 0px; line-height: 26px; font-size: 14px;}
|
||||||
|
.homepagePostReplyInputContainer .ke-icon-emoticons {background-position: 0px -671px; width: 50px; height: 26px;}
|
||||||
|
.homepagePostReplyInputContainer .ke-icon-emoticons:hover {background-position: -79px -671px; width: 50px; height: 26px;}
|
||||||
|
.homepagePostReplyInputContainer .ke-outline {border: none;}
|
||||||
|
.homepagePostReplyInputContainer .ke-inline-block {display: none;}
|
||||||
|
.homepagePostReplyInputContainer .ke-container {float: left;}
|
||||||
|
</style>
|
||||||
|
<% if topics%>
|
||||||
|
<% topics.each do |topic| %>
|
||||||
|
<script>
|
||||||
|
function expand_reply(container, btnid) {
|
||||||
|
var target = $(container);
|
||||||
|
var btn = $(btnid);
|
||||||
|
if (btn.data('init') == '0') {
|
||||||
|
btn.data('init', 1);
|
||||||
|
btn.html('收起回复');
|
||||||
|
target.show();
|
||||||
|
} else {
|
||||||
|
btn.data('init', 0);
|
||||||
|
btn.html('展开更多');
|
||||||
|
target.hide();
|
||||||
|
target.eq(0).show();
|
||||||
|
target.eq(1).show();
|
||||||
|
target.eq(2).show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function expand_reply_input(id) {
|
||||||
|
$(id).toggle();
|
||||||
|
}
|
||||||
|
|
||||||
|
$(function () {
|
||||||
|
init_activity_KindEditor_data(<%= topic.id%>, null, "87%");
|
||||||
|
showNormalImage('activity_description_<%= 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++){
|
||||||
|
var image=$(description_images[i]);
|
||||||
|
var element=$("<a></a>").attr("href",image.attr('src'));
|
||||||
|
image.wrap(element);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$('#activity_description_<%#= topic.id %> a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false});*/
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<% if topic %>
|
||||||
|
<%= render :partial => 'users/course_message', :locals => {:activity => topic, :user_activity_id => topic.id} %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<% if topics.count == 10 %>
|
||||||
|
<div id="show_more_course_topic" class="loadMore mt10 f_grey">展开更多<%= link_to "", boards_topic_path(@board, :course_id => @board.course.id ,:page => page), :id => "more_topic_link", :remote => "true", :class => "none" %></div>
|
||||||
|
<% end %>
|
||||||
|
<% end%>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$("#show_more_course_topic").mouseover(function () {
|
||||||
|
$("#more_topic_link").click();
|
||||||
|
});
|
||||||
|
</script>
|
|
@ -1 +1 @@
|
||||||
$("#show_more_course_topic").replaceWith("<%= escape_javascript( render :partial => 'boards/course_show',:locals => {:topics => @topics, :page => @page} )%>");
|
$("#show_more_course_topic").replaceWith("<%= escape_javascript( render :partial => 'boards/course_show_detail',:locals => {:topics => @topics, :page => @page} )%>");
|
Loading…
Reference in New Issue