iphone下输入框位置调整

This commit is contained in:
Tim 2016-08-22 16:50:14 +08:00
parent 4f3f6358fc
commit 863ec9d396
9 changed files with 25 additions and 7 deletions

View File

@ -39,6 +39,7 @@
<script src="/javascripts/wechat/directives/ellipsis.js"></script>
<script src="/javascripts/wechat/directives/input_focus.js"></script>
<script src="/javascripts/wechat/directives/at_delete_link.js"></script>
<script src="/javascripts/wechat/directives/iphone_recognize.js"></script>
<script src="/javascripts/wechat/controllers/reg.js"></script>
<script src="/javascripts/wechat/controllers/login.js"></script>
<script src="/javascripts/wechat/controllers/activity.js"></script>

View File

@ -69,7 +69,7 @@
</div>
</div>
<div ng-if="!blog.locked" id="post_input_1" class="post-input-wrap post-box-shadow">
<div ng-if="!blog.locked" id="post_input_1" class="post-input-wrap post-box-shadow" iphone-recognize>
<div class="post-reply-row border-bottom-none">
<div class="post-input-container">
<div class="copy-input-container"><textarea class="copy-input"></textarea></div>

View File

@ -66,7 +66,7 @@
</div>
</div>
<div ng-if="!discussion.locked" id="post_input_1" class="post-input-wrap post-box-shadow">
<div ng-if="!discussion.locked" id="post_input_1" class="post-input-wrap post-box-shadow" iphone-recognize>
<div class="post-reply-row border-bottom-none">
<div class="post-input-container">
<div class="copy-input-container"><textarea class="copy-input"></textarea></div>

View File

@ -46,7 +46,7 @@
</div>
</div>
<div id="post_input_1" class="post-input-wrap post-box-shadow">
<div id="post_input_1" class="post-input-wrap post-box-shadow" iphone-recognize>
<div class="post-reply-row border-bottom-none">
<div class="post-input-container">
<div class="copy-input-container"><textarea class="copy-input"></textarea></div>

View File

@ -70,7 +70,7 @@
</div>
</div>
<div id="post_input_1" class="post-input-wrap post-box-shadow">
<div id="post_input_1" class="post-input-wrap post-box-shadow" iphone-recognize>
<div class="post-reply-row border-bottom-none">
<div class="post-input-container">
<div class="copy-input-container"><textarea class="copy-input"></textarea></div>

View File

@ -52,7 +52,7 @@
</div>
</div>
<div id="post_input_1" class="post-input-wrap post-box-shadow">
<div id="post_input_1" class="post-input-wrap post-box-shadow" iphone-recognize>
<div class="post-reply-row border-bottom-none">
<div class="post-input-container">
<div class="copy-input-container"><textarea class="copy-input"></textarea></div>

View File

@ -65,7 +65,7 @@
</div>
</div>
<div id="post_input_1" class="post-input-wrap post-box-shadow">
<div id="post_input_1" class="post-input-wrap post-box-shadow" iphone-recognize>
<div class="post-reply-row border-bottom-none">
<div class="post-input-container">
<div class="copy-input-container"><textarea class="copy-input"></textarea></div>

View File

@ -65,7 +65,7 @@
<div id="more_reply" class="more-events mt10" ng-click="showMoreReply(0,discussion);">更多</div>
</div>
</div>
<div ng-if="!discussion.locked" id="post_input_1" class="post-input-wrap post-box-shadow">
<div ng-if="!discussion.locked" id="post_input_1" class="post-input-wrap post-box-shadow" iphone-recognize>
<div class="post-reply-row border-bottom-none">
<div class="post-input-container">
<div class="copy-input-container"><textarea class="copy-input"></textarea></div>

View File

@ -0,0 +1,17 @@
/**
* Created by ttang on 2016/8/22.
*/
app.directive('iphoneRecognize',function(){
return{
restrict: 'A',
scope: {},
link: function(scope, element){
var userAgent = navigator.userAgent;
if (/ipad|iphone|mac/i.test(navigator.userAgent)){
element.css({"position":"relative","padding":"1px 0"});
$(".post-wrapper").css("margin-bottom","0");
$("#all_homework_reply").css("margin-bottom","0");
}
}
}
});