Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
ptd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Quan Nguyen
ptd
Commits
56edec90
Commit
56edec90
authored
Sep 12, 2020
by
Chi Bui
👀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
edit frontend 12/09_02
parent
55a2ac58
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
25 deletions
+22
-25
styles.css
themes/contrib/estore/css/styles.css
+0
-2
custom.js
themes/contrib/estore/js/custom.js
+22
-23
No files found.
themes/contrib/estore/css/styles.css
View file @
56edec90
...
...
@@ -11546,11 +11546,9 @@ body.toolbar-loading.toolbar {
display
:
none
!important
;
}
}
.menu--category-menu.product.product-item
.open
.dropdown-menu
{
display
:
flex
!important
;
margin-top
:
3px
;
}
.middle-header-wrapper
.region-right-middle-header
.cart-block-wrapper
.cart-contents
:before
{
position
:
absolute
;
...
...
themes/contrib/estore/js/custom.js
View file @
56edec90
...
...
@@ -56,30 +56,29 @@ for (i = 0; i < acc.length; i++) {
if
(
checkHome
.
length
==
0
)
{
$
(
".menu.menu--category-menu.nav"
).
addClass
(
'hide-block'
);
$
(
".menu.menu--category-menu.nav"
).
addClass
(
'not-home'
);
}
else
{
}
else
{
$
(
".menu.menu--category-menu.nav"
).
addClass
(
'product-index'
)
}
function
menuSidebar
(){
function
menuSidebar
()
{
var
current
=
location
.
pathname
;
if
(
current
==
"/products"
)
{
if
(
current
==
"/products"
)
{
$
(
".menu.menu--category-menu.nav"
).
removeClass
(
'hide-block'
).
removeClass
(
'not-home'
).
addClass
(
'product'
);
$
(
".main-container"
).
height
(
$
(
".menu.menu--category-menu.nav"
).
height
()
+
110
);
}
else
if
(
current
.
length
>=
16
){
let
currentpathSlice
=
current
.
slice
(
0
,
17
);
if
(
currentpathSlice
==
"/product_category"
){
$
(
".main-container"
).
height
(
$
(
".menu.menu--category-menu.nav"
).
height
()
+
110
);
}
else
if
(
current
.
length
>=
16
)
{
let
currentpathSlice
=
current
.
slice
(
0
,
17
);
if
(
currentpathSlice
==
"/product_category"
)
{
$
(
".menu.menu--category-menu.nav"
).
removeClass
(
'hide-block'
).
removeClass
(
'not-home'
).
addClass
(
'product product-item'
);
$
(
".menu.menu--category-menu.nav li.active-trail"
).
addClass
(
'open'
);
$
(
".main-container"
).
height
(
$
(
".menu.menu--category-menu.nav"
).
height
()
+
110
)
;
$
(
".menu.menu--category-menu.nav li.active-trail"
).
addClass
(
'open'
);
$
(
".main-container"
).
css
({
"min-height"
:
$
(
".menu.menu--category-menu.nav"
).
height
()
+
50
,
"margin-bottom"
:
"50px"
})
;
}
if
(
currentpathSlice
==
"/search-products"
)
{
if
(
currentpathSlice
==
"/search-products"
)
{
$
(
".menu.menu--category-menu.nav"
).
removeClass
(
'hide-block'
).
removeClass
(
'not-home'
).
addClass
(
'product'
);
$
(
".main-container"
).
height
(
$
(
".menu.menu--category-menu.nav"
).
height
()
+
110
);
$
(
".main-container"
).
height
(
$
(
".menu.menu--category-menu.nav"
).
height
()
+
110
);
}
}
else
{
}
else
{
$
(
".region-middle-bottom-header input"
).
attr
(
"placeholder"
,
"Tìm kiếm"
);
if
(
$
(
window
).
width
()
>
991
)
{
var
submenu3
=
$
(
".sidebar-submenu-3"
);
...
...
@@ -133,14 +132,14 @@ $(".menu.menu--category-menu.nav li.active-trail").addClass('open');
// $(".region-middle-bottom-header button").text(" ")
var
textPrice
=
$
(
".field--name-price"
);
for
(
let
i
=
0
;
i
<
textPrice
.
length
;
i
++
)
{
let
price
=
textPrice
.
eq
(
i
).
text
();
cost
=
price
.
split
(
''
).
slice
(
0
,
1
).
join
(
""
);
if
(
cost
==
"0"
)
{
textPrice
.
eq
(
i
).
text
(
"Liên hệ"
);
}
for
(
let
i
=
0
;
i
<
textPrice
.
length
;
i
++
)
{
let
price
=
textPrice
.
eq
(
i
).
text
();
cost
=
price
.
split
(
''
).
slice
(
0
,
1
).
join
(
""
);
if
(
cost
==
"0"
)
{
textPrice
.
eq
(
i
).
text
(
"Liên hệ"
);
}
}
if
(
$
(
"article.commerce-product.full .field--name-price"
).
text
()
==
"Liên hệ"
)
{
if
(
$
(
"article.commerce-product.full .field--name-price"
).
text
()
==
"Liên hệ"
)
{
$
(
"article.commerce-product.full .product-right .field--name-variations button"
).
hide
();
$
(
"article.commerce-product.full .product-right .form-group.form-type-number"
).
hide
();
}
...
...
@@ -168,7 +167,7 @@ $(".menu.menu--category-menu.nav li.active-trail").addClass('open');
// console.log(numberInput);
numberInput
.
after
(
'<div class="button btn-inde">+</div>'
);
numberInput
.
before
(
'<div class="button btn-inde">-</div>'
);
$
(
'.btn-inde'
).
click
(
function
()
{
$
(
'.btn-inde'
).
click
(
function
()
{
var
$button
=
$
(
this
);
var
oldValue
=
$button
.
parent
().
find
(
"input"
).
val
();
...
...
@@ -176,7 +175,7 @@ $(".menu.menu--category-menu.nav li.active-trail").addClass('open');
if
(
$button
.
text
()
==
"+"
)
{
var
newVal
=
parseFloat
(
oldValue
)
+
1
;
}
else
{
// Don't allow decrementing below zero
// Don't allow decrementing below zero
if
(
oldValue
>
0
)
{
var
newVal
=
parseFloat
(
oldValue
)
-
1
;
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment