课程讨论区添加展开、收缩

dev_hjq
huang 10 years ago
parent dc77eb6ef6
commit 2efcb5b89a

@ -42,15 +42,21 @@
$(function () { $(function () {
init_activity_KindEditor_data(<%= topic.id%>, null, "87%"); init_activity_KindEditor_data(<%= topic.id%>, null, "87%");
showNormalImage('activity_description_<%= topic.id %>'); showNormalImage('activity_description_<%= topic.id %>');
/*var description_images=$("div#activity_description_<%#= topic.id %>").find("img"); if($("#intro_content_<%= topic.id %>").height() > 360) {
if (description_images.length>0) { $("#intro_content_show_<%= topic.id %>").show();
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);
} }
} $("#intro_content_show_<%= topic.id %>").click(function(){
$('#activity_description_<%#= topic.id %> a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false});*/ $("#activity_description_<%= topic.id %>").toggleClass("maxh360");
$("#activity_description_<%= topic.id%>").toggleClass("lh18");
$("#intro_content_show_<%= topic.id %>").hide();
$("#intro_content_hide_<%= topic.id %>").show();
});
$("#intro_content_hide_<%= topic.id %>").click(function(){
$("#activity_description_<%= topic.id %>").toggleClass("maxh360");
$("#activity_description_<%= topic.id%>").toggleClass("lh18");
$("#intro_content_hide_<%= topic.id %>").hide();
$("#intro_content_show_<%= topic.id %>").show();
});
}); });
</script> </script>
<% if topic %> <% if topic %>

@ -959,5 +959,5 @@ span.at {color:#269ac9;}
.orgSendSearch {border:1px solid #dddddd; outline:none; width:262px; height:22px; padding-left:10px; float:left;} .orgSendSearch {border:1px solid #dddddd; outline:none; width:262px; height:22px; padding-left:10px; float:left;}
/*文本描述展开高度*/ /*文本描述展开高度*/
.maxh360 {max-height: 760px;} .maxh360 {max-height: 810px;}
.lh18 { line-height: 18px;} .lh18 { line-height: 18px;}
Loading…
Cancel
Save