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
0fff2495
Commit
0fff2495
authored
Aug 31, 2017
by
imac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Bugfix]Redmine #726 & #725 ->scroll & filter
parent
c6dcac16
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
main.js
wp-content/themes/nap/assets/js/main.js
+14
-7
No files found.
wp-content/themes/nap/assets/js/main.js
View file @
0fff2495
...
...
@@ -279,10 +279,11 @@ $.fn.loadPageContent = function(){
$
.
fn
.
open_filter
=
function
(){
$
(
this
).
on
(
'click'
,
'.filter-btn'
,
function
(){
var
filterW
=
$
(
'.filter-list'
).
outerWidth
(),
filterBtn
=
$
(
'.filter-btn .btn-container'
).
outerWidth
();
mainW
=
$
(
'.main-nav'
).
outerWidth
(),
filterBtn
=
$
(
'.filter-btn .btn-container'
).
outerWidth
();
tlFilter
=
new
TimelineMax
();
tlFilter
.
staggerFromTo
(
'.filter-bloc'
,
0.5
,{
opacity
:
0
,
y
:
100
},{
opacity
:
1
,
y
:
0
},
0.1
,
0
);
tlFilter
.
fromTo
(
'.filter-list'
,
0.5
,{
opacity
:
0
,
left
:
'0'
,
visibility
:
"hidden"
},{
opacity
:
1
,
left
:
filterW
-
filterBtn
,
visibility
:
"visible"
},
0
);
tlFilter
.
fromTo
(
'.filter-list'
,
0.5
,{
opacity
:
0
,
left
:
'0'
,
visibility
:
"hidden"
},{
opacity
:
1
,
left
:
mainW
,
visibility
:
"visible"
},
0
);
tlFilter
.
to
(
'.filter-btn .btn-container'
,
0.5
,{
opacity
:
0
,
left
:
filterW
,
width
:
"0px"
},
0
);
//tl.fromTo('#slides',0.5,{opacity:1},{opacity:0},0);
...
...
@@ -462,7 +463,6 @@ $.fn.appendMobileMenu = function(){
maxHeight
=
productHeight
>
windowHeight
?
productHeight
:
containerHeight
,
galleryWidth
=
windowWidth
-
navPhototequeWidth
,
filterWidth
=
$
(
'.right-container .left-panel'
).
outerWidth
(),
lastSectionHeight
=
$
(
'#catalogue .panel-content section'
).
last
().
outerHeight
(),
footerContact
=
$
(
'.contact-form .footer'
).
outerHeight
();
$
(
'.gallery-wrapper'
).
outerWidth
(
galleryWidth
).
css
(
'margin-left'
,
navPhototequeWidth
)
;
$
(
'.main,.load-page'
).
outerHeight
(
containerHeight
);
...
...
@@ -474,10 +474,17 @@ $.fn.appendMobileMenu = function(){
$
(
'.right-panel'
).
outerWidth
(
windowWidth
-
(
navMenuWidth
+
filterWidth
));
$
(
'.contact-form'
).
height
(
windowHeight
-
footerHeight
);
$
(
'.contact-form .inner-form'
).
outerHeight
(
windowHeight
-
footerContact
);
if
(
lastSectionHeight
<
windowHeight
-
footerHeight
){
var
lastSection
=
$
(
'#catalogue .panel-content section'
).
last
();
lastSection
.
height
(
2
*
windowHeight
/
3
+
lastSection
.
find
(
'h2'
)
-
footerHeight
);
}
$
(
'#catalogue .panel-content section'
).
last
().
css
(
'height'
,
'auto'
);
setTimeout
(
function
(){
var
lastSection
=
$
(
'#catalogue .panel-content section'
).
last
();
var
lastSectionHeight
=
lastSection
.
outerHeight
()
+
50
;
if
(
lastSectionHeight
<
windowHeight
-
footerHeight
){
lastSection
.
height
(
2
*
windowHeight
/
3
+
lastSection
.
find
(
'h2'
).
outerHeight
()
-
footerHeight
);
}
else
{
lastSection
.
css
(
'height'
,
'auto'
);
}
},
1000
)
$
(
'.nav-phototeque .nav-content'
).
outerHeight
(
navPhototequeHeight
-
$
(
'.circle-btn'
).
outerHeight
()
-
$
(
'.phototheque-content .header h2'
).
outerHeight
()
-
footerHeight
);
if
(
windowWidth
>
860
){
$
(
'#fullpage .chevron'
).
css
(
'left'
,
navMenuWidth
);
...
...
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