|
@@ -29,6 +29,7 @@ class UserInfo extends Page { |
|
@@ -29,6 +29,7 @@ class UserInfo extends Page { |
29
|
$cityText: $('.city-text'),
|
29
|
$cityText: $('.city-text'),
|
30
|
$userPic: $('.user-pic'),
|
30
|
$userPic: $('.user-pic'),
|
31
|
$noDate: $('.inp.modify[type!=date]'),
|
31
|
$noDate: $('.inp.modify[type!=date]'),
|
|
|
32
|
+ $bottomOut: $('.bottom-out')
|
32
|
};
|
33
|
};
|
33
|
|
34
|
|
34
|
this.view = {
|
35
|
this.view = {
|
|
@@ -82,6 +83,9 @@ class UserInfo extends Page { |
|
@@ -82,6 +83,9 @@ class UserInfo extends Page { |
82
|
this.selector.$chosenCity.on('DOMNodeInserted', this.modifyInp.bind(this));
|
83
|
this.selector.$chosenCity.on('DOMNodeInserted', this.modifyInp.bind(this));
|
83
|
this.selector.$userPic.on('click', this.userPic.bind(this));
|
84
|
this.selector.$userPic.on('click', this.userPic.bind(this));
|
84
|
this.selector.$modifyInp.on('click', this.closeCitySwiper.bind(this));
|
85
|
this.selector.$modifyInp.on('click', this.closeCitySwiper.bind(this));
|
|
|
86
|
+ this.selector.$bottomOut.on('focus', this.keepOut.bind(this));
|
|
|
87
|
+ this.selector.$bottomOut.on('blur', this.restore.bind(this));
|
|
|
88
|
+
|
85
|
if (yoho.isApp) {
|
89
|
if (yoho.isApp) {
|
86
|
this.selector.$modifyInp.on('change', this.modifyInp.bind(this));
|
90
|
this.selector.$modifyInp.on('change', this.modifyInp.bind(this));
|
87
|
} else {
|
91
|
} else {
|
|
@@ -98,6 +102,25 @@ class UserInfo extends Page { |
|
@@ -98,6 +102,25 @@ class UserInfo extends Page { |
98
|
}
|
102
|
}
|
99
|
}
|
103
|
}
|
100
|
|
104
|
|
|
|
105
|
+ keepOut(e) {
|
|
|
106
|
+ let $this = $(e.currentTarget);
|
|
|
107
|
+
|
|
|
108
|
+ $('body').css({
|
|
|
109
|
+ height: $(window).height() + $this.offset().top * 2 / 3
|
|
|
110
|
+ });
|
|
|
111
|
+
|
|
|
112
|
+ $(document).scrollTop($this.offset().top * 2 / 3);
|
|
|
113
|
+ }
|
|
|
114
|
+
|
|
|
115
|
+ restore() {
|
|
|
116
|
+
|
|
|
117
|
+ $('body').css({
|
|
|
118
|
+ height: $(window).height()
|
|
|
119
|
+ });
|
|
|
120
|
+
|
|
|
121
|
+ $(document).scrollTop(0);
|
|
|
122
|
+ }
|
|
|
123
|
+
|
101
|
userPic() {
|
124
|
userPic() {
|
102
|
if (yoho.isApp) {
|
125
|
if (yoho.isApp) {
|
103
|
yoho.ready(() => {
|
126
|
yoho.ready(() => {
|