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
6a367699
Commit
6a367699
authored
Sep 22, 2017
by
imac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update]Redmine #649 : Structural change + fixed menu
parent
f175ed46
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
38 deletions
+40
-38
main.css
wp-content/themes/nap/assets/css/main.css
+3
-0
responsive.css
wp-content/themes/nap/assets/css/responsive.css
+1
-0
main.js
wp-content/themes/nap/assets/js/main.js
+2
-2
map.js
wp-content/themes/nap/assets/js/map.js
+3
-3
product.js
wp-content/themes/nap/assets/js/product.js
+31
-33
No files found.
wp-content/themes/nap/assets/css/main.css
View file @
6a367699
...
...
@@ -1883,6 +1883,9 @@ label.chevron.bottom::first-letter {
color
:
#fff
;
z-index
:
9999999
;
}
.filter-list
>
input
{
display
:
block
;
}
.filter-btn
.btn-container
{
height
:
100%
;
position
:
relative
;
...
...
wp-content/themes/nap/assets/css/responsive.css
View file @
6a367699
...
...
@@ -649,6 +649,7 @@
.commercial-details.active-com
figure
{
margin-left
:
0
;
}
.filter-list
>
input
,
.commercial-details
,
.filter-bloc
{
width
:
82%
;
...
...
wp-content/themes/nap/assets/js/main.js
View file @
6a367699
...
...
@@ -667,7 +667,7 @@ var initFunction = function() {
timer
=
setTimeout
(
function
()
{
onScrollCover
();
},
33
0
);
},
60
0
);
$
(
items
).
each
(
function
()
{
var
currLink
=
$
(
this
);
var
refElement
=
$
(
currLink
.
attr
(
"href"
));
...
...
@@ -765,7 +765,7 @@ var initFunction = function() {
$
.
fn
.
showSubmenu
();
//Catalog subMenu
setTimeout
(
function
()
{
onScrollCover
();
},
5
00
);
},
6
00
);
$
(
'#fullpage'
).
fullpageSlide
();
//Stories
$
.
fn
.
responsive
();
$
(
'.list-color-filter li'
).
setBgColorList
();
...
...
wp-content/themes/nap/assets/js/map.js
View file @
6a367699
/*var zones = {zone1: ['02' , '08' , '14' , '22' , '27' , '29' , '35' , '50' , '51' , '53' , '55' , '56' , '59' , '61' , '62' , '76' , '80' , 'BE' , 'LU'],
zone2: [ '60' , '75', '77' , '78' , '91', '92' , '93' , '94' , '95'],
zone2: [ '60' , '75', '77' , '78' , '91', '92' , '93' , '94' , '95'],
zone3: ['03' , '18' , '28' , '36' , '37' , '41' , '44' , '45' , '49' , '58' , '72' , '89'],
zone4: ['12' , '15' , '16' , '17' , '19' , '23' , '24' , '31' , '32' , '33' , '40' , '46' , '47' , '64' , '65' , '79' , '82' , '85' , '86' , '87'],
zone5: ['01' , '04' , '05' , '07' , '10' , '21' , '25' , '26' , '38' , '39' , '42' , '43' , '52' , '54' , '57' , '63' , '67' , '68' , '69' , '70' , '71' , '73' , '74' , '88' , '90' , 'CH'],
...
...
@@ -42,7 +42,7 @@ function initMap(){
});
})
}
},
0
);
}
function
selectZone
(
zone
,
initialClassDep
,
initialClassNum
)
{
...
...
@@ -98,7 +98,7 @@ jQuery("#map-search").bind('submit',function(e) {
});
});
//Highlight zone when select country
jQuery
(
document
).
find
(
"#selectCountry"
).
on
(
'change
'
,
function
(
e
)
{
jQuery
(
document
).
on
(
'change'
,
'#selectCountry
'
,
function
(
e
)
{
var
country
=
e
.
target
.
value
,
initialClassDep
=
'st3'
,
initialClassNum
=
'st5'
;
...
...
wp-content/themes/nap/assets/js/product.js
View file @
6a367699
...
...
@@ -2,17 +2,17 @@
function
loadProductContent
()
{
sizeProductDetails
=
$
(
'.product-details .list'
).
length
;
if
(
sizeProductDetails
==
0
)
{
$
(
'.product-images'
).
outerWidth
(
'65%'
);
$
(
'.product-details'
).
outerWidth
(
'34%'
);
$
(
'.product-info'
).
outerWidth
(
'100%'
);
$
(
'.product-images'
).
outerWidth
(
'65%'
);
$
(
'.product-details'
).
outerWidth
(
'34%'
);
$
(
'.product-info'
).
outerWidth
(
'100%'
);
}
else
if
(
sizeProductDetails
<
2
)
{
$
(
'.product-info'
).
outerWidth
(
'78.3%'
);
$
(
'.product-info'
).
outerWidth
(
'78.3%'
);
$
(
'.product-details .list'
).
width
(
'100%'
);
$
(
'.product-details form'
).
width
(
'21.7%'
);
}
$
(
'.pa_couleur li'
).
getListColors
();
$
(
'.pa_couleur li'
).
selectColor
();
$
(
'.pa_format li'
).
selectFormat
();
...
...
@@ -23,16 +23,15 @@ function loadProductContent() {
$
(
'.list-wrapper .color-list'
).
setColorToWhite
(
'input'
);
$
(
'#zoom, .element-slider'
).
zoom
();
$
(
'article[data-color], .pa_couleur li'
).
click
(
function
(
e
)
{
$
(
this
).
selectSlide
(
$
(
'#slides'
));
$
(
this
).
selectSlide
(
$
(
'#slides'
));
});
$
(
'#mozaique'
).
open_gallery
();
initFunction
();
$
.
fn
.
responsive
();
$
(
'.variations_form'
).
on
(
'reset_data'
,
function
()
{
console
.
log
(
"reset data"
);
{
$attributes
=
$
(
'.variations .list'
);
var
num_attr
=
$
(
'.variations .list'
).
length
;
// alert(num_attr);
...
...
@@ -41,10 +40,10 @@ function loadProductContent() {
var
$attr
=
$
(
this
);
//alert($attr.hasClass('first_attr'));
if
(
!
$attr
.
hasClass
(
"first_attr"
)
||
num_attr
==
1
)
{
console
.
log
(
i
,
$attr
,
$attr
.
find
(
'input:not(:disabled):checked'
).
length
);
{
//
console.log(i, $attr, $attr.find('input:not(:disabled):checked').length);
if
(
!
$attr
.
find
(
'input:not(:disabled):checked'
).
length
)
{
{
$firstInput
=
$attr
.
find
(
'input:not(:disabled)'
).
first
();
$firstInput
.
prop
(
'checked'
,
true
);
$firstInput
.
change
();
...
...
@@ -60,29 +59,29 @@ function loadProductContent() {
});
function
onFoundVariation
()
{
console
.
log
(
'found variation'
);
//
console.log('found variation');
$
(
'.list'
).
first
().
find
(
'input:disabled'
).
prop
(
'disabled'
,
false
);
//$('.variations_form .format_list input').prop('checked',false);
$
(
'.variations_form .color-list input:disabled'
).
prop
(
'disabled'
,
false
);
console
.
log
(
'found'
,
$
(
'.variations_form .format-list input:checked + * + .format-desc'
));
//
console.log('found', $('.variations_form .format-list input:checked + * + .format-desc'));
//var format = $('.variations_form .format-list input:checked + * + .format-desc').text();
var
format
=
''
;
$
(
'.variations_form .format-list input:checked + * + .format-desc '
).
each
(
function
()
{
format
=
format
+
$
(
this
).
text
()
+
'<br />'
;
});
$
(
'.info-format'
).
html
(
format
);
$
(
'.info-format-txt'
).
html
(
format
);
$
(
'.info-color'
).
text
(
$
(
'.color-list input:checked'
).
attr
(
'value'
));
var
varID
=
jQuery
(
'input[name="variation_id"]'
).
val
();
/**********NS***********/
var
variations_has_file
=
$
(
'.download_file'
).
data
(
'fiche'
);
var
tab_var_file
=
variations_has_file
.
split
(
','
).
slice
(
0
,
-
1
);
//console.log(tab_var_file);
if
(
$
.
inArray
(
varID
,
tab_var_file
)
>
-
1
)
{
$
(
'.download_file'
).
show
();
...
...
@@ -91,8 +90,8 @@ function loadProductContent() {
{
$
(
'.download_file'
).
hide
();
}
/**********************/
/**********************/
if
(
varID
!=
0
)
{
var
price
=
jQuery
(
'.woocommerce-variation-price .woocommerce-Price-amount'
).
text
();
...
...
@@ -147,10 +146,10 @@ $(function(){
zoom
.
removeClass
(
"active"
);
api
.
teardown
();
}
else
{
$this
.
data
(
"active"
,
true
);
zoom
.
addClass
(
"active"
);
zoom
.
removeClass
(
'is-loading'
);
zoom
.
addClass
(
"is-ready"
);
api
.
_init
();
...
...
@@ -175,9 +174,9 @@ $(function(){
formatWrapper
.
css
({
'height'
:
formatH
,
'width'
:
formatW
});
})
}
$
.
fn
.
selectColor
=
function
(){
$
(
this
).
on
(
'click'
,
function
(){
var
$input
=
$
(
this
).
find
(
'input'
);
...
...
@@ -190,7 +189,7 @@ $(function(){
$(this).toggleClass('selected');
}
*/
})
})
}
$
.
fn
.
selectFormat
=
function
(){
$
(
this
).
on
(
'click'
,
function
(){
...
...
@@ -217,7 +216,7 @@ $(function(){
$(this).find('img').attr('src',initialImage);
}
*/
})
})
}
/*
$.fn.checkIfFormatDisabled = function(){
...
...
@@ -234,7 +233,7 @@ $(function(){
jQuery.map(icons, function(value,key){
console.log('key' + key + 'value = ' + value);
var activeImg = $('.format-label #'+value).data('img-active');
$('.format-label #'+value).attr('src',activeImg);
$('.format-list').each(function() {
if ($(this).find("input").is(':disabled')) {
...
...
@@ -256,14 +255,13 @@ $(function(){
}
else
{
$
(
'#download'
).
addClass
(
'disabled'
);
}
console
.
log
(
'dwnld'
);
}
$
.
fn
.
slider_product
=
function
(){
$
(
'#slides'
).
not
(
'.slick-initialized'
).
slick
({
autoplay
:
false
,
arrows
:
true
,
dots
:
true
,
dots
:
true
,
slidesToShow
:
1
,
adaptiveHeight
:
true
,
//centerMode: true,
...
...
@@ -357,7 +355,7 @@ $(function(){
//localStorage['from-site'] = true;
$
(
'head'
).
append
(
$
(
'.header-shop'
));
var
toLink
=
$
(
this
).
data
(
'link'
);
$
(
document
).
attr
(
"title"
,
$
(
this
).
data
(
'title'
));
// $(document).attr("description", $(this).data('description'));
// $.post(toLink, { fromSite: true});
...
...
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