Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYWAP
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
hf
9 years ago
Commit
c42ad1ddef4ac5d2060bd28b9f30322f8958b95d
2 parents
100ca0e3
4028a0e1
Merge branch 'develop' of
http://git.dev.yoho.cn/web/yohobuy
into develop
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
2 deletions
static/js/cart/chose-panel.js
static/sass/cart/_good.scss
static/js/cart/chose-panel.js
View file @
c42ad1d
...
...
@@ -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
();
}
...
...
static/sass/cart/_good.scss
View file @
c42ad1d
...
...
@@ -15,7 +15,7 @@
position
:
absolute
;
top
:
50%
;
margin-top
:
-14rem
/
$pxConvertRem
;
margin-left
:
20
rem
/
$pxConvertRem
;
margin-left
:
8
rem
/
$pxConvertRem
;
font-size
:
28rem
/
$pxConvertRem
;
&
.icon-cb-checked
{
...
...
@@ -170,7 +170,7 @@
}
.icon-del
{
right
:
14
rem
/
$pxConvertRem
;
right
:
20
rem
/
$pxConvertRem
;
}
.icon-edit
{
...
...
Please
register
or
login
to post a comment