Authored by hf

code review by hf: merge zhangzhen code to fixes home floor bugs

@@ -2185,24 +2185,12 @@ var $searchBox = $('.search-box'), @@ -2185,24 +2185,12 @@ var $searchBox = $('.search-box'),
2185 $box = $('.box'), 2185 $box = $('.box'),
2186 $indexSearch = $('.index-search'), 2186 $indexSearch = $('.index-search'),
2187 $indexLogo = $('.index-logo'), 2187 $indexLogo = $('.index-logo'),
2188 - $channelLink = $('.index-channel a'),  
2189 - $win = $(window),  
2190 - $doc = $(document),  
2191 - $appFloatLayer = $('#float-layer-app'); 2188 + $channelLink = $('.index-channel a');
2192 2189
2193 var $search = $searchBox.children('input[type="text"]'), 2190 var $search = $searchBox.children('input[type="text"]'),
2194 $cancelSearch = $box.children('.no-search'), 2191 $cancelSearch = $box.children('.no-search'),
2195 $searchIcon = $searchBox.children('.search-icon'); 2192 $searchIcon = $searchBox.children('.search-icon');
2196 2193
2197 -// variables for calculate the app download layer position  
2198 -var layerInit = false,  
2199 - windowViewHeight = 0,  
2200 - layerContentHeight = $appFloatLayer.height(),  
2201 - layerPaddingTop = parseInt($appFloatLayer.css('padding-top')),  
2202 - layerPaddingBottom = parseInt($appFloatLayer.css('padding-bottom')),  
2203 - layerHeight = layerContentHeight + layerPaddingTop + layerPaddingBottom,  
2204 - layerNewPos;  
2205 -  
2206 require("js/common"); 2194 require("js/common");
2207 2195
2208 $search.on('focus', function() { 2196 $search.on('focus', function() {
@@ -2257,43 +2245,6 @@ $channelLink.on('touchstart', function() { @@ -2257,43 +2245,6 @@ $channelLink.on('touchstart', function() {
2257 }); 2245 });
2258 }); 2246 });
2259 2247
2260 -  
2261 -function updateLayerPosition() {  
2262 - var winHeight = window.innerHeight,  
2263 - bodyHeight = $doc.height(),  
2264 - scrollTopPosition = $win.scrollTop();  
2265 -  
2266 - if (layerInit) {  
2267 -  
2268 - //keyboard is shown  
2269 - if (windowViewHeight - winHeight > 200) {  
2270 - if (scrollTopPosition + windowViewHeight + layerHeight >= bodyHeight) {  
2271 - layerNewPos = 0;  
2272 - } else {  
2273 - layerNewPos = bodyHeight - windowViewHeight - scrollTopPosition - layerHeight;  
2274 - }  
2275 - } else {  
2276 - layerNewPos = bodyHeight - winHeight - scrollTopPosition;  
2277 - }  
2278 -  
2279 - } else {  
2280 - windowViewHeight = winHeight;  
2281 - layerNewPos = bodyHeight - winHeight - scrollTopPosition + layerHeight;  
2282 - layerInit = true;  
2283 - }  
2284 -  
2285 - $appFloatLayer.css({  
2286 - position: 'relative',  
2287 - bottom: layerNewPos + 'px'  
2288 - });  
2289 -}  
2290 -  
2291 -$(window).scroll(function() {  
2292 - window.requestAnimationFrame(updateLayerPosition);  
2293 -});  
2294 -  
2295 -$doc.on('ready', updateLayerPosition);  
2296 -  
2297 }); 2248 });
2298 define("js/passport/entry", ["jquery"], function(require, exports, module){ 2249 define("js/passport/entry", ["jquery"], function(require, exports, module){
2299 /** 2250 /**
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.