Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
N
NAP-wordpress
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Marwa Sfari
NAP-wordpress
Commits
dcfb8e69
Commit
dcfb8e69
authored
Jul 19, 2017
by
imac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update]Product : Add image for format
parent
597ac810
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
3 deletions
+28
-3
main.css
wp-content/themes/nap/assets/css/main.css
+5
-0
product.js
wp-content/themes/nap/assets/js/product.js
+23
-3
No files found.
wp-content/themes/nap/assets/css/main.css
View file @
dcfb8e69
...
...
@@ -1077,6 +1077,11 @@ aside.news-wrapper {
.list-format
li
.disabled
{
color
:
rgba
(
26
,
26
,
26
,
0.2
);
}
.list-format
li
.disabled
img
{
-webkit-filter
:
grayscale
(
100%
);
filter
:
grayscale
(
100%
);
opacity
:
0.4
;
}
.list
li
.selected
>
span
:first-child::after
{
content
:
''
;
height
:
14px
;
...
...
wp-content/themes/nap/assets/js/product.js
View file @
dcfb8e69
...
...
@@ -39,7 +39,7 @@ $.fn.getListFormat = function(){
formatWrapper
.
css
({
'height'
:
formatH
,
'width'
:
formatW
});
})
}
$
.
fn
.
selectColor
Format
=
function
(){
$
.
fn
.
selectColor
=
function
(){
$
(
this
).
on
(
'click'
,
function
(){
$
(
this
).
parent
().
parent
().
find
(
'li'
).
removeClass
(
'selected'
);
if
(
!
(
$
(
this
).
hasClass
(
'disabled'
))){
...
...
@@ -47,6 +47,25 @@ $.fn.selectColorFormat = function(){
}
})
}
$
.
fn
.
selectFormat
=
function
(){
$
(
this
).
on
(
'click'
,
function
(){
var
actifImage
=
$
(
this
).
find
(
'img'
).
data
(
'img-active'
),
initialImage
=
$
(
this
).
find
(
'img'
).
data
(
'img'
);
$
(
this
).
parent
().
parent
().
find
(
'li'
).
each
(
function
(){
img
=
$
(
this
).
find
(
'img'
);
img
.
attr
(
'src'
,
img
.
data
(
'img'
));
})
$
(
this
).
parent
().
parent
().
find
(
'li'
).
removeClass
(
'selected'
);
if
(
!
(
$
(
this
).
hasClass
(
'disabled'
))){
$
(
this
).
toggleClass
(
'selected'
);
}
if
(
$
(
this
).
hasClass
(
'selected'
)){
$
(
this
).
find
(
'img'
).
attr
(
'src'
,
actifImage
);
}
else
{
$
(
this
).
find
(
'img'
).
attr
(
'src'
,
initialImage
);
}
})
}
$
.
fn
.
slider_product
=
function
(){
$
(
'#slides'
).
not
(
'.slick-initialized'
).
slick
({
autoplay
:
false
,
...
...
@@ -113,8 +132,9 @@ $('.product-list article img, .product-list article ul li').on('click', function
$
(
'.load-page'
).
parent
().
addClass
(
'active'
);
$
(
'.load-page'
).
load
(
toLink
,
function
(){
$
(
'.list-color li'
).
getListColors
();
$
(
'.list-format li'
).
getListFormat
();
$
(
'.list li'
).
selectColorFormat
();
//$('.list-format li').getListFormat();
$
(
'.list-color li'
).
selectColor
();
$
(
'.list-format li'
).
selectFormat
();
$
(
'#zoom'
).
zoom
();
$
(
'article[data-color], .list-color li span'
).
selectSlide
(
$
(
'#slides'
));
$
(
'#mozaique'
).
open_gallery
();
...
...
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