From bd7cd7e24496b6e88e5e32e37e1ff02dd1db1dbe Mon Sep 17 00:00:00 2001 From: Tim Date: Tue, 6 Sep 2016 17:09:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=8C=E7=BA=A7=E5=9B=9E=E5=A4=8D=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E6=98=BE=E9=9A=90=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/wechat/blog_detail.html | 4 +-- public/assets/wechat/course_discussion.html | 4 +-- public/assets/wechat/course_notice.html | 4 +-- public/assets/wechat/homework_detail.html | 4 +-- public/assets/wechat/issue_detail.html | 4 +-- public/assets/wechat/jour_message_detail.html | 4 +-- public/assets/wechat/project_discussion.html | 4 +-- .../wechat/directives/multi_reply.js | 30 +++++++++---------- 8 files changed, 28 insertions(+), 30 deletions(-) diff --git a/public/assets/wechat/blog_detail.html b/public/assets/wechat/blog_detail.html index 3b97e7df4..e146f9a7e 100644 --- a/public/assets/wechat/blog_detail.html +++ b/public/assets/wechat/blog_detail.html @@ -73,11 +73,11 @@
{{journal.praise_count}}
{{journal.praise_count}}
-
+
-
+
diff --git a/public/assets/wechat/course_discussion.html b/public/assets/wechat/course_discussion.html index b574deff7..66bebb35c 100644 --- a/public/assets/wechat/course_discussion.html +++ b/public/assets/wechat/course_discussion.html @@ -71,11 +71,11 @@
{{journal.praise_count}}
{{journal.praise_count}}
-
+
-
+
diff --git a/public/assets/wechat/course_notice.html b/public/assets/wechat/course_notice.html index c7ffbd3d5..e3ef7c767 100644 --- a/public/assets/wechat/course_notice.html +++ b/public/assets/wechat/course_notice.html @@ -86,11 +86,11 @@
{{journal.praise_count}}
{{journal.praise_count}}
-
+
-
+
diff --git a/public/assets/wechat/homework_detail.html b/public/assets/wechat/homework_detail.html index c33090554..e8b3ed500 100644 --- a/public/assets/wechat/homework_detail.html +++ b/public/assets/wechat/homework_detail.html @@ -75,11 +75,11 @@
{{journal.praise_count}}
{{journal.praise_count}}
-
+
-
+
diff --git a/public/assets/wechat/issue_detail.html b/public/assets/wechat/issue_detail.html index 69e3138d6..9a7ad50bf 100644 --- a/public/assets/wechat/issue_detail.html +++ b/public/assets/wechat/issue_detail.html @@ -92,11 +92,11 @@
{{journal.praise_count}}
{{journal.praise_count}}
-
+
-
+
diff --git a/public/assets/wechat/jour_message_detail.html b/public/assets/wechat/jour_message_detail.html index 05fb4c6e9..25c8cebc5 100644 --- a/public/assets/wechat/jour_message_detail.html +++ b/public/assets/wechat/jour_message_detail.html @@ -70,11 +70,11 @@
{{journal.praise_count}}
{{journal.praise_count}}
-
+
-
+
diff --git a/public/assets/wechat/project_discussion.html b/public/assets/wechat/project_discussion.html index 1ae009927..234e496ea 100644 --- a/public/assets/wechat/project_discussion.html +++ b/public/assets/wechat/project_discussion.html @@ -71,11 +71,11 @@
{{journal.praise_count}}
{{journal.praise_count}}
-
+
-
+
diff --git a/public/javascripts/wechat/directives/multi_reply.js b/public/javascripts/wechat/directives/multi_reply.js index 92abe5d6c..6c4f1cccc 100644 --- a/public/javascripts/wechat/directives/multi_reply.js +++ b/public/javascripts/wechat/directives/multi_reply.js @@ -7,24 +7,22 @@ app.directive('multiReply',["$timeout",function(timer){ scope: {}, link: function(scope, element){ timer(function(){ - $(".reply-icons").each(function(){ - $(this).toggle(function(){ - var multiInput = $(this).next().next(); - multiInput.show(); - multiInput.focus(); + $(".reply-icons").live("click",function(){ + if($(this).hasClass("multi-hide")){ + $(".multi-input-container").addClass("undis"); + $(".reply-icons").addClass("multi-hide"); + $(this).next().next().removeClass("undis"); + $(this).next().next().focus(); + $(this).removeClass("multi-hide"); $(".post-reply-input").val(""); - $(multiInput).bind("focus",function(){ - $("#post_input_1").hide(); - }); - },function(){ - var multiInput = $(this).next().next(); - $(this).next().next().hide(); - $(this).next().next().blur(); + $("#post_input_1").hide(); + } + else{ + $(this).addClass("multi-hide"); + $(".post-input-container").addClass("undis"); $(".post-reply-input").val(""); - $(multiInput).bind("blur",function(){ - $("#post_input_1").show(); - }); - }); + $("#post_input_1, #post_input_1 .post-input-container").show(); + } }); }) }