From f638dd6810eca5b95c541a3d042b78d42eb5c83f Mon Sep 17 00:00:00 2001 From: alanlong9278 <547533434@qq.com> Date: Fri, 8 May 2015 09:55:19 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E8=AE=A8=E8=AE=BA=E5=8C=BA?= =?UTF-8?q?=20Signed-off-by:=20alanlong9278=20<547533434@qq.com>?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/javascripts/course.js | 41 ++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/public/javascripts/course.js b/public/javascripts/course.js index c0c761bfa..cc57279f0 100644 --- a/public/javascripts/course.js +++ b/public/javascripts/course.js @@ -527,3 +527,44 @@ function search_tag_attachment(url,tag_name,q,course_id,sort) } ); } + +// 课程讨论区 +function showhelpAndScrollToMessage(id, id1, count) { + $('#' + id).toggle(); + if(cookieget("repositories_visiable") == "true") + { + cookiesave("repositories_visiable", false,'','',''); + } + else + { + cookiesave("repositories_visiable", true,'','',''); + } + var information = $(id1); + var val = information.attr("value"); + if(val=="show_help") + { + $(id1).text("收起回复(" + count + ")" ); + information.attr("value", "hide_help"); + } + else + { + $(id1).text("展开回复(" + count + ")"); + information.attr("value", "show_help"); + } +} +function show_more_reply(contentid, id2, id3) { + $(contentid).toggleClass("course_description_none"); + var information = $(id2); + var arrow = $(id3); + var val = information.attr("value"); + if (val == "show_more") { + $(id2).text("[收起]"); + information.attr("value", "hide_more"); + arrow.attr("src", "/images/jiantouup.jpg") + } + else { + $(id2).text("[展开]"); + information.attr("value", "show_more"); + arrow.attr("src", "/images/jiantou.jpg") + } +} \ No newline at end of file