Authored by weiguang.xie

Merge branch 'fix/issue' into 'develop'

优化 购物车页面 checkbox 和 删除按钮位置

See merge request !65
... ... @@ -32,6 +32,7 @@ var $chosePanel = $('#chose-panel'),
queryString,
$yohoPage = $('.yoho-page');
//初始化购物车面板显示
function init() {
hasChooseColor = false;
... ... @@ -60,7 +61,19 @@ function checkColorSizeNum() {
return true;
}
function show(html, cb) {
var scrollPosition = [
document.documentElement.scrollLeft || document.body.scrollLeft,
document.documentElement.scrollTop || document.body.scrollTop
],
$html = $('html'); // it would make more sense to apply this to body, but IE7 won't have that
$html.data('scroll-position', scrollPosition);
$html.data('previous-overflow', $html.css('overflow'));
$html.css('overflow', 'hidden');
window.scrollTo(scrollPosition[0], scrollPosition[1]);
if (html) {
$chosePanel.html(html);
if ($('#promotionId').val() !== '') {
... ... @@ -76,6 +89,12 @@ function show(html, cb) {
//隐藏当前Panel
function hide() {
var $html = $('html'),
scrollPosition = $html.data('scroll-position');
// un-lock scroll position
$html.css('overflow', $html.data('previous-overflow'));
window.scrollTo(scrollPosition[0], scrollPosition[1]);
$('.chose-panel').hide();
}
... ...
... ... @@ -15,7 +15,7 @@
position: absolute;
top: 50%;
margin-top: -14rem / $pxConvertRem;
margin-left: 20rem / $pxConvertRem;
margin-left: 8rem / $pxConvertRem;
font-size: 28rem / $pxConvertRem;
&.icon-cb-checked {
... ... @@ -170,7 +170,7 @@
}
.icon-del {
right: 14rem / $pxConvertRem;
right: 20rem / $pxConvertRem;
}
.icon-edit {
... ...