diff --git a/public/assets/wechat/blog_detail.html b/public/assets/wechat/blog_detail.html index daeec493d..2d11b5964 100644 --- a/public/assets/wechat/blog_detail.html +++ b/public/assets/wechat/blog_detail.html @@ -25,7 +25,7 @@
{{blog.praise_count}}
{{blog.praise_count}}
-
+
回复 {{blog.comment_count}}
diff --git a/public/assets/wechat/course_discussion.html b/public/assets/wechat/course_discussion.html index 78a3fa0b7..2395129c3 100644 --- a/public/assets/wechat/course_discussion.html +++ b/public/assets/wechat/course_discussion.html @@ -24,7 +24,7 @@
{{discussion.praise_count}}
{{discussion.praise_count}}
-
+
回复 {{discussion.comment_count}}
diff --git a/public/assets/wechat/course_notice.html b/public/assets/wechat/course_notice.html index af9f22da1..85b3a901a 100644 --- a/public/assets/wechat/course_notice.html +++ b/public/assets/wechat/course_notice.html @@ -23,7 +23,7 @@
{{news.praise_count}}
{{news.praise_count}}
-
+
回复 {{news.comment_count}}
diff --git a/public/assets/wechat/homework_detail.html b/public/assets/wechat/homework_detail.html index 6ead09e69..7fa8459c4 100644 --- a/public/assets/wechat/homework_detail.html +++ b/public/assets/wechat/homework_detail.html @@ -28,7 +28,7 @@
{{homework.praise_count}}
{{homework.praise_count}}
-
+
回复 {{homework.comment_count}}
diff --git a/public/assets/wechat/issue_detail.html b/public/assets/wechat/issue_detail.html index c10d15ddb..efc7ed64d 100644 --- a/public/assets/wechat/issue_detail.html +++ b/public/assets/wechat/issue_detail.html @@ -29,7 +29,7 @@
{{issue.praise_count}}
{{issue.praise_count}}
-
+
回复 {{issue.comment_count}}
diff --git a/public/assets/wechat/jour_message_detail.html b/public/assets/wechat/jour_message_detail.html index 41f7290e5..e2e65ca58 100644 --- a/public/assets/wechat/jour_message_detail.html +++ b/public/assets/wechat/jour_message_detail.html @@ -23,7 +23,7 @@
{{message.praise_count}}
{{message.praise_count}}
-
+
回复 {{message.comment_count}}
diff --git a/public/assets/wechat/project_discussion.html b/public/assets/wechat/project_discussion.html index 4557ba55f..30d464802 100644 --- a/public/assets/wechat/project_discussion.html +++ b/public/assets/wechat/project_discussion.html @@ -24,7 +24,7 @@
{{discussion.praise_count}}
{{discussion.praise_count}}
-
+
回复 {{discussion.comment_count}}
diff --git a/public/javascripts/wechat/directives/iphone_recognize.js b/public/javascripts/wechat/directives/iphone_recognize.js index 66014e71a..46d4a4292 100644 --- a/public/javascripts/wechat/directives/iphone_recognize.js +++ b/public/javascripts/wechat/directives/iphone_recognize.js @@ -7,21 +7,26 @@ app.directive('iphoneRecognize',["$timeout",function(timer){ scope: {}, link: function(scope, element){ timer(function(){ - var userAgent = navigator.userAgent; var contentHeight = $(".post-container").height(); - if (/ipad|iphone|mac/i.test(navigator.userAgent)){ - $("#postInput1").bind('focus',function(){ + var toBottom = function(){ element.css({"position":"relative","padding":"1px 0"}); - $(".post-wrapper").css("margin-bottom","0"); - $("#all_homework_reply").css("margin-bottom","0"); + $(".post-wrapper").css("marginBottom","0"); + $("#all_homework_reply").css("marginBottom","0"); window.scrollTo(0,contentHeight); - }); - $("#postInput1").bind('blur',function(){ - element.css("position","fixed"); - $(".post-wrapper").css("margin-bottom","10px"); - $("#all_homework_reply").css("margin-bottom","50px"); - }); - } + } + if (/ipad|iphone|mac/i.test(navigator.userAgent)){ + $("#postInput1").bind('focus',function(){ + toBottom(); + }); + $("#postInput1,#replyBlock").bind("click",function(){ + toBottom(); + }); + $("#postInput1").bind('blur',function(){ + element.css("position","fixed"); + $(".post-wrapper").css("marginBottom","10px"); + $("#all_homework_reply").css("marginBottom","50px"); + }); + } }) } }