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
ba39f040
Commit
ba39f040
authored
Sep 08, 2017
by
imac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Bugfix]Redmine #728 : Marge phototheque
parent
d929b995
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
main.js
wp-content/themes/nap/assets/js/main.js
+18
-18
No files found.
wp-content/themes/nap/assets/js/main.js
View file @
ba39f040
...
...
@@ -96,7 +96,8 @@ var initFunction=function(){
});
setTimeout
(
function
(){
$
(
'.gallery-wrapper'
).
removeClass
(
'hidden-elem'
).
addClass
(
'animated visible-elem fadeInUp'
);
},
0
)
$
.
fn
.
responsive
();
},
100
)
}
function
appendLoading
()
{
$
(
'.load-page'
).
append
(
$
(
'#loading-container-subpage'
).
clone
());
...
...
@@ -112,7 +113,6 @@ var initFunction=function(){
$
(
'.load-page'
).
parent
().
addClass
(
'active'
);
history
.
pushState
(
null
,
null
,
link
);
$
(
'.load-page'
).
load
(
link
,
function
(){
console
.
log
(
'load page'
);
$
.
fn
.
loadPageContent
();
$
(
'#loading-container-subpage'
).
hide
();
});
...
...
@@ -151,7 +151,7 @@ scrollTop: div.outerHeight()
},
600
)
return
false
;
});
//Get file name of uploaded file
//Get file name of uploaded file
$
(
'#file-p'
).
on
(
'change'
,
function
(
e
){
var
fileName
=
e
.
target
.
files
[
0
].
name
;
$
(
'.upload-btn'
).
after
(
$
(
'<p class="loaded-file">'
+
fileName
+
'</p>'
));
...
...
@@ -258,7 +258,7 @@ $.fn.open_nav = function(){
tl
.
staggerFrom
(
'.nav-content >ul>li, .phototheque-content nav >ul > li'
,
0.5
,{
opacity
:
0
,
x
:
200
},
0.1
,
0.5
);
tl
.
staggerFromTo
(
'nav ul ul li '
,
0.5
,{
opacity
:
0
,
x
:
200
},{
opacity
:
1
,
x
:
0
},
0.1
,
1.2
);
tl
.
fromTo
(
'.news-btn'
,
0.9
,{
autoAlpha
:
0
,
scale
:
'0'
},{
autoAlpha
:
1
,
scale
:
'1'
},
0
);
}
}
$
.
fn
.
openPanelAnimation
=
function
(){
$
(
this
).
addClass
(
'animated slideInRight'
).
removeClass
(
'slideOutRight'
).
show
();
}
...
...
@@ -269,7 +269,7 @@ $.fn.open_news = function(){
$
(
this
).
on
(
'click'
,
function
(){
$
(
'.news-wrapper'
).
openPanelAnimation
();
})
}
}
$
.
fn
.
close_news
=
function
(){
$
(
this
).
on
(
'click'
,
function
(){
$
(
'.news-wrapper'
).
closePanelAnimation
();
...
...
@@ -277,7 +277,7 @@ $.fn.close_news = function(){
}
$
.
fn
.
reinitFilter
=
function
(){
$
(
this
).
removeClass
(
'selected-filter selected'
);
}
}
$
.
fn
.
open_filter
=
function
(){
$
(
this
).
on
(
'click'
,
'.filter-btn'
,
function
(){
var
filterW
=
$
(
'.filter-list'
).
outerWidth
(),
...
...
@@ -330,7 +330,7 @@ $.fn.open_filter = function(){
$
.
fn
.
checkSelectedFilter
=
function
(){
if
(
$
(
'.filter-content .filter-bloc.selected-filter'
).
length
){
$
(
'.filter-btn'
).
addClass
(
'selected-filter'
);
}
}
}
$
.
fn
.
changeProductImageBg
=
function
(){
var
...
...
@@ -349,7 +349,7 @@ $.fn.animatePageScroll = function(element, duration) {
{
opacity
:
1
,
visibility
:
"visible"
,
marginBottom
:
'0px'
},
0.7
);
}
$
.
fn
.
fullpageSlide
=
function
(){
var
var
timeout
=
1.7
,
duration
=
1.2
;
setTimeout
(
function
(){
...
...
@@ -379,7 +379,7 @@ tl1.fromTo(firstSection.find('.bloc .desc-content'),1,
{
opacity
:
1
,
visibility
:
"visible"
,
marginLeft
:
'0px'
},
timeout
);
},
onLeave
:
function
(
index
,
nextIndex
,
direction
){
var
var
activeSection
=
$
(
this
),
nextSection
=
$
(
this
).
next
();
tl2
=
new
TimelineMax
();
...
...
@@ -421,7 +421,7 @@ $.fn.getMenuBg = function(){
'background-image'
:
"url("
+
imgSrc
+
")"
,
'opacity'
:
0
,
})
tlBg
=
new
TimelineMax
();
tlBg
=
new
TimelineMax
();
tlBg
.
to
(
'.container-bg'
,
0.9
,{
opacity
:
1
},
0.5
);
tlBg
.
from
(
'.full-slides'
,
1.2
,{
opacity
:
0
,
width
:
0
},
0.4
);
if
(
windowWidth
>
860
){
...
...
@@ -449,11 +449,11 @@ $.fn.appendMobileMenu = function(){
},
2000
)
}
//Responsive function
//Responsive function
$
.
fn
.
responsive
=
function
(){
var
footerHeight
=
$
(
'footer'
).
height
(),
productHeight
=
$
(
".product-details"
).
outerHeight
(),
productWidth
=
$
(
".product-details"
).
outerWidth
(),
productWidth
=
$
(
".product-details"
).
outerWidth
(),
windowHeight
=
$
(
window
).
innerHeight
(),
windowWidth
=
$
(
window
).
width
(),
navMenuWidth
=
$
(
'.nav-wrapper'
).
outerWidth
(),
...
...
@@ -655,13 +655,13 @@ function checkFooterNavPosition(){
}
else
{
$
(
'.header .nav-content .footer'
).
removeClass
(
'relative'
);
}
}
}
function
checkFilterContactWrapper
(){
setTimeout
(
function
(){
if
(
if
(
(
$
(
'.contact-form .form-wrapper'
).
outerHeight
()
+
$
(
'.filter-wrapper'
).
outerHeight
()
+
$
(
'nav .main-nav'
).
outerHeight
()
+
$
(
'.main-nav'
).
outerHeight
())
<
$
(
window
).
outerHeight
()
+
$
(
'nav .main-nav'
).
outerHeight
()
+
$
(
'.main-nav'
).
outerHeight
())
<
$
(
window
).
outerHeight
()
/*&&
( $('.contact-form .form-wrapper').outerHeight() +
$('.contact-form .footer').outerHeight() +
...
...
@@ -674,7 +674,7 @@ function checkFilterContactWrapper(){
$
(
'.contact-form .footer'
).
removeClass
(
'fixed'
);
}
},
500
)
}
}
$
(
window
).
load
(
function
()
{
initFunction
();
$
(
'.header .nav-wrapper .nav-content > ul > li'
).
each
(
function
(){
...
...
@@ -704,7 +704,7 @@ $(document).ready(function(){
$
(
this
).
stop
(
false
,
true
).
fadeImage
();
});
// Catalog Page : Change product image depending on selected color
$
(
'.product-list article ul li'
).
on
(
'mouseover'
,
function
(){
$
(
'.product-list article ul li'
).
on
(
'mouseover'
,
function
(){
$
(
this
).
changeProductImageBg
();
});
$
(
'.product-list article'
).
each
(
function
(){
...
...
@@ -743,7 +743,7 @@ $(window).resize(function() {
});
//end document resize
window
.
addEventListener
(
"load"
,
function
(){
var
load_screen
=
document
.
getElementById
(
"loading-container"
);
document
.
body
.
removeChild
(
load_screen
);
document
.
body
.
removeChild
(
load_screen
);
});
...
...
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