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
ba4fc07d
Commit
ba4fc07d
authored
Aug 04, 2017
by
imac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update]Redmine - #644 : Add back URL of catalogue
parent
e8da88a1
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
19 deletions
+20
-19
main.css
wp-content/themes/nap/assets/css/main.css
+5
-5
main.js
wp-content/themes/nap/assets/js/main.js
+3
-1
product.js
wp-content/themes/nap/assets/js/product.js
+3
-6
simple.php
...mes/nap/woocommerce/single-product/add-to-cart/simple.php
+5
-3
variable.php
...s/nap/woocommerce/single-product/add-to-cart/variable.php
+4
-4
No files found.
wp-content/themes/nap/assets/css/main.css
View file @
ba4fc07d
...
...
@@ -277,11 +277,11 @@ II/ Helper..............Helper classes
transition
:
all
.6s
ease-in-out
;
}
.right-panel-wrapper.transition
{
-webkit-transition
:
all
1
.3
s
ease-in-out
;
-moz-transition
:
all
1
.3
s
ease-in-out
;
-o-transition
:
all
1
.3
s
ease-in-out
;
-ms-transition
:
all
1
.3
s
ease-in-out
;
transition
:
all
1
.3
s
ease-in-out
;
-webkit-transition
:
all
1s
ease-in-out
;
-moz-transition
:
all
1s
ease-in-out
;
-o-transition
:
all
1s
ease-in-out
;
-ms-transition
:
all
1s
ease-in-out
;
transition
:
all
1s
ease-in-out
;
}
.btn
{
cursor
:
pointer
;
...
...
wp-content/themes/nap/assets/js/main.js
View file @
ba4fc07d
...
...
@@ -45,8 +45,10 @@ $(function(){
})
//END get file name
//END load content page on left Panel
$
(
document
).
on
(
'click'
,
'.close-panel'
,
function
(
e
){
$
(
document
).
on
(
'click'
,
'.close-panel:not(.ext-link)'
,
function
(
e
){
e
.
preventDefault
();
$
(
'.load-page'
).
parent
().
removeClass
(
'active'
);
history
.
pushState
(
null
,
null
,
$
(
this
).
find
(
'a'
).
attr
(
'href'
));
$
(
'html'
).
css
(
'overflow'
,
'auto'
);
tlProduct
.
reverse
();
//$('.load-page').removeClass('fadeInUp').addClass('animated fadeOutUp');
...
...
wp-content/themes/nap/assets/js/product.js
View file @
ba4fc07d
...
...
@@ -74,8 +74,6 @@ $(function(){
}
})
}
$
.
fn
.
selectFormat
=
function
(){
$
(
this
).
on
(
'click'
,
function
(){
var
actifImage
=
$
(
this
).
find
(
'img'
).
data
(
'img-active'
),
...
...
@@ -158,9 +156,9 @@ $(function(){
$
(
'.format-label #format_0'
).
attr
(
'src'
,
activeImg
);
tlProduct
=
new
TimelineMax
();
tlProduct
.
fromTo
(
'.product-images'
,
0.
2
,{
autoAlpha
:
0
,
marginLeft
:
"-10%"
},{
autoAlpha
:
1
,
marginLeft
:
"0"
},
0
);
tlProduct
.
staggerFromTo
(
'.product-details .list'
,
0.
2
,{
opacity
:
0
,
marginLeft
:
"-10%"
},{
opacity
:
1
,
marginLeft
:
"0"
},
0.4
,
0.5
);
tlProduct
.
fromTo
(
'.product-info'
,
0.
2
,{
autoAlpha
:
0
,
marginLeft
:
"-10%"
},{
autoAlpha
:
1
,
marginLeft
:
"0"
},
1.2
);
tlProduct
.
fromTo
(
'.product-images'
,
0.
4
,{
autoAlpha
:
0
,
marginLeft
:
"-10%"
},{
autoAlpha
:
1
,
marginLeft
:
"0"
},
0
);
tlProduct
.
staggerFromTo
(
'.product-details .list'
,
0.
4
,{
opacity
:
0
,
marginLeft
:
"-10%"
},{
opacity
:
1
,
marginLeft
:
"0"
},
0.4
,
0.2
);
tlProduct
.
fromTo
(
'.product-info'
,
0.
4
,{
autoAlpha
:
0
,
marginLeft
:
"-10%"
},{
autoAlpha
:
1
,
marginLeft
:
"0"
},
0.5
);
}
$
(
'.product-list article img, .product-list article ul li'
).
on
(
'click'
,
function
()
{
...
...
@@ -171,7 +169,6 @@ $(function(){
$
(
'.load-page'
).
load
(
toLink
,
function
(){
loadProductContent
();
$
(
'html'
).
css
(
'overflow'
,
'hidden'
);
console
.
log
(
'heaeeee'
);
});
})
loadProductContent
();
...
...
wp-content/themes/nap/woocommerce/single-product/add-to-cart/simple.php
View file @
ba4fc07d
...
...
@@ -24,10 +24,12 @@ global $product;
$id
=
get_the_ID
();
$parent_cat
=
wp_get_post_terms
(
$product
->
get_id
(),
'product_cat'
,
array
(
'parent'
=>
0
,
'fields'
=>
'ids'
));
$sub_cat
=
wp_get_post_terms
(
$product
->
get_id
(),
'product_cat'
,
array
(
'parent'
=>
$parent_cat
[
0
],
'fields'
=>
'names'
));
//Get Bac
h
URL
//Get Bac
k
URL
$ext_ref
=
externe_referrer
();
$class_back
=
""
;
if
(
$ext_ref
)
{
$category_link
=
get_category_link
(
$parent_cat
[
0
]);
$class_back
=
"ext-link"
;
}
else
{
$category_link
=
"#"
;
}
...
...
@@ -36,8 +38,8 @@ do_action('woocommerce_before_add_to_cart_form');
<div
id=
"product"
class=
"clearfix"
>
<div
class=
"product-images row animated"
>
<div
class =
"btn-wrapper row close-panel"
>
<div
class=
"pink-btn circle-btn"
><a
href=
"
<?php
echo
$category_link
?>
"
><span
class =
"abs-center backlink"
>
Retour
</span></a></div>
<div
class =
"btn-wrapper row close-panel
<?php
echo
$class_back
?>
"
>
<div
class=
"pink-btn circle-btn
"
><a
href=
"
<?php
echo
$category_link
?>
"
><span
class =
"abs-center backlink"
>
Retour
</span></a></div>
</div>
<div
class=
"product-slides row"
>
<div
class=
"product-header"
>
...
...
wp-content/themes/nap/woocommerce/single-product/add-to-cart/variable.php
View file @
ba4fc07d
...
...
@@ -28,10 +28,10 @@ $parent_cat = wp_get_post_terms($product->get_id(), 'product_cat', array( 'paren
$sub_cat
=
wp_get_post_terms
(
$product
->
get_id
(),
'product_cat'
,
array
(
'parent'
=>
$parent_cat
[
0
],
'fields'
=>
'names'
));
$current_variationID
=
$_GET
[
'variation_id'
];
$ext_ref
=
externe_referrer
();
$class_back
=
""
;
$category_link
=
get_category_link
(
$parent_cat
[
0
]);
if
(
$ext_ref
)
{
$category_link
=
get_category_link
(
$parent_cat
[
0
]);
}
else
{
$category_link
=
"#"
;
$class_back
=
"ext-link"
;
}
if
(
!
function_exists
(
'print_attribute_radio'
))
{
...
...
@@ -79,7 +79,7 @@ do_action('woocommerce_before_add_to_cart_form');
<div
id=
"product"
class=
"clearfix"
>
<div
class=
"product-images row animated"
>
<div
class =
"btn-wrapper row close-panel"
>
<div
class =
"btn-wrapper row close-panel
<?php
echo
$class_back
?>
"
>
<div
class=
"pink-btn circle-btn"
><a
href=
"
<?php
echo
$category_link
?>
"
><span
class =
"abs-center backlink"
>
Retour
</span></a></div>
</div>
<div
class=
"product-slides row"
>
...
...
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