|
|
@ -7,21 +7,26 @@ app.directive('iphoneRecognize',["$timeout",function(timer){
|
|
|
|
scope: {},
|
|
|
|
scope: {},
|
|
|
|
link: function(scope, element){
|
|
|
|
link: function(scope, element){
|
|
|
|
timer(function(){
|
|
|
|
timer(function(){
|
|
|
|
var userAgent = navigator.userAgent;
|
|
|
|
|
|
|
|
var contentHeight = $(".post-container").height();
|
|
|
|
var contentHeight = $(".post-container").height();
|
|
|
|
if (/ipad|iphone|mac/i.test(navigator.userAgent)){
|
|
|
|
var toBottom = function(){
|
|
|
|
$("#postInput1").bind('focus',function(){
|
|
|
|
|
|
|
|
element.css({"position":"relative","padding":"1px 0"});
|
|
|
|
element.css({"position":"relative","padding":"1px 0"});
|
|
|
|
$(".post-wrapper").css("margin-bottom","0");
|
|
|
|
$(".post-wrapper").css("marginBottom","0");
|
|
|
|
$("#all_homework_reply").css("margin-bottom","0");
|
|
|
|
$("#all_homework_reply").css("marginBottom","0");
|
|
|
|
window.scrollTo(0,contentHeight);
|
|
|
|
window.scrollTo(0,contentHeight);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
$("#postInput1").bind('blur',function(){
|
|
|
|
if (/ipad|iphone|mac/i.test(navigator.userAgent)){
|
|
|
|
element.css("position","fixed");
|
|
|
|
$("#postInput1").bind('focus',function(){
|
|
|
|
$(".post-wrapper").css("margin-bottom","10px");
|
|
|
|
toBottom();
|
|
|
|
$("#all_homework_reply").css("margin-bottom","50px");
|
|
|
|
});
|
|
|
|
});
|
|
|
|
$("#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");
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|