Merge branch 'weixin_guange' of https://git.trustie.net/jacknudt/trustieforge into weixin_guange

This commit is contained in:
yuanke 2016-08-30 14:08:23 +08:00
commit 4e312595fe
9 changed files with 25 additions and 19 deletions

View File

@ -25,7 +25,7 @@
<div ng-if="blog.praise_count && !blog.has_praise" ng-click="addPraise(blog);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{blog.praise_count}}</span></div>
<div ng-if="blog.has_praise" ng-click="decreasePraise(blog);"><img src="/images/wechat/w_praised.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{blog.praise_count}}</span></div>
</div>
<div class="fr mr25 f13" input-focus>
<div id="replyBlock" class="fr mr25 f13" input-focus>
<a ng-if="!blog.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">回复</span></a>
<a ng-if="blog.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">{{blog.comment_count}}</span></a>
</div>

View File

@ -24,7 +24,7 @@
<div ng-if="discussion.praise_count && !discussion.has_praise" ng-click="addPraise(discussion);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{discussion.praise_count}}</span></div>
<div ng-if="discussion.has_praise" ng-click="decreasePraise(discussion);"><img src="/images/wechat/w_praised.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{discussion.praise_count}}</span></div>
</div>
<div class="fr mr25 f13" input-focus>
<div id="replyBlock" class="fr mr25 f13" input-focus>
<a ng-if="!discussion.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">回复</span></a>
<a ng-if="discussion.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">{{discussion.comment_count}}</span></a>
</div>

View File

@ -23,7 +23,7 @@
<div ng-if="news.praise_count && !news.has_praise" ng-click="addPraise(news);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{news.praise_count}}</span></div>
<div ng-if="news.has_praise" ng-click="decreasePraise(news);"><img src="/images/wechat/w_praised.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{news.praise_count}}</span></div>
</div>
<div class="fr mr25 f13" input-focus>
<div id="replyBlock" class="fr mr25 f13" input-focus>
<a ng-if="!news.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">回复</span></a>
<a ng-if="news.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">{{news.comment_count}}</span></a>
</div>

View File

@ -28,7 +28,7 @@
<div ng-if="homework.praise_count && !homework.has_praise" ng-click="addPraise(homework);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{homework.praise_count}}</span></div>
<div ng-if="homework.has_praise" ng-click="decreasePraise(homework);"><img src="/images/wechat/w_praised.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{homework.praise_count}}</span></div>
</div>
<div class="fr mr25 f13" input-focus>
<div id="replyBlock" class="fr mr25 f13" input-focus>
<a ng-if="!homework.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">回复</span></a>
<a ng-if="homework.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">{{homework.comment_count}}</span></a>
</div>

View File

@ -29,7 +29,7 @@
<div ng-if="issue.praise_count && !issue.has_praise" ng-click="addPraise(discussion);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{issue.praise_count}}</span></div>
<div ng-if="issue.has_praise" ng-click="decreasePraise(issue);"><img src="/images/wechat/w_praised.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{issue.praise_count}}</span></div>
</div>
<div class="fr mr25 f13" input-focus>
<div id="replyBlock" class="fr mr25 f13" input-focus>
<a ng-if="!issue.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">回复</span></a>
<a ng-if="issue.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">{{issue.comment_count}}</span></a>
</div>

View File

@ -23,7 +23,7 @@
<div ng-if="message.praise_count && !message.has_praise" ng-click="addPraise(message);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{message.praise_count}}</span></div>
<div ng-if="message.has_praise" ng-click="decreasePraise(message);"><img src="/images/wechat/w_praised.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{message.praise_count}}</span></div>
</div>
<div class="fr mr25 f13" input-focus>
<div id="replyBlock" class="fr mr25 f13" input-focus>
<a ng-if="!message.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">回复</span></a>
<a ng-if="message.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">{{message.comment_count}}</span></a>
</div>

View File

@ -24,7 +24,7 @@
<div ng-if="discussion.praise_count && !discussion.has_praise" ng-click="addPraise(discussion);"><img src="/images/wechat/w_praise.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{discussion.praise_count}}</span></div>
<div ng-if="discussion.has_praise" ng-click="decreasePraise(discussion);"><img src="/images/wechat/w_praised.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span>{{discussion.praise_count}}</span></div>
</div>
<div class="fr mr25 f13" input-focus>
<div id="replyBlock" class="fr mr25 f13" input-focus>
<a ng-if="!discussion.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">回复</span></a>
<a ng-if="discussion.comment_count"><img src="/images/wechat/w_reply.png" width="20" style="vertical-align:top; margin-top:2px;" class="mr5" /><span style="vertical-align:top;">{{discussion.comment_count}}</span></a>
</div>

View File

@ -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");
});
}
})
}
}

View File

@ -111,6 +111,7 @@ app.factory('common', ['$http', 'auth', '$routeParams','rms','config','wx','$loc
}
var temp = data.comment.replace(/\n/g,'<br/>');
temp = temp.replaceAll("[^\\u0000-\\uFFFF]", "[表情]");
var userInfo = {
type: type,