Merge pull request #2941 from aj7may/master

addition of jQuery.mmenu
This commit is contained in:
Pete Cooper
2014-04-07 08:57:10 +01:00
27 changed files with 4906 additions and 0 deletions
@@ -0,0 +1,31 @@
/*
jQuery.mmenu counters addon CSS
*/
em.mm-counter {
font: inherit;
font-size: 14px;
font-style: normal;
text-indent: 0;
line-height: 20px;
display: block;
margin-top: -10px;
position: absolute;
right: 40px;
top: 50%; }
em.mm-counter + a.mm-subopen {
padding-left: 40px; }
em.mm-counter + a.mm-subopen + a,
em.mm-counter + a.mm-subopen + span {
margin-right: 80px; }
em.mm-counter + a.mm-fullsubopen {
padding-left: 0; }
.mm-vertical em.mm-counter {
top: 12px;
margin-top: 0; }
.mm-nosubresults > em.mm-counter {
display: none; }
.mm-menu em.mm-counter {
color: rgba(255, 255, 255, 0.3); }
@@ -0,0 +1,13 @@
/*
jQuery.mmenu dragOpen addon CSS
*/
html.mm-opened.mm-dragging .mm-menu,
html.mm-opened.mm-dragging .mm-page,
html.mm-opened.mm-dragging .mm-fixed-top,
html.mm-opened.mm-dragging .mm-fixed-bottom,
html.mm-opened.mm-dragging #mm-blocker {
-webkit-transition-duration: 0s;
-moz-transition-duration: 0s;
-ms-transition-duration: 0s;
-o-transition-duration: 0s;
transition-duration: 0s; }
@@ -0,0 +1,94 @@
/*
jQuery.mmenu header addon CSS
*/
.mm-header {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
-o-box-sizing: border-box;
box-sizing: border-box;
background: inherit;
border-bottom: 1px solid transparent;
text-align: center;
line-height: 20px;
width: 100%;
height: 60px;
padding: 30px 40px 0 40px;
position: absolute;
z-index: 2;
top: 0;
left: 0; }
.mm-header .mm-title {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
display: inline-block;
width: 100%;
position: relative;
z-index: 1; }
.mm-header .mm-prev,
.mm-header .mm-next {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
-o-box-sizing: border-box;
box-sizing: border-box;
text-decoration: none;
display: block;
width: 40px;
height: 100%;
position: absolute;
bottom: 0; }
.mm-header .mm-prev:before,
.mm-header .mm-next:before {
content: '';
border: 2px solid transparent;
display: block;
width: 7px;
height: 7px;
margin-bottom: -5px;
position: absolute;
bottom: 50%;
-webkit-transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
-o-transform: rotate(-45deg);
transform: rotate(-45deg);
margin-bottom: -15px; }
.mm-header .mm-prev {
left: 0; }
.mm-header .mm-prev:before {
border-right: none;
border-bottom: none;
left: 22px; }
.mm-header .mm-next {
right: 0; }
.mm-header .mm-next:before {
border-top: none;
border-left: none;
right: 18px; }
.mm-menu.mm-hassearch .mm-header {
height: 50px;
padding-top: 20px;
top: 50px; }
.mm-menu.mm-hassearch .mm-header .mm-prev:before,
.mm-menu.mm-hassearch .mm-header .mm-mext:before {
margin-bottom: -10px; }
.mm-menu.mm-hasheader li.mm-subtitle {
display: none; }
.mm-menu.mm-hasheader .mm-panel {
padding-top: 80px; }
.mm-menu.mm-hasheader.mm-hassearch > .mm-panel {
padding-top: 120px; }
.mm-menu.mm-hasheader.mm-ismenu > .mm-panel {
padding-top: 60px; }
.mm-menu.mm-hasheader.mm-ismenu.mm-hassearch > .mm-panel {
padding-top: 100px; }
.mm-menu .mm-header {
border-color: rgba(0, 0, 0, 0.15);
color: rgba(255, 255, 255, 0.3); }
.mm-menu .mm-header a:before {
border-color: rgba(255, 255, 255, 0.3); }
@@ -0,0 +1,41 @@
/*
jQuery.mmenu labels addon CSS
*/
.mm-menu.mm-fixedlabels .mm-list {
background: inherit; }
.mm-menu.mm-fixedlabels .mm-list > li.mm-label {
background: inherit !important;
opacity: 0.97;
height: 25px;
overflow: visible;
position: relative;
z-index: 1; }
.mm-menu.mm-fixedlabels .mm-list > li.mm-label > div {
background: inherit;
width: 100%;
position: absolute;
left: 0; }
.mm-menu.mm-fixedlabels .mm-list > li.mm-label > div > div {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden; }
.mm-menu.mm-fixedlabels .mm-list > li.mm-label.mm-spacer > div > div {
padding-top: 25px; }
.mm-list > li.mm-label > span {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
padding: 0; }
.mm-list > li.mm-label.mm-opened a.mm-subopen:after {
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-ms-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg);
right: 17px; }
.mm-list > li.mm-collapsed {
display: none; }
.mm-menu .mm-list li.mm-label > div > div {
background: rgba(255, 255, 255, 0.05); }
@@ -0,0 +1,54 @@
/*
jQuery.mmenu searchfield addon CSS
*/
.mm-search,
.mm-search input {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
-o-box-sizing: border-box;
box-sizing: border-box; }
.mm-search {
background: inherit;
width: 100%;
height: 50px;
padding: 10px;
position: relative;
top: 0;
z-index: 2; }
.mm-search input {
border: none;
border-radius: 15px;
font: inherit;
font-size: 14px;
line-height: 30px;
outline: none;
display: block;
width: 100%;
height: 30px;
margin: 0;
padding: 0 10px; }
.mm-menu li.mm-nosubresults > a.mm-subopen {
display: none; }
.mm-menu li.mm-nosubresults > a.mm-subopen + a,
.mm-menu li.mm-nosubresults > a.mm-subopen + span {
padding-right: 10px; }
.mm-menu li.mm-noresults {
text-align: center;
font-size: 21px;
display: none;
padding-top: 80px; }
.mm-menu li.mm-noresults:after {
border: none; }
.mm-menu.mm-noresults li.mm-noresults {
display: block; }
.mm-menu.mm-hassearch > .mm-panel {
padding-top: 60px; }
.mm-menu .mm-search input {
background: rgba(255, 255, 255, 0.3);
color: rgba(255, 255, 255, 0.6); }
.mm-menu li.mm-noresults {
color: rgba(255, 255, 255, 0.3); }
@@ -0,0 +1,190 @@
/*
jQuery.mmenu effects extension CSS
*/
html.mm-slide .mm-menu {
-webkit-transition: -webkit-transform 0.4s ease;
-moz-transition: -moz-transform 0.4s ease;
-o-transition: -o-transform 0.4s ease;
transition: transform 0.4s ease; }
html.mm-slide.mm-opened .mm-menu {
-webkit-transform: translateX(-40%);
-moz-transform: translateX(-40%);
-ms-transform: translateX(-40%);
-o-transform: translateX(-40%);
transform: translateX(-40%); }
html.mm-slide.mm-opening .mm-menu {
-webkit-transform: translateX(0%);
-moz-transform: translateX(0%);
-ms-transform: translateX(0%);
-o-transform: translateX(0%);
transform: translateX(0%); }
html.mm-slide.mm-right.mm-opened .mm-menu {
-webkit-transform: translateX(40%);
-moz-transform: translateX(40%);
-ms-transform: translateX(40%);
-o-transform: translateX(40%);
transform: translateX(40%); }
html.mm-slide.mm-right.mm-opening .mm-menu {
-webkit-transform: translateX(0%);
-moz-transform: translateX(0%);
-ms-transform: translateX(0%);
-o-transform: translateX(0%);
transform: translateX(0%); }
html.mm-slide.mm-top.mm-opened .mm-menu {
-webkit-transform: translateY(-40%);
-moz-transform: translateY(-40%);
-ms-transform: translateY(-40%);
-o-transform: translateY(-40%);
transform: translateY(-40%); }
html.mm-slide.mm-top.mm-opening .mm-menu {
-webkit-transform: translateY(0%);
-moz-transform: translateY(0%);
-ms-transform: translateY(0%);
-o-transform: translateY(0%);
transform: translateY(0%); }
html.mm-slide.mm-bottom.mm-opened .mm-menu {
-webkit-transform: translateY(40%);
-moz-transform: translateY(40%);
-ms-transform: translateY(40%);
-o-transform: translateY(40%);
transform: translateY(40%); }
html.mm-slide.mm-bottom.mm-opening .mm-menu {
-webkit-transform: translateY(0%);
-moz-transform: translateY(0%);
-ms-transform: translateY(0%);
-o-transform: translateY(0%);
transform: translateY(0%); }
html.mm-zoom-menu .mm-menu {
-webkit-transition: -webkit-transform 0.4s ease;
-moz-transition: -moz-transform 0.4s ease;
-o-transition: -o-transform 0.4s ease;
transition: transform 0.4s ease; }
html.mm-zoom-menu.mm-opened .mm-menu {
-webkit-transform: scale(0.7, 0.7) translateX(-40%);
-moz-transform: scale(0.7, 0.7) translateX(-40%);
-ms-transform: scale(0.7, 0.7) translateX(-40%);
-o-transform: scale(0.7, 0.7) translateX(-40%);
transform: scale(0.7, 0.7) translateX(-40%);
-webkit-transform-origin: left center;
-moz-transform-origin: left center;
-ms-transform-origin: left center;
-o-transform-origin: left center;
transform-origin: left center; }
html.mm-zoom-menu.mm-opening .mm-menu {
-webkit-transform: scale(1, 1) translateX(0%);
-moz-transform: scale(1, 1) translateX(0%);
-ms-transform: scale(1, 1) translateX(0%);
-o-transform: scale(1, 1) translateX(0%);
transform: scale(1, 1) translateX(0%); }
html.mm-zoom-menu.mm-right.mm-opened .mm-menu {
-webkit-transform: scale(0.7, 0.7) translateX(40%);
-moz-transform: scale(0.7, 0.7) translateX(40%);
-ms-transform: scale(0.7, 0.7) translateX(40%);
-o-transform: scale(0.7, 0.7) translateX(40%);
transform: scale(0.7, 0.7) translateX(40%);
-webkit-transform-origin: right center;
-moz-transform-origin: right center;
-ms-transform-origin: right center;
-o-transform-origin: right center;
transform-origin: right center; }
html.mm-zoom-menu.mm-right.mm-opening .mm-menu {
-webkit-transform: scale(1, 1) translateX(0%);
-moz-transform: scale(1, 1) translateX(0%);
-ms-transform: scale(1, 1) translateX(0%);
-o-transform: scale(1, 1) translateX(0%);
transform: scale(1, 1) translateX(0%); }
html.mm-zoom-menu.mm-top.mm-opened .mm-menu {
-webkit-transform: scale(0.7, 0.7) translateY(-40%);
-moz-transform: scale(0.7, 0.7) translateY(-40%);
-ms-transform: scale(0.7, 0.7) translateY(-40%);
-o-transform: scale(0.7, 0.7) translateY(-40%);
transform: scale(0.7, 0.7) translateY(-40%);
-webkit-transform-origin: center top;
-moz-transform-origin: center top;
-ms-transform-origin: center top;
-o-transform-origin: center top;
transform-origin: center top; }
html.mm-zoom-menu.mm-top.mm-opening .mm-menu {
-webkit-transform: scale(1, 1) translateY(0%);
-moz-transform: scale(1, 1) translateY(0%);
-ms-transform: scale(1, 1) translateY(0%);
-o-transform: scale(1, 1) translateY(0%);
transform: scale(1, 1) translateY(0%); }
html.mm-zoom-menu.mm-bottom.mm-opened .mm-menu {
-webkit-transform: scale(0.7, 0.7) translateY(40%);
-moz-transform: scale(0.7, 0.7) translateY(40%);
-ms-transform: scale(0.7, 0.7) translateY(40%);
-o-transform: scale(0.7, 0.7) translateY(40%);
transform: scale(0.7, 0.7) translateY(40%);
-webkit-transform-origin: center bottom;
-moz-transform-origin: center bottom;
-ms-transform-origin: center bottom;
-o-transform-origin: center bottom;
transform-origin: center bottom; }
html.mm-zoom-menu.mm-bottom.mm-opening .mm-menu {
-webkit-transform: scale(1, 1) translateY(0%);
-moz-transform: scale(1, 1) translateY(0%);
-ms-transform: scale(1, 1) translateY(0%);
-o-transform: scale(1, 1) translateY(0%);
transform: scale(1, 1) translateY(0%); }
html.mm-zoom-page.mm-opened .mm-page {
-webkit-transform: scale(1, 1);
-moz-transform: scale(1, 1);
-ms-transform: scale(1, 1);
-o-transform: scale(1, 1);
transform: scale(1, 1);
-webkit-transform-origin: left center;
-moz-transform-origin: left center;
-ms-transform-origin: left center;
-o-transform-origin: left center;
transform-origin: left center; }
html.mm-zoom-page.mm-opening .mm-page {
-webkit-transform: scale(1.5, 1.5);
-moz-transform: scale(1.5, 1.5);
-ms-transform: scale(1.5, 1.5);
-o-transform: scale(1.5, 1.5);
transform: scale(1.5, 1.5); }
html.mm-zoom-page.mm-right.mm-opened .mm-page {
-webkit-transform-origin: right center;
-moz-transform-origin: right center;
-ms-transform-origin: right center;
-o-transform-origin: right center;
transform-origin: right center; }
html.mm-zoom-page.mm-top.mm-opened .mm-page {
-webkit-transform-origin: center top;
-moz-transform-origin: center top;
-ms-transform-origin: center top;
-o-transform-origin: center top;
transform-origin: center top; }
html.mm-zoom-page.mm-bottom.mm-opened .mm-page {
-webkit-transform-origin: center bottom;
-moz-transform-origin: center bottom;
-ms-transform-origin: center bottom;
-o-transform-origin: center bottom;
transform-origin: center bottom; }
html.mm-zoom-panels .mm-panel {
-webkit-transform: scale(1.5, 1.5);
-moz-transform: scale(1.5, 1.5);
-ms-transform: scale(1.5, 1.5);
-o-transform: scale(1.5, 1.5);
transform: scale(1.5, 1.5);
-webkit-transform-origin: left center;
-moz-transform-origin: left center;
-ms-transform-origin: left center;
-o-transform-origin: left center;
transform-origin: left center; }
html.mm-zoom-panels .mm-panel.mm-opened {
-webkit-transform: scale(1, 1);
-moz-transform: scale(1, 1);
-ms-transform: scale(1, 1);
-o-transform: scale(1, 1);
transform: scale(1, 1); }
html.mm-zoom-panels .mm-panel.mm-opened.mm-subopened {
-webkit-transform: scale(0.7, 0.7);
-moz-transform: scale(0.7, 0.7);
-ms-transform: scale(0.7, 0.7);
-o-transform: scale(0.7, 0.7);
transform: scale(0.7, 0.7); }
@@ -0,0 +1,168 @@
/*
jQuery.mmenu fullscreen extension CSS
*/
html.mm-opening.mm-fullscreen .mm-page,
html.mm-opening.mm-fullscreen #mm-blocker,
html.mm-opening.mm-fullscreen .mm-fixed-top,
html.mm-opening.mm-fullscreen .mm-fixed-bottom {
left: 100%; }
.mm-menu.mm-fullscreen {
width: 100%; }
@media all and (max-width: 140px) {
.mm-menu.mm-fullscreen {
width: 140px; }
html.mm-opening.mm-fullscreen .mm-page,
html.mm-opening.mm-fullscreen #mm-blocker,
html.mm-opening.mm-fullscreen .mm-fixed-top,
html.mm-opening.mm-fullscreen .mm-fixed-bottom {
left: 140px; } }
@media all and (min-width: 10000px) {
.mm-menu.mm-fullscreen {
width: 10000px; }
html.mm-opening.mm-fullscreen .mm-page,
html.mm-opening.mm-fullscreen #mm-blocker,
html.mm-opening.mm-fullscreen .mm-fixed-top,
html.mm-opening.mm-fullscreen .mm-fixed-bottom {
left: 10000px; } }
.mm-menu.mm-top.mm-fullscreen {
height: 100%; }
html.mm-top.mm-opening.mm-fullscreen .mm-page,
html.mm-top.mm-opening.mm-fullscreen #mm-blocker,
html.mm-top.mm-opening.mm-fullscreen .mm-fixed-top {
top: 100%; }
html.mm-top.mm-opening.mm-fullscreen .mm-fixed-bottom {
bottom: -100%; }
@media all and (max-height: 140px) {
.mm-menu.mm-top.mm-fullscreen {
height: 140px; }
html.mm-top.mm-opening.mm-fullscreen .mm-page,
html.mm-top.mm-opening.mm-fullscreen #mm-blocker,
html.mm-top.mm-opening.mm-fullscreen .mm-fixed-top {
top: 140px; }
html.mm-top.mm-opening.mm-fullscreen .mm-fixed-bottom {
bottom: -140px; } }
@media all and (min-height: 10000px) {
.mm-menu.mm-top.mm-fullscreen {
height: 10000px; }
html.mm-top.mm-opening.mm-fullscreen .mm-page,
html.mm-top.mm-opening.mm-fullscreen #mm-blocker,
html.mm-top.mm-opening.mm-fullscreen .mm-fixed-top {
top: 10000px; }
html.mm-top.mm-opening.mm-fullscreen .mm-fixed-bottom {
bottom: -10000px; } }
.mm-menu.mm-right.mm-fullscreen {
width: 100%; }
html.mm-right.mm-opening.mm-fullscreen .mm-page,
html.mm-right.mm-opening.mm-fullscreen #mm-blocker,
html.mm-right.mm-opening.mm-fullscreen .mm-fixed-top,
html.mm-right.mm-opening.mm-fullscreen .mm-fixed-bottom {
right: 100%; }
@media all and (max-width: 140px) {
.mm-menu.mm-right.mm-fullscreen {
width: 140px; }
html.mm-right.mm-opening.mm-fullscreen .mm-page,
html.mm-right.mm-opening.mm-fullscreen #mm-blocker,
html.mm-right.mm-opening.mm-fullscreen .mm-fixed-top,
html.mm-right.mm-opening.mm-fullscreen .mm-fixed-bottom {
right: 140px; } }
@media all and (min-width: 10000px) {
.mm-menu.mm-right.mm-fullscreen {
width: 10000px; }
html.mm-right.mm-opening.mm-fullscreen .mm-page,
html.mm-right.mm-opening.mm-fullscreen #mm-blocker,
html.mm-right.mm-opening.mm-fullscreen .mm-fixed-top,
html.mm-right.mm-opening.mm-fullscreen .mm-fixed-bottom {
right: 10000px; } }
.mm-menu.mm-bottom.mm-fullscreen {
height: 100%; }
html.mm-bottom.mm-opening.mm-fullscreen .mm-page,
html.mm-bottom.mm-opening.mm-fullscreen #mm-blocker,
html.mm-bottom.mm-opening.mm-fullscreen .mm-fixed-bottom {
bottom: 100%; }
html.mm-bottom.mm-opening.mm-fullscreen .mm-fixed-top {
top: -100%; }
@media all and (max-height: 140px) {
.mm-menu.mm-bottom.mm-fullscreen {
height: 140px; }
html.mm-bottom.mm-opening.mm-fullscreen .mm-page,
html.mm-bottom.mm-opening.mm-fullscreen #mm-blocker,
html.mm-bottom.mm-opening.mm-fullscreen .mm-fixed-bottom {
bottom: 140px; }
html.mm-bottom.mm-opening.mm-fullscreen .mm-fixed-top {
top: -140px; } }
@media all and (min-height: 10000px) {
.mm-menu.mm-bottom.mm-fullscreen {
height: 10000px; }
html.mm-bottom.mm-opening.mm-fullscreen .mm-page,
html.mm-bottom.mm-opening.mm-fullscreen #mm-blocker,
html.mm-bottom.mm-opening.mm-fullscreen .mm-fixed-bottom {
bottom: 10000px; }
html.mm-bottom.mm-opening.mm-fullscreen .mm-fixed-top {
top: -10000px; } }
.mm-menu.mm-fullscreen.mm-front, .mm-menu.mm-fullscreen.mm-next {
left: -100%; }
@media all and (max-width: 140px) {
.mm-menu.mm-fullscreen.mm-front, .mm-menu.mm-fullscreen.mm-next {
left: -140px; } }
@media all and (min-width: 10000px) {
.mm-menu.mm-fullscreen.mm-front, .mm-menu.mm-fullscreen.mm-next {
left: -10000px; } }
.mm-menu.mm-top.mm-fullscreen.mm-front, .mm-menu.mm-top.mm-fullscreen.mm-next {
top: -100%; }
@media all and (max-height: 140px) {
.mm-menu.mm-top.mm-fullscreen.mm-front, .mm-menu.mm-top.mm-fullscreen.mm-next {
top: -140px; } }
@media all and (min-height: 10000px) {
.mm-menu.mm-top.mm-fullscreen.mm-front, .mm-menu.mm-top.mm-fullscreen.mm-next {
top: -10000px; } }
.mm-menu.mm-right.mm-fullscreen.mm-front, .mm-menu.mm-right.mm-fullscreen.mm-next {
right: -100%; }
@media all and (max-width: 140px) {
.mm-menu.mm-right.mm-fullscreen.mm-front, .mm-menu.mm-right.mm-fullscreen.mm-next {
right: -140px; } }
@media all and (min-width: 10000px) {
.mm-menu.mm-right.mm-fullscreen.mm-front, .mm-menu.mm-right.mm-fullscreen.mm-next {
right: -10000px; } }
.mm-menu.mm-bottom.mm-fullscreen.mm-front, .mm-menu.mm-bottom.mm-fullscreen.mm-next {
bottom: -100%; }
@media all and (max-height: 140px) {
.mm-menu.mm-bottom.mm-fullscreen.mm-front, .mm-menu.mm-bottom.mm-fullscreen.mm-next {
bottom: -140px; } }
@media all and (min-height: 10000px) {
.mm-menu.mm-bottom.mm-fullscreen.mm-front, .mm-menu.mm-bottom.mm-fullscreen.mm-next {
bottom: -10000px; } }
html.mm-front .mm-fixed-top,
html.mm-front .mm-fixed-bottom,
html.mm-opening.mm-front .mm-fixed-top,
html.mm-opening.mm-front .mm-fixed-bottom {
left: 0;
right: auto; }
html.mm-front .mm-fixed-top,
html.mm-opening.mm-front .mm-fixed-top {
top: 0; }
html.mm-front .mm-fixed-bottom,
html.mm-opening.mm-front .mm-fixed-bottom {
bottom: 0; }
html.mm-opened.mm-fullscreen .mm-page {
box-shadow: none !important; }
@@ -0,0 +1,88 @@
/*
jQuery.mmenu IE8 fallback extension CSS
*/
html.mm-opened .mm-page {
box-shadow: none; }
.mm-ismenu {
background: #333333;
color: #adadad; }
.mm-menu .mm-list > li:after {
border-color: #2b2b2b; }
.mm-menu .mm-list > li > a.mm-subclose {
background: #2d2d2d;
color: #707070; }
.mm-menu .mm-list > li > a.mm-subopen:after, .mm-menu .mm-list > li > a.mm-subclose:before {
border-color: #707070; }
.mm-menu .mm-list > li > a.mm-subopen:before {
border-color: #2b2b2b; }
.mm-menu .mm-list > li.mm-selected > a:not(.mm-subopen),
.mm-menu .mm-list > li.mm-selected > span {
background: #2d2d2d; }
.mm-menu .mm-list > li.mm-label {
background: #3d3d3d; }
.mm-menu.mm-vertical .mm-list li.mm-opened > a.mm-subopen,
.mm-menu.mm-vertical .mm-list li.mm-opened > ul {
background: #3d3d3d; }
.mm-menu .mm-search input {
background: #474747;
color: #adadad; }
.mm-menu li.mm-noresults {
color: #707070; }
.mm-menu em.mm-counter {
color: #707070; }
.mm-menu .mm-list li.mm-label > div > div {
background: #3d3d3d; }
.mm-menu .mm-header {
border-color: #2b2b2b;
color: #707070; }
.mm-menu .mm-header a:before {
border-color: #707070; }
html.mm-opened.mm-light .mm-page {
box-shadow: none; }
.mm-ismenu.mm-light {
background: #f3f3f3;
color: #616161; }
.mm-menu.mm-light .mm-list > li:after {
border-color: #dadada; }
.mm-menu.mm-light .mm-list > li > a.mm-subclose {
background: #fafafa;
color: #aaaaaa; }
.mm-menu.mm-light .mm-list > li > a.mm-subopen:after, .mm-menu.mm-light .mm-list > li > a.mm-subclose:before {
border-color: #aaaaaa; }
.mm-menu.mm-light .mm-list > li > a.mm-subopen:before {
border-color: #dadada; }
.mm-menu.mm-light .mm-list > li.mm-selected > a:not(.mm-subopen),
.mm-menu.mm-light .mm-list > li.mm-selected > span {
background: #fafafa; }
.mm-menu.mm-light .mm-list > li.mm-label {
background: #ebebeb; }
.mm-menu.mm-light.mm-vertical .mm-list li.mm-opened > a.mm-subopen,
.mm-menu.mm-light.mm-vertical .mm-list li.mm-opened > ul {
background: #ebebeb; }
.mm-menu.mm-light .mm-search input {
background: #dadada;
color: #616161; }
.mm-menu.mm-light li.mm-noresults {
color: #aaaaaa; }
.mm-menu.mm-light em.mm-counter {
color: #aaaaaa; }
.mm-menu.mm-light .mm-list li.mm-label > div > div {
background: #ebebeb; }
.mm-menu.mm-light .mm-header {
border-color: #dadada;
color: #aaaaaa; }
.mm-menu.mm-light .mm-header a:before {
border-color: #aaaaaa; }
@@ -0,0 +1,243 @@
/*
jQuery.mmenu position extension CSS
*/
.mm-menu.mm-top {
width: 100%; }
html.mm-top.mm-opened .mm-page,
html.mm-top.mm-opened #mm-blocker {
top: 0%; }
html.mm-top.mm-opened.mm-opening .mm-page,
html.mm-top.mm-opened.mm-opening #mm-blocker,
html.mm-top.mm-opened.mm-opening .mm-fixed-top,
html.mm-top.mm-opened.mm-opening .mm-fixed-bottom {
left: 0; }
.mm-menu.mm-right {
left: auto;
right: 0; }
html.mm-right.mm-opened .mm-page,
html.mm-right.mm-opened #mm-blocker,
html.mm-right.mm-opened .mm-fixed-top,
html.mm-right.mm-opened .mm-fixed-bottom {
left: auto;
right: 0%; }
html.mm-right.mm-opened.mm-opening .mm-page,
html.mm-right.mm-opened.mm-opening #mm-blocker,
html.mm-right.mm-opened.mm-opening .mm-fixed-top,
html.mm-right.mm-opened.mm-opening .mm-fixed-bottom {
left: auto; }
.mm-menu.mm-bottom {
width: 100%;
top: auto;
bottom: 0; }
html.mm-bottom.mm-opened .mm-page,
html.mm-bottom.mm-opened #mm-blocker {
bottom: 0%;
top: auto; }
html.mm-bottom.mm-opened.mm-opening .mm-page,
html.mm-bottom.mm-opened.mm-opening #mm-blocker,
html.mm-bottom.mm-opened.mm-opening .mm-fixed-top,
html.mm-bottom.mm-opened.mm-opening .mm-fixed-bottom {
top: auto;
left: 0; }
.mm-menu.mm-top {
height: 80%; }
html.mm-top.mm-opening .mm-page,
html.mm-top.mm-opening #mm-blocker,
html.mm-top.mm-opening .mm-fixed-top {
top: 80%; }
html.mm-top.mm-opening .mm-fixed-bottom {
bottom: -80%; }
@media all and (max-height: 175px) {
.mm-menu.mm-top {
height: 140px; }
html.mm-top.mm-opening .mm-page,
html.mm-top.mm-opening #mm-blocker,
html.mm-top.mm-opening .mm-fixed-top {
top: 140px; }
html.mm-top.mm-opening .mm-fixed-bottom {
bottom: -140px; } }
@media all and (min-height: 1100px) {
.mm-menu.mm-top {
height: 880px; }
html.mm-top.mm-opening .mm-page,
html.mm-top.mm-opening #mm-blocker,
html.mm-top.mm-opening .mm-fixed-top {
top: 880px; }
html.mm-top.mm-opening .mm-fixed-bottom {
bottom: -880px; } }
.mm-menu.mm-right {
width: 80%; }
html.mm-right.mm-opening .mm-page,
html.mm-right.mm-opening #mm-blocker,
html.mm-right.mm-opening .mm-fixed-top,
html.mm-right.mm-opening .mm-fixed-bottom {
right: 80%; }
@media all and (max-width: 175px) {
.mm-menu.mm-right {
width: 140px; }
html.mm-right.mm-opening .mm-page,
html.mm-right.mm-opening #mm-blocker,
html.mm-right.mm-opening .mm-fixed-top,
html.mm-right.mm-opening .mm-fixed-bottom {
right: 140px; } }
@media all and (min-width: 550px) {
.mm-menu.mm-right {
width: 440px; }
html.mm-right.mm-opening .mm-page,
html.mm-right.mm-opening #mm-blocker,
html.mm-right.mm-opening .mm-fixed-top,
html.mm-right.mm-opening .mm-fixed-bottom {
right: 440px; } }
.mm-menu.mm-bottom {
height: 80%; }
html.mm-bottom.mm-opening .mm-page,
html.mm-bottom.mm-opening #mm-blocker,
html.mm-bottom.mm-opening .mm-fixed-bottom {
bottom: 80%; }
html.mm-bottom.mm-opening .mm-fixed-top {
top: -80%; }
@media all and (max-height: 175px) {
.mm-menu.mm-bottom {
height: 140px; }
html.mm-bottom.mm-opening .mm-page,
html.mm-bottom.mm-opening #mm-blocker,
html.mm-bottom.mm-opening .mm-fixed-bottom {
bottom: 140px; }
html.mm-bottom.mm-opening .mm-fixed-top {
top: -140px; } }
@media all and (min-height: 1100px) {
.mm-menu.mm-bottom {
height: 880px; }
html.mm-bottom.mm-opening .mm-page,
html.mm-bottom.mm-opening #mm-blocker,
html.mm-bottom.mm-opening .mm-fixed-bottom {
bottom: 880px; }
html.mm-bottom.mm-opening .mm-fixed-top {
top: -880px; } }
/*
jQuery.mmenu z-position extension CSS
*/
html.mm-front.mm-opened .mm-page {
top: 0 !important;
right: 0 !important;
bottom: 0 !important;
left: 0 !important; }
.mm-menu.mm-front,
.mm-menu.mm-next {
-webkit-transition: none 0.4s ease;
-moz-transition: none 0.4s ease;
-ms-transition: none 0.4s ease;
-o-transition: none 0.4s ease;
transition: none 0.4s ease;
-webkit-transition-property: top, right, bottom, left, -webkit-transform;
-moz-transition-property: top, right, bottom, left, -moz-transform;
-ms-transition-property: top, right, bottom, left, -o-transform;
-o-transition-property: top, right, bottom, left, -o-transform;
transition-property: top, right, bottom, left, transform; }
html.mm-front .mm-page,
html.mm-front #mm-blocker {
z-index: 0; }
.mm-menu.mm-front {
z-index: 1;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.5); }
html.mm-opened.mm-next .mm-page {
box-shadow: none; }
html.mm-opening .mm-menu.mm-front, html.mm-opening .mm-menu.mm-next {
left: 0%; }
.mm-menu.mm-top.mm-front, .mm-menu.mm-top.mm-next {
left: 0; }
html.mm-opening .mm-menu.mm-top.mm-front, html.mm-opening .mm-menu.mm-top.mm-next {
left: 0;
top: 0%; }
.mm-menu.mm-right.mm-front, .mm-menu.mm-right.mm-next {
left: auto; }
html.mm-opening .mm-menu.mm-right.mm-front, html.mm-opening .mm-menu.mm-right.mm-next {
left: auto;
right: 0%; }
.mm-menu.mm-bottom.mm-front, .mm-menu.mm-bottom.mm-next {
top: auto;
left: 0; }
html.mm-opening .mm-menu.mm-bottom.mm-front, html.mm-opening .mm-menu.mm-bottom.mm-next {
left: 0;
bottom: 0%; }
.mm-menu.mm-front, .mm-menu.mm-next {
left: -80%; }
@media all and (max-width: 175px) {
.mm-menu.mm-front, .mm-menu.mm-next {
left: -140px; } }
@media all and (min-width: 550px) {
.mm-menu.mm-front, .mm-menu.mm-next {
left: -440px; } }
.mm-menu.mm-top.mm-front, .mm-menu.mm-top.mm-next {
top: -80%; }
@media all and (max-height: 175px) {
.mm-menu.mm-top.mm-front, .mm-menu.mm-top.mm-next {
top: -140px; } }
@media all and (min-height: 1100px) {
.mm-menu.mm-top.mm-front, .mm-menu.mm-top.mm-next {
top: -880px; } }
.mm-menu.mm-right.mm-front, .mm-menu.mm-right.mm-next {
right: -80%; }
@media all and (max-width: 175px) {
.mm-menu.mm-right.mm-front, .mm-menu.mm-right.mm-next {
right: -140px; } }
@media all and (min-width: 550px) {
.mm-menu.mm-right.mm-front, .mm-menu.mm-right.mm-next {
right: -440px; } }
.mm-menu.mm-bottom.mm-front, .mm-menu.mm-bottom.mm-next {
bottom: -80%; }
@media all and (max-height: 175px) {
.mm-menu.mm-bottom.mm-front, .mm-menu.mm-bottom.mm-next {
bottom: -140px; } }
@media all and (min-height: 1100px) {
.mm-menu.mm-bottom.mm-front, .mm-menu.mm-bottom.mm-next {
bottom: -880px; } }
html.mm-front .mm-fixed-top,
html.mm-front .mm-fixed-bottom,
html.mm-opening.mm-front .mm-fixed-top,
html.mm-opening.mm-front .mm-fixed-bottom {
left: 0;
right: auto; }
html.mm-front .mm-fixed-top,
html.mm-opening.mm-front .mm-fixed-top {
top: 0; }
html.mm-front .mm-fixed-bottom,
html.mm-opening.mm-front .mm-fixed-bottom {
bottom: 0; }
@@ -0,0 +1,131 @@
/*
jQuery.mmenu themes extension CSS
*/
html.mm-opened.mm-light .mm-page {
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); }
.mm-ismenu.mm-light {
background: #f3f3f3;
color: rgba(0, 0, 0, 0.6); }
.mm-menu.mm-light .mm-list > li:after {
border-color: rgba(0, 0, 0, 0.1); }
.mm-menu.mm-light .mm-list > li > a.mm-subclose {
background: rgba(255, 255, 255, 0.6);
color: rgba(0, 0, 0, 0.3); }
.mm-menu.mm-light .mm-list > li > a.mm-subopen:after, .mm-menu.mm-light .mm-list > li > a.mm-subclose:before {
border-color: rgba(0, 0, 0, 0.3); }
.mm-menu.mm-light .mm-list > li > a.mm-subopen:before {
border-color: rgba(0, 0, 0, 0.1); }
.mm-menu.mm-light .mm-list > li.mm-selected > a:not(.mm-subopen),
.mm-menu.mm-light .mm-list > li.mm-selected > span {
background: rgba(255, 255, 255, 0.6); }
.mm-menu.mm-light .mm-list > li.mm-label {
background: rgba(0, 0, 0, 0.03); }
.mm-menu.mm-light.mm-vertical .mm-list li.mm-opened > a.mm-subopen,
.mm-menu.mm-light.mm-vertical .mm-list li.mm-opened > ul {
background: rgba(0, 0, 0, 0.03); }
.mm-menu.mm-light .mm-search input {
background: rgba(0, 0, 0, 0.1);
color: rgba(0, 0, 0, 0.6); }
.mm-menu.mm-light li.mm-noresults {
color: rgba(0, 0, 0, 0.3); }
.mm-menu.mm-light em.mm-counter {
color: rgba(0, 0, 0, 0.3); }
.mm-menu.mm-light .mm-list li.mm-label > div > div {
background: rgba(0, 0, 0, 0.03); }
.mm-menu.mm-light .mm-header {
border-color: rgba(0, 0, 0, 0.1);
color: rgba(0, 0, 0, 0.3); }
.mm-menu.mm-light .mm-header a:before {
border-color: rgba(0, 0, 0, 0.3); }
html.mm-opened.mm-white .mm-page {
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); }
.mm-ismenu.mm-white {
background: white;
color: rgba(0, 0, 0, 0.6); }
.mm-menu.mm-white .mm-list > li:after {
border-color: rgba(0, 0, 0, 0.1); }
.mm-menu.mm-white .mm-list > li > a.mm-subclose {
background: rgba(0, 0, 0, 0.08);
color: rgba(0, 0, 0, 0.3); }
.mm-menu.mm-white .mm-list > li > a.mm-subopen:after, .mm-menu.mm-white .mm-list > li > a.mm-subclose:before {
border-color: rgba(0, 0, 0, 0.3); }
.mm-menu.mm-white .mm-list > li > a.mm-subopen:before {
border-color: rgba(0, 0, 0, 0.1); }
.mm-menu.mm-white .mm-list > li.mm-selected > a:not(.mm-subopen),
.mm-menu.mm-white .mm-list > li.mm-selected > span {
background: rgba(0, 0, 0, 0.08); }
.mm-menu.mm-white .mm-list > li.mm-label {
background: rgba(0, 0, 0, 0.03); }
.mm-menu.mm-white.mm-vertical .mm-list li.mm-opened > a.mm-subopen,
.mm-menu.mm-white.mm-vertical .mm-list li.mm-opened > ul {
background: rgba(0, 0, 0, 0.03); }
.mm-menu.mm-white .mm-search input {
background: rgba(0, 0, 0, 0.1);
color: rgba(0, 0, 0, 0.6); }
.mm-menu.mm-white li.mm-noresults {
color: rgba(0, 0, 0, 0.3); }
.mm-menu.mm-white em.mm-counter {
color: rgba(0, 0, 0, 0.3); }
.mm-menu.mm-white .mm-list li.mm-label > div > div {
background: rgba(0, 0, 0, 0.03); }
.mm-menu.mm-white .mm-header {
border-color: rgba(0, 0, 0, 0.1);
color: rgba(0, 0, 0, 0.3); }
.mm-menu.mm-white .mm-header a:before {
border-color: rgba(0, 0, 0, 0.3); }
html.mm-opened.mm-black .mm-page {
box-shadow: none; }
.mm-ismenu.mm-black {
background: black;
color: rgba(255, 255, 255, 0.6); }
.mm-menu.mm-black .mm-list > li:after {
border-color: rgba(255, 255, 255, 0.2); }
.mm-menu.mm-black .mm-list > li > a.mm-subclose {
background: rgba(255, 255, 255, 0.25);
color: rgba(255, 255, 255, 0.3); }
.mm-menu.mm-black .mm-list > li > a.mm-subopen:after, .mm-menu.mm-black .mm-list > li > a.mm-subclose:before {
border-color: rgba(255, 255, 255, 0.3); }
.mm-menu.mm-black .mm-list > li > a.mm-subopen:before {
border-color: rgba(255, 255, 255, 0.2); }
.mm-menu.mm-black .mm-list > li.mm-selected > a:not(.mm-subopen),
.mm-menu.mm-black .mm-list > li.mm-selected > span {
background: rgba(255, 255, 255, 0.25); }
.mm-menu.mm-black .mm-list > li.mm-label {
background: rgba(255, 255, 255, 0.15); }
.mm-menu.mm-black.mm-vertical .mm-list li.mm-opened > a.mm-subopen,
.mm-menu.mm-black.mm-vertical .mm-list li.mm-opened > ul {
background: rgba(255, 255, 255, 0.15); }
.mm-menu.mm-black .mm-search input {
background: rgba(255, 255, 255, 0.3);
color: rgba(255, 255, 255, 0.6); }
.mm-menu.mm-black li.mm-noresults {
color: rgba(255, 255, 255, 0.3); }
.mm-menu.mm-black em.mm-counter {
color: rgba(255, 255, 255, 0.3); }
.mm-menu.mm-black .mm-list li.mm-label > div > div {
background: rgba(255, 255, 255, 0.15); }
.mm-menu.mm-black .mm-header {
border-color: rgba(255, 255, 255, 0.2);
color: rgba(255, 255, 255, 0.3); }
.mm-menu.mm-black .mm-header a:before {
border-color: rgba(255, 255, 255, 0.3); }
@@ -0,0 +1,42 @@
/*
jQuery.mmenu widescreen extension CSS
*/
html, body {
height: 100% !important;
overflow: auto !important; }
body {
position: relative; }
#mm-blocker {
display: none !important; }
.mm-page {
box-shadow: none !important;
background: inherit;
width: 70% !important;
min-height: 100% !important;
height: auto !important;
margin: 0 !important;
left: 30% !important;
top: 0 !important;
position: relative !important;
z-index: 1;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
-o-box-sizing: border-box;
box-sizing: border-box; }
.mm-menu {
position: fixed;
z-index: 0;
width: 30% !important;
padding: 0; }
.mm-menu.mm-top, .mm-menu.mm-right, .mm-menu.mm-bottom {
top: 0 !important;
right: auto !important;
bottom: auto !important;
left: 0 !important; }
.mm-menu:first-child, .mm-menu.mm-current {
display: block; }
File diff suppressed because it is too large Load Diff
+302
View File
@@ -0,0 +1,302 @@
/*
jQuery.mmenu CSS
*/
.mm-page,
.mm-fixed-top,
.mm-fixed-bottom,
.mm-menu.mm-horizontal > .mm-panel {
-webkit-transition: none 0.4s ease;
-moz-transition: none 0.4s ease;
-ms-transition: none 0.4s ease;
-o-transition: none 0.4s ease;
transition: none 0.4s ease;
-webkit-transition-property: top, right, bottom, left, border;
-moz-transition-property: top, right, bottom, left, border;
-ms-transition-property: top, right, bottom, left, border;
-o-transition-property: top, right, bottom, left, border;
transition-property: top, right, bottom, left, border; }
html.mm-opened .mm-page,
html.mm-opened #mm-blocker {
left: 0;
top: 0;
margin: 0;
border: 0px solid rgba(0, 0, 0, 0); }
html.mm-opening .mm-page,
html.mm-opening #mm-blocker {
border: 0px solid rgba(100, 100, 100, 0); }
.mm-menu .mm-hidden {
display: none; }
.mm-fixed-top,
.mm-fixed-bottom {
position: fixed;
left: 0; }
.mm-fixed-top {
top: 0; }
.mm-fixed-bottom {
bottom: 0; }
html.mm-opened .mm-page,
.mm-menu > .mm-panel {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
-o-box-sizing: border-box;
box-sizing: border-box; }
html.mm-opened {
overflow-x: hidden;
position: relative; }
html.mm-opened .mm-page {
position: relative; }
html.mm-background .mm-page {
background: inherit; }
#mm-blocker {
background: url(data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==) transparent;
display: none;
width: 100%;
height: 100%;
position: fixed;
z-index: 999999; }
html.mm-opened #mm-blocker,
html.mm-blocking #mm-blocker {
display: block; }
.mm-menu.mm-current {
display: block; }
.mm-menu {
background: inherit;
display: none;
overflow: hidden;
height: 100%;
padding: 0;
position: fixed;
left: 0;
top: 0;
z-index: 0; }
.mm-menu > .mm-panel {
background: inherit;
-webkit-overflow-scrolling: touch;
overflow: scroll;
overflow-x: hidden;
overflow-y: auto;
width: 100%;
height: 100%;
padding: 20px;
position: absolute;
top: 0;
left: 100%;
z-index: 0; }
.mm-menu > .mm-panel.mm-opened {
left: 0%; }
.mm-menu > .mm-panel.mm-subopened {
left: -40%; }
.mm-menu > .mm-panel.mm-highest {
z-index: 1; }
.mm-menu > .mm-panel.mm-hidden {
display: block;
visibility: hidden; }
.mm-menu .mm-list {
padding: 20px 0; }
.mm-menu > .mm-list {
padding: 20px 0 40px 0; }
.mm-panel > .mm-list {
margin-left: -20px;
margin-right: -20px; }
.mm-panel > .mm-list:first-child {
padding-top: 0; }
.mm-list,
.mm-list > li {
list-style: none;
display: block;
padding: 0;
margin: 0; }
.mm-list {
font: inherit;
font-size: 14px; }
.mm-list a,
.mm-list a:hover {
text-decoration: none; }
.mm-list > li {
position: relative; }
.mm-list > li > a,
.mm-list > li > span {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
color: inherit;
line-height: 20px;
display: block;
padding: 10px 10px 10px 20px;
margin: 0; }
.mm-list > li:not(.mm-subtitle):not(.mm-label):not(.mm-noresults):after {
content: '';
border-bottom-width: 1px;
border-bottom-style: solid;
display: block;
width: 100%;
position: absolute;
bottom: 0;
left: 0; }
.mm-list > li:not(.mm-subtitle):not(.mm-label):not(.mm-noresults):after {
width: auto;
margin-left: 20px;
position: relative;
left: auto; }
.mm-list a.mm-subopen {
width: 40px;
height: 100%;
padding: 0;
position: absolute;
right: 0;
top: 0;
z-index: 2; }
.mm-list a.mm-subopen:before {
content: '';
border-left-width: 1px;
border-left-style: solid;
display: block;
height: 100%;
position: absolute;
left: 0;
top: 0; }
.mm-list a.mm-subopen.mm-fullsubopen {
width: 100%; }
.mm-list a.mm-subopen.mm-fullsubopen:before {
border-left: none; }
.mm-list a.mm-subopen + a,
.mm-list a.mm-subopen + span {
padding-right: 5px;
margin-right: 40px; }
.mm-list > li.mm-selected > a.mm-subopen {
background: transparent; }
.mm-list > li.mm-selected > a.mm-fullsubopen + a,
.mm-list > li.mm-selected > a.mm-fullsubopen + span {
padding-right: 45px;
margin-right: 0; }
.mm-list a.mm-subclose {
text-indent: 20px;
padding-top: 30px;
margin-top: -20px; }
.mm-list > li.mm-label {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
font-size: 10px;
text-transform: uppercase;
text-indent: 20px;
line-height: 25px;
padding-right: 5px; }
.mm-list > li.mm-spacer {
padding-top: 40px; }
.mm-list > li.mm-spacer.mm-label {
padding-top: 25px; }
.mm-list a.mm-subopen:after,
.mm-list a.mm-subclose:before {
content: '';
border: 2px solid transparent;
display: block;
width: 7px;
height: 7px;
margin-bottom: -5px;
position: absolute;
bottom: 50%;
-webkit-transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
-o-transform: rotate(-45deg);
transform: rotate(-45deg); }
.mm-list a.mm-subopen:after {
border-top: none;
border-left: none;
right: 18px; }
.mm-list a.mm-subclose:before {
border-right: none;
border-bottom: none;
margin-bottom: -15px;
left: 22px; }
.mm-menu.mm-vertical .mm-list .mm-panel {
display: none;
padding: 10px 0 10px 10px; }
.mm-menu.mm-vertical .mm-list .mm-panel li:last-child:after {
border-color: transparent; }
.mm-menu.mm-vertical .mm-list li.mm-opened > .mm-panel {
display: block; }
.mm-menu.mm-vertical .mm-list > li.mm-opened > a.mm-subopen {
height: 40px; }
.mm-menu.mm-vertical .mm-list > li.mm-opened > a.mm-subopen:after {
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-ms-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg);
top: 16px;
right: 16px; }
html.mm-opened .mm-page {
box-shadow: 0 0 20px rgba(0, 0, 0, 0.5); }
.mm-ismenu {
background: #333333;
color: rgba(255, 255, 255, 0.6); }
.mm-menu .mm-list > li:after {
border-color: rgba(0, 0, 0, 0.15); }
.mm-menu .mm-list > li > a.mm-subclose {
background: rgba(0, 0, 0, 0.1);
color: rgba(255, 255, 255, 0.3); }
.mm-menu .mm-list > li > a.mm-subopen:after, .mm-menu .mm-list > li > a.mm-subclose:before {
border-color: rgba(255, 255, 255, 0.3); }
.mm-menu .mm-list > li > a.mm-subopen:before {
border-color: rgba(0, 0, 0, 0.15); }
.mm-menu .mm-list > li.mm-selected > a:not(.mm-subopen),
.mm-menu .mm-list > li.mm-selected > span {
background: rgba(0, 0, 0, 0.1); }
.mm-menu .mm-list > li.mm-label {
background: rgba(255, 255, 255, 0.05); }
.mm-menu.mm-vertical .mm-list li.mm-opened > a.mm-subopen,
.mm-menu.mm-vertical .mm-list li.mm-opened > ul {
background: rgba(255, 255, 255, 0.05); }
html.mm-opening .mm-page,
html.mm-opening #mm-blocker,
html.mm-opening .mm-fixed-top,
html.mm-opening .mm-fixed-bottom {
left: 80%; }
.mm-menu {
width: 80%; }
@media all and (max-width: 175px) {
.mm-menu {
width: 140px; }
html.mm-opening .mm-page,
html.mm-opening #mm-blocker,
html.mm-opening .mm-fixed-top,
html.mm-opening .mm-fixed-bottom {
left: 140px; } }
@media all and (min-width: 550px) {
.mm-menu {
width: 440px; }
html.mm-opening .mm-page,
html.mm-opening #mm-blocker,
html.mm-opening .mm-fixed-top,
html.mm-opening .mm-fixed-bottom {
left: 440px; } }
@@ -0,0 +1,151 @@
/*
* jQuery mmenu counters addon
* mmenu.frebsite.nl
*
* Copyright (c) Fred Heusschen
* www.frebsite.nl
*
* Dual licensed under the MIT and GPL licenses.
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*/
(function( $ ) {
var _PLUGIN_ = 'mmenu',
_ADDON_ = 'counters';
$[ _PLUGIN_ ].prototype[ '_addon_' + _ADDON_ ] = function()
{
var that = this,
opts = this.opts[ _ADDON_ ];
var _c = $[ _PLUGIN_ ]._c,
_d = $[ _PLUGIN_ ]._d,
_e = $[ _PLUGIN_ ]._e;
_c.add( 'counter noresults' );
_e.add( 'updatecounters' );
// Extend options
if ( typeof opts == 'boolean' )
{
opts = {
add : opts,
update : opts
};
}
if ( typeof opts != 'object' )
{
opts = {};
}
opts = $.extend( true, {}, $[ _PLUGIN_ ].defaults[ _ADDON_ ], opts );
// DEPRECATED
if ( opts.count )
{
$[ _PLUGIN_ ].deprecated( 'the option "count" for counters, the option "update"' );
opts.update = opts.count;
}
// /DEPRECATED
// Refactor counter class
this.__refactorClass( $('em.' + this.conf.counterClass, this.$menu), 'counter' );
var $panels = $('.' + _c.panel, this.$menu);
// Add the counters
if ( opts.add )
{
$panels.each(
function()
{
var $t = $(this),
$p = $t.data( _d.parent );
if ( $p )
{
var $c = $( '<em class="' + _c.counter + '" />' ),
$a = $p.find( '> a.' + _c.subopen );
if ( !$a.parent().find( 'em.' + _c.counter ).length )
{
$a.before( $c );
}
}
}
);
}
// Bind custom events
if ( opts.update )
{
var $counters = $('em.' + _c.counter, this.$menu);
$counters
.off( _e.updatecounters )
.on( _e.updatecounters,
function( e )
{
e.stopPropagation();
}
)
.each(
function()
{
var $counter = $(this),
$sublist = $($counter.next().attr( 'href' ), that.$menu);
if ( !$sublist.is( '.' + _c.list ) )
{
$sublist = $sublist.find( '> .' + _c.list );
}
if ( $sublist.length )
{
$counter
.on( _e.updatecounters,
function( e )
{
var $lis = $sublist.children()
.not( '.' + _c.label )
.not( '.' + _c.subtitle )
.not( '.' + _c.hidden )
.not( '.' + _c.noresults );
$counter.html( $lis.length );
}
);
}
}
)
.trigger( _e.updatecounters );
// Update with menu-update
this.$menu
.on( _e.update,
function( e )
{
$counters.trigger( _e.updatecounters );
}
);
}
};
$[ _PLUGIN_ ].defaults[ _ADDON_ ] = {
add : false,
update : false
};
$[ _PLUGIN_ ].configuration.counterClass = 'Counter';
// Add to plugin
$[ _PLUGIN_ ].addons = $[ _PLUGIN_ ].addons || [];
$[ _PLUGIN_ ].addons.push( _ADDON_ );
})( jQuery );
+12
View File
@@ -0,0 +1,12 @@
/*
* jQuery mmenu counters addon
* mmenu.frebsite.nl
*
* Copyright (c) Fred Heusschen
* www.frebsite.nl
*
* Dual licensed under the MIT and GPL licenses.
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*/
!function(t){var e="mmenu",n="counters";t[e].prototype["_addon_"+n]=function(){var o=this,u=this.opts[n],a=t[e]._c,r=t[e]._d,d=t[e]._e;a.add("counter noresults"),d.add("updatecounters"),"boolean"==typeof u&&(u={add:u,update:u}),"object"!=typeof u&&(u={}),u=t.extend(!0,{},t[e].defaults[n],u),u.count&&(t[e].deprecated('the option "count" for counters, the option "update"'),u.update=u.count),this.__refactorClass(t("em."+this.conf.counterClass,this.$menu),"counter");var s=t("."+a.panel,this.$menu);if(u.add&&s.each(function(){var e=t(this),n=e.data(r.parent);if(n){var o=t('<em class="'+a.counter+'" />'),u=n.find("> a."+a.subopen);u.parent().find("em."+a.counter).length||u.before(o)}}),u.update){var c=t("em."+a.counter,this.$menu);c.off(d.updatecounters).on(d.updatecounters,function(t){t.stopPropagation()}).each(function(){var e=t(this),n=t(e.next().attr("href"),o.$menu);n.is("."+a.list)||(n=n.find("> ."+a.list)),n.length&&e.on(d.updatecounters,function(){var t=n.children().not("."+a.label).not("."+a.subtitle).not("."+a.hidden).not("."+a.noresults);e.html(t.length)})}).trigger(d.updatecounters),this.$menu.on(d.update,function(){c.trigger(d.updatecounters)})}},t[e].defaults[n]={add:!1,update:!1},t[e].configuration.counterClass="Counter",t[e].addons=t[e].addons||[],t[e].addons.push(n)}(jQuery);
@@ -0,0 +1,294 @@
/*
* jQuery mmenu dragOpen addon
* mmenu.frebsite.nl
*
* Copyright (c) Fred Heusschen
* www.frebsite.nl
*
* Dual licensed under the MIT and GPL licenses.
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*/
(function( $ ) {
var _PLUGIN_ = 'mmenu',
_ADDON_ = 'dragOpen';
$[ _PLUGIN_ ].prototype[ '_addon_' + _ADDON_ ] = function()
{
var that = this,
opts = this.opts[ _ADDON_ ];
if ( !$.fn.hammer )
{
return;
}
var _c = $[ _PLUGIN_ ]._c,
_d = $[ _PLUGIN_ ]._d,
_e = $[ _PLUGIN_ ]._e;
_c.add( 'dragging' );
_e.add( 'dragleft dragright dragup dragdown dragend' );
var glbl = $[ _PLUGIN_ ].glbl;
// Extend options
if ( typeof opts == 'boolean' )
{
opts = {
open: opts
};
}
if ( typeof opts != 'object' )
{
opts = {};
}
if ( typeof opts.maxStartPos != 'number' )
{
opts.maxStartPos = this.opts.position == 'left' || this.opts.position == 'right'
? 150
: 75;
}
opts = $.extend( true, {}, $[ _PLUGIN_ ].defaults[ _ADDON_ ], opts );
if ( opts.open )
{
var _stage = 0,
_direction = false,
_distance = 0,
_maxDistance = 0,
_dimension = 'width';
switch( this.opts.position )
{
case 'left':
case 'right':
_dimension = 'width';
break;
default:
_dimension = 'height';
break;
}
// Set up variables
switch( this.opts.position )
{
case 'left':
var drag = {
events : _e.dragleft + ' ' + _e.dragright,
open_dir : 'right',
close_dir : 'left',
delta : 'deltaX',
page : 'pageX',
negative : false
};
break;
case 'right':
var drag = {
events : _e.dragleft + ' ' + _e.dragright,
open_dir : 'left',
close_dir : 'right',
delta : 'deltaX',
page : 'pageX',
negative : true
};
break;
case 'top':
var drag = {
events : _e.dragup + ' ' + _e.dragdown,
open_dir : 'down',
close_dir : 'up',
delta : 'deltaY',
page : 'pageY',
negative : false
};
break;
case 'bottom':
var drag = {
events : _e.dragup + ' ' + _e.dragdown,
open_dir : 'up',
close_dir : 'down',
delta : 'deltaY',
page : 'pageY',
negative : true
};
break;
}
var $dragNode = this.__valueOrFn( opts.pageNode, this.$menu, glbl.$page );
if ( typeof $dragNode == 'string' )
{
$dragNode = $($dragNode);
}
var $fixed = glbl.$page.find( '.' + _c.mm( 'fixed-top' ) + ', .' + _c.mm( 'fixed-bottom' ) ),
$dragg = glbl.$page;
switch ( that.opts.zposition )
{
case 'back':
$dragg = $dragg.add( $fixed );
break;
case 'front':
$dragg = that.$menu;
break;
case 'next':
$dragg = $dragg.add( that.$menu ).add( $fixed );
break;
};
// Bind events
$dragNode
.hammer()
.on( _e.touchstart + ' ' + _e.mousedown,
function( e )
{
if ( e.type == 'touchstart' )
{
var tch = e.originalEvent.touches[ 0 ] || e.originalEvent.changedTouches[ 0 ],
pos = tch[ drag.page ];
}
else if ( e.type == 'mousedown' )
{
var pos = e[ drag.page ];
}
switch( that.opts.position )
{
case 'right':
case 'bottom':
if ( pos >= glbl.$wndw[ _dimension ]() - opts.maxStartPos )
{
_stage = 1;
}
break;
default:
if ( pos <= opts.maxStartPos )
{
_stage = 1;
}
break;
}
}
)
.on( drag.events + ' ' + _e.dragend,
function( e )
{
if ( _stage > 0 )
{
e.gesture.preventDefault();
e.stopPropagation();
}
}
)
.on( drag.events,
function( e )
{
var new_distance = drag.negative
? -e.gesture[ drag.delta ]
: e.gesture[ drag.delta ];
_direction = ( new_distance > _distance )
? drag.open_dir
: drag.close_dir;
_distance = new_distance;
if ( _distance > opts.threshold )
{
if ( _stage == 1 )
{
if ( glbl.$html.hasClass( _c.opened ) )
{
return;
}
_stage = 2;
that._openSetup();
glbl.$html.addClass( _c.dragging );
_maxDistance = minMax(
glbl.$wndw[ _dimension ]() * that.conf[ _ADDON_ ][ _dimension ].perc,
that.conf[ _ADDON_ ][ _dimension ].min,
that.conf[ _ADDON_ ][ _dimension ].max
);
}
}
if ( _stage == 2 )
{
$dragg.css( that.opts.position, minMax( _distance, 10, _maxDistance ) - ( that.opts.zposition == 'front' ? _maxDistance : 0 ) );
}
}
)
.on( _e.dragend,
function( e )
{
if ( _stage == 2 )
{
glbl.$html.removeClass( _c.dragging );
$dragg.css( that.opts.position, '' );
if ( _direction == drag.open_dir )
{
that._openFinish();
}
else
{
that.close();
}
}
_stage = 0;
}
);
}
};
$[ _PLUGIN_ ].defaults[ _ADDON_ ] = {
open : false,
// pageNode : null,
// maxStartPos : null,
threshold : 50
};
$[ _PLUGIN_ ].configuration[ _ADDON_ ] = {
width : {
perc : 0.8,
min : 140,
max : 440
},
height : {
perc : 0.8,
min : 140,
max : 880
}
};
// Add to plugin
$[ _PLUGIN_ ].addons = $[ _PLUGIN_ ].addons || [];
$[ _PLUGIN_ ].addons.push( _ADDON_ );
// Functions
function minMax( val, min, max )
{
if ( val < min )
{
val = min;
}
if ( val > max )
{
val = max;
}
return val;
}
})( jQuery );
+12
View File
@@ -0,0 +1,12 @@
/*
* jQuery mmenu dragOpen addon
* mmenu.frebsite.nl
*
* Copyright (c) Fred Heusschen
* www.frebsite.nl
*
* Dual licensed under the MIT and GPL licenses.
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*/
!function(e){function t(e,t,a){return t>e&&(e=t),e>a&&(e=a),e}var a="mmenu",o="dragOpen";e[a].prototype["_addon_"+o]=function(){var n=this,r=this.opts[o];if(e.fn.hammer){var i=e[a]._c,s=(e[a]._d,e[a]._e);i.add("dragging"),s.add("dragleft dragright dragup dragdown dragend");var d=e[a].glbl;if("boolean"==typeof r&&(r={open:r}),"object"!=typeof r&&(r={}),"number"!=typeof r.maxStartPos&&(r.maxStartPos="left"==this.opts.position||"right"==this.opts.position?150:75),r=e.extend(!0,{},e[a].defaults[o],r),r.open){var p=0,g=!1,c=0,h=0,l="width";switch(this.opts.position){case"left":case"right":l="width";break;default:l="height"}switch(this.opts.position){case"left":var f={events:s.dragleft+" "+s.dragright,open_dir:"right",close_dir:"left",delta:"deltaX",page:"pageX",negative:!1};break;case"right":var f={events:s.dragleft+" "+s.dragright,open_dir:"left",close_dir:"right",delta:"deltaX",page:"pageX",negative:!0};break;case"top":var f={events:s.dragup+" "+s.dragdown,open_dir:"down",close_dir:"up",delta:"deltaY",page:"pageY",negative:!1};break;case"bottom":var f={events:s.dragup+" "+s.dragdown,open_dir:"up",close_dir:"down",delta:"deltaY",page:"pageY",negative:!0}}var u=this.__valueOrFn(r.pageNode,this.$menu,d.$page);"string"==typeof u&&(u=e(u));var m=d.$page.find("."+i.mm("fixed-top")+", ."+i.mm("fixed-bottom")),v=d.$page;switch(n.opts.zposition){case"back":v=v.add(m);break;case"front":v=n.$menu;break;case"next":v=v.add(n.$menu).add(m)}u.hammer().on(s.touchstart+" "+s.mousedown,function(e){if("touchstart"==e.type)var t=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0],a=t[f.page];else if("mousedown"==e.type)var a=e[f.page];switch(n.opts.position){case"right":case"bottom":a>=d.$wndw[l]()-r.maxStartPos&&(p=1);break;default:a<=r.maxStartPos&&(p=1)}}).on(f.events+" "+s.dragend,function(e){p>0&&(e.gesture.preventDefault(),e.stopPropagation())}).on(f.events,function(e){var a=f.negative?-e.gesture[f.delta]:e.gesture[f.delta];if(g=a>c?f.open_dir:f.close_dir,c=a,c>r.threshold&&1==p){if(d.$html.hasClass(i.opened))return;p=2,n._openSetup(),d.$html.addClass(i.dragging),h=t(d.$wndw[l]()*n.conf[o][l].perc,n.conf[o][l].min,n.conf[o][l].max)}2==p&&v.css(n.opts.position,t(c,10,h)-("front"==n.opts.zposition?h:0))}).on(s.dragend,function(){2==p&&(d.$html.removeClass(i.dragging),v.css(n.opts.position,""),g==f.open_dir?n._openFinish():n.close()),p=0})}}},e[a].defaults[o]={open:!1,threshold:50},e[a].configuration[o]={width:{perc:.8,min:140,max:440},height:{perc:.8,min:140,max:880}},e[a].addons=e[a].addons||[],e[a].addons.push(o)}(jQuery);
@@ -0,0 +1,167 @@
/*
* jQuery mmenu header addon
* mmenu.frebsite.nl
*
* Copyright (c) Fred Heusschen
* www.frebsite.nl
*
* Dual licensed under the MIT and GPL licenses.
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*/
(function( $ ) {
var _PLUGIN_ = 'mmenu',
_ADDON_ = 'header';
$[ _PLUGIN_ ].prototype[ '_addon_' + _ADDON_ ] = function()
{
var that = this,
opts = this.opts[ _ADDON_ ],
conf = this.conf[ _ADDON_ ];
var _c = $[ _PLUGIN_ ]._c,
_d = $[ _PLUGIN_ ]._d,
_e = $[ _PLUGIN_ ]._e;
_c.add( 'header hasheader prev next title titletext' );
_e.add( 'updateheader' );
var glbl = $[ _PLUGIN_ ].glbl;
// Extend options
if ( typeof opts == 'boolean' )
{
opts = {
add : opts,
update : opts
};
}
if ( typeof opts != 'object' )
{
opts = {};
}
opts = $.extend( true, {}, $[ _PLUGIN_ ].defaults[ _ADDON_ ], opts );
// Add the HTML
if ( opts.add )
{
var content = opts.content
? opts.content
: '<a class="' + _c.prev + '" href="#"></a><span class="' + _c.title + '"></span><a class="' + _c.next + '" href="#"></a>';
$( '<div class="' + _c.header + '" />' )
.prependTo( this.$menu )
.append( content );
}
var $header = $('div.' + _c.header, this.$menu);
if ( $header.length )
{
this.$menu.addClass( _c.hasheader );
}
if ( opts.update )
{
if ( $header.length )
{
var $titl = $header.find( '.' + _c.title ),
$prev = $header.find( '.' + _c.prev ),
$next = $header.find( '.' + _c.next ),
_page = '#' + glbl.$page.attr( 'id' );
$prev.add( $next ).on( _e.click,
function( e )
{
e.preventDefault();
e.stopPropagation();
var href = $(this).attr( 'href' );
if ( href !== '#' )
{
if ( href == _page )
{
that.$menu.trigger( _e.close );
}
else
{
$(href, that.$menu).trigger( _e.open );
}
}
}
);
$('.' + _c.panel, this.$menu)
.each(
function()
{
var $t = $(this);
// Find title, prev and next
var titl = $('.' + conf.panelHeaderClass, $t).text(),
prev = $('.' + conf.panelPrevClass, $t).attr( 'href' ),
next = $('.' + conf.panelNextClass, $t).attr( 'href' );
if ( !titl )
{
titl = $('.' + _c.subclose, $t).text();
}
if ( !titl )
{
titl = opts.title;
}
if ( !prev )
{
prev = $('.' + _c.subclose, $t).attr( 'href' );
}
// Update header info
$t.off( _e.updateheader )
.on( _e.updateheader,
function( e )
{
e.stopPropagation();
$titl[ titl ? 'show' : 'hide' ]().text( titl );
$prev[ prev ? 'show' : 'hide' ]().attr( 'href', prev );
$next[ next ? 'show' : 'hide' ]().attr( 'href', next );
}
);
$t.on( _e.open,
function( e )
{
$(this).trigger( _e.updateheader );
}
);
}
)
.filter( '.' + _c.current )
.trigger( _e.updateheader );
}
}
};
$[ _PLUGIN_ ].defaults[ _ADDON_ ] = {
add : false,
content : false,
update : false,
title : 'Menu',
};
$[ _PLUGIN_ ].configuration[ _ADDON_ ] = {
panelHeaderClass : 'Header',
panelNextClass : 'Next',
panelPrevClass : 'Prev'
}
// Add to plugin
$[ _PLUGIN_ ].addons = $[ _PLUGIN_ ].addons || [];
$[ _PLUGIN_ ].addons.push( _ADDON_ );
})( jQuery );
+12
View File
@@ -0,0 +1,12 @@
/*
* jQuery mmenu header addon
* mmenu.frebsite.nl
*
* Copyright (c) Fred Heusschen
* www.frebsite.nl
*
* Dual licensed under the MIT and GPL licenses.
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*/
!function(e){var t="mmenu",a="header";e[t].prototype["_addon_"+a]=function(){var n=this,r=this.opts[a],d=this.conf[a],s=e[t]._c,i=(e[t]._d,e[t]._e);s.add("header hasheader prev next title titletext"),i.add("updateheader");var o=e[t].glbl;if("boolean"==typeof r&&(r={add:r,update:r}),"object"!=typeof r&&(r={}),r=e.extend(!0,{},e[t].defaults[a],r),r.add){var h=r.content?r.content:'<a class="'+s.prev+'" href="#"></a><span class="'+s.title+'"></span><a class="'+s.next+'" href="#"></a>';e('<div class="'+s.header+'" />').prependTo(this.$menu).append(h)}var p=e("div."+s.header,this.$menu);if(p.length&&this.$menu.addClass(s.hasheader),r.update&&p.length){var l=p.find("."+s.title),u=p.find("."+s.prev),f=p.find("."+s.next),c="#"+o.$page.attr("id");u.add(f).on(i.click,function(t){t.preventDefault(),t.stopPropagation();var a=e(this).attr("href");"#"!==a&&(a==c?n.$menu.trigger(i.close):e(a,n.$menu).trigger(i.open))}),e("."+s.panel,this.$menu).each(function(){var t=e(this),a=e("."+d.panelHeaderClass,t).text(),n=e("."+d.panelPrevClass,t).attr("href"),o=e("."+d.panelNextClass,t).attr("href");a||(a=e("."+s.subclose,t).text()),a||(a=r.title),n||(n=e("."+s.subclose,t).attr("href")),t.off(i.updateheader).on(i.updateheader,function(e){e.stopPropagation(),l[a?"show":"hide"]().text(a),u[n?"show":"hide"]().attr("href",n),f[o?"show":"hide"]().attr("href",o)}),t.on(i.open,function(){e(this).trigger(i.updateheader)})}).filter("."+s.current).trigger(i.updateheader)}},e[t].defaults[a]={add:!1,content:!1,update:!1,title:"Menu"},e[t].configuration[a]={panelHeaderClass:"Header",panelNextClass:"Next",panelPrevClass:"Prev"},e[t].addons=e[t].addons||[],e[t].addons.push(a)}(jQuery);
@@ -0,0 +1,250 @@
/*
* jQuery mmenu labels addon
* mmenu.frebsite.nl
*
* Copyright (c) Fred Heusschen
* www.frebsite.nl
*
* Dual licensed under the MIT and GPL licenses.
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*/
(function( $ ) {
var _PLUGIN_ = 'mmenu',
_ADDON_ = 'labels';
$[ _PLUGIN_ ].prototype[ '_addon_' + _ADDON_ ] = function()
{
var that = this,
opts = this.opts[ _ADDON_ ];
var _c = $[ _PLUGIN_ ]._c,
_d = $[ _PLUGIN_ ]._d,
_e = $[ _PLUGIN_ ]._e;
_c.add( 'collapsed' );
_c.add( 'fixedlabels original clone' );
_e.add( 'updatelabels position scroll' );
if ( $[ _PLUGIN_ ].support.touch )
{
_e.scroll += ' ' + _e.mm( 'touchmove' );
}
// Extend options
if ( typeof opts == 'boolean' )
{
opts = {
collapse: opts
};
}
if ( typeof opts != 'object' )
{
opts = {};
}
opts = $.extend( true, {}, $[ _PLUGIN_ ].defaults[ _ADDON_ ], opts );
// Toggle collapsed labels
if ( opts.collapse )
{
// Refactor collapsed class
this.__refactorClass( $('li.' + this.conf.collapsedClass, this.$menu), 'collapsed' );
var $labels = $('.' + _c.label, this.$menu);
$labels
.each(
function()
{
var $label = $(this),
$expan = $label.nextUntil( '.' + _c.label, ( opts.collapse == 'all' ) ? null : '.' + _c.collapsed );
if ( opts.collapse == 'all' )
{
$label.addClass( _c.opened );
$expan.removeClass( _c.collapsed );
}
if ( $expan.length )
{
$label.wrapInner( '<span />' );
$('<a href="#" class="' + _c.subopen + ' ' + _c.fullsubopen + '" />')
.prependTo( $label )
.on(
_e.click,
function( e )
{
e.preventDefault();
$label.toggleClass( _c.opened );
$expan[ $label.hasClass( _c.opened ) ? 'removeClass' : 'addClass' ]( _c.collapsed );
}
);
}
}
);
}
// Fixed labels
else if ( opts.fixed )
{
if ( this.direction != 'horizontal' )
{
return;
}
this.$menu.addClass( _c.fixedlabels );
var $panels = $('.' + _c.panel, this.$menu),
$labels = $('.' + _c.label, this.$menu);
$panels.add( $labels )
.off( _e.updatelabels + ' ' + _e.position + ' ' + _e.scroll )
.on( _e.updatelabels + ' ' + _e.position + ' ' + _e.scroll,
function( e )
{
e.stopPropagation();
}
);
var offset = getPanelsOffset();
$panels.each(
function()
{
var $panel = $(this),
$labels = $panel.find( '.' + _c.label );
if ( $labels.length )
{
var scrollTop = $panel.scrollTop();
$labels.each(
function()
{
var $label = $(this);
// Add extra markup
$label
.wrapInner( '<div />' )
.wrapInner( '<div />' );
var $inner = $label.find( '> div' ),
$next = $();
var top, bottom, height;
// Update appearences
$label
.on( _e.updatelabels,
function( e )
{
scrollTop = $panel.scrollTop();
if ( !$label.hasClass( _c.hidden ) )
{
$next = $label.nextAll( '.' + _c.label ).not( '.' + _c.hidden ).first();
top = $label.offset().top + scrollTop;
bottom = $next.length ? $next.offset().top + scrollTop : false;
height = $inner.height();
$label.trigger( _e.position );
}
}
);
// Set position
$label
.on( _e.position,
function( e )
{
var _top = 0;
if ( bottom && scrollTop + offset > bottom - height )
{
_top = bottom - top - height;
}
else if ( scrollTop + offset > top )
{
_top = scrollTop - top + offset;
}
$inner.css( 'top', _top );
}
);
}
);
// Bind update and scrolling events
$panel
.on( _e.updatelabels,
function( e )
{
scrollTop = $panel.scrollTop();
offset = getPanelsOffset();
$labels.trigger( _e.position );
}
)
.on( _e.scroll,
function( e )
{
$labels.trigger( _e.updatelabels );
}
);
}
}
);
// Update with menu-update
this.$menu
.on( _e.update,
function( e )
{
$panels
.trigger( _e.updatelabels );
}
)
.on( _e.opening,
function( e )
{
$panels
.trigger( _e.updatelabels )
.trigger( _e.scroll );
}
);
}
function getPanelsOffset()
{
var hassearch = _c.hassearch && that.$menu.hasClass( _c.hassearch ),
hasheader = _c.hasheader && that.$menu.hasClass( _c.hasheader );
return hassearch
? hasheader
? 100
: 50
: hasheader
? 60
: 0;
}
};
$[ _PLUGIN_ ].defaults[ _ADDON_ ] = {
fixed : false,
collapse : false
};
$[ _PLUGIN_ ].configuration.collapsedClass = 'Collapsed';
// Add to plugin
$[ _PLUGIN_ ].addons = $[ _PLUGIN_ ].addons || [];
$[ _PLUGIN_ ].addons.push( _ADDON_ );
})( jQuery );
+12
View File
@@ -0,0 +1,12 @@
/*
* jQuery mmenu labels addon
* mmenu.frebsite.nl
*
* Copyright (c) Fred Heusschen
* www.frebsite.nl
*
* Dual licensed under the MIT and GPL licenses.
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*/
!function(e){var l="mmenu",s="labels";e[l].prototype["_addon_"+s]=function(){function a(){var e=t.hassearch&&o.$menu.hasClass(t.hassearch),l=t.hasheader&&o.$menu.hasClass(t.hasheader);return e?l?100:50:l?60:0}var o=this,n=this.opts[s],t=e[l]._c,i=(e[l]._d,e[l]._e);if(t.add("collapsed"),t.add("fixedlabels original clone"),i.add("updatelabels position scroll"),e[l].support.touch&&(i.scroll+=" "+i.mm("touchmove")),"boolean"==typeof n&&(n={collapse:n}),"object"!=typeof n&&(n={}),n=e.extend(!0,{},e[l].defaults[s],n),n.collapse){this.__refactorClass(e("li."+this.conf.collapsedClass,this.$menu),"collapsed");var d=e("."+t.label,this.$menu);d.each(function(){var l=e(this),s=l.nextUntil("."+t.label,"all"==n.collapse?null:"."+t.collapsed);"all"==n.collapse&&(l.addClass(t.opened),s.removeClass(t.collapsed)),s.length&&(l.wrapInner("<span />"),e('<a href="#" class="'+t.subopen+" "+t.fullsubopen+'" />').prependTo(l).on(i.click,function(e){e.preventDefault(),l.toggleClass(t.opened),s[l.hasClass(t.opened)?"removeClass":"addClass"](t.collapsed)}))})}else if(n.fixed){if("horizontal"!=this.direction)return;this.$menu.addClass(t.fixedlabels);var r=e("."+t.panel,this.$menu),d=e("."+t.label,this.$menu);r.add(d).off(i.updatelabels+" "+i.position+" "+i.scroll).on(i.updatelabels+" "+i.position+" "+i.scroll,function(e){e.stopPropagation()});var p=a();r.each(function(){var l=e(this),s=l.find("."+t.label);if(s.length){var o=l.scrollTop();s.each(function(){var s=e(this);s.wrapInner("<div />").wrapInner("<div />");var a,n,d,r=s.find("> div"),c=e();s.on(i.updatelabels,function(){o=l.scrollTop(),s.hasClass(t.hidden)||(c=s.nextAll("."+t.label).not("."+t.hidden).first(),a=s.offset().top+o,n=c.length?c.offset().top+o:!1,d=r.height(),s.trigger(i.position))}),s.on(i.position,function(){var e=0;n&&o+p>n-d?e=n-a-d:o+p>a&&(e=o-a+p),r.css("top",e)})}),l.on(i.updatelabels,function(){o=l.scrollTop(),p=a(),s.trigger(i.position)}).on(i.scroll,function(){s.trigger(i.updatelabels)})}}),this.$menu.on(i.update,function(){r.trigger(i.updatelabels)}).on(i.opening,function(){r.trigger(i.updatelabels).trigger(i.scroll)})}},e[l].defaults[s]={fixed:!1,collapse:!1},e[l].configuration.collapsedClass="Collapsed",e[l].addons=e[l].addons||[],e[l].addons.push(s)}(jQuery);
@@ -0,0 +1,227 @@
/*
* jQuery mmenu searchfield addon
* mmenu.frebsite.nl
*
* Copyright (c) Fred Heusschen
* www.frebsite.nl
*
* Dual licensed under the MIT and GPL licenses.
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*/
(function( $ ) {
var _PLUGIN_ = 'mmenu',
_ADDON_ = 'searchfield';
$[ _PLUGIN_ ].prototype[ '_addon_' + _ADDON_ ] = function()
{
var that = this,
opts = this.opts[ _ADDON_ ];
var _c = $[ _PLUGIN_ ]._c,
_d = $[ _PLUGIN_ ]._d,
_e = $[ _PLUGIN_ ]._e;
_c.add( 'search hassearch noresults nosubresults counter' );
_e.add( 'search reset change' );
// Extend options
if ( typeof opts == 'boolean' )
{
opts = {
add : opts,
search : opts
};
}
if ( typeof opts != 'object' )
{
opts = {};
}
opts = $.extend( true, {}, $[ _PLUGIN_ ].defaults[ _ADDON_ ], opts );
// Add the field
if ( opts.add )
{
$( '<div class="' + _c.search + '" />' )
.prependTo( this.$menu )
.append( '<input placeholder="' + opts.placeholder + '" type="text" autocomplete="off" />' );
if ( opts.noResults )
{
$('ul, ol', this.$menu)
.first()
.append( '<li class="' + _c.noresults + '">' + opts.noResults + '</li>' );
}
}
if ( $('div.' + _c.search, this.$menu).length )
{
this.$menu.addClass( _c.hassearch );
}
// Bind custom events
if ( opts.search )
{
var $input = $('div.' + _c.search, this.$menu).find( 'input' );
if ( $input.length )
{
var $panels = $('.' + _c.panel, this.$menu),
$labels = $('.' + _c.list + '> li.' + _c.label, this.$menu),
$items = $('.' + _c.list + '> li', this.$menu)
.not( '.' + _c.subtitle )
.not( '.' + _c.label )
.not( '.' + _c.noresults );
var _searchText = '> a';
if ( !opts.showLinksOnly )
{
_searchText += ', > span';
}
$input
.off( _e.keyup + ' ' + _e.change )
.on( _e.keyup,
function( e )
{
if ( !preventKeypressSearch( e.keyCode ) )
{
that.$menu.trigger( _e.search );
}
}
)
.on( _e.change,
function( e )
{
that.$menu.trigger( _e.search );
}
);
this.$menu
.off( _e.reset + ' ' + _e.search )
.on( _e.reset + ' ' + _e.search,
function( e )
{
e.stopPropagation();
}
)
.on( _e.reset,
function( e )
{
that.$menu.trigger( _e.search, [ '' ] );
}
)
.on( _e.search,
function( e, query )
{
if ( typeof query == 'string' )
{
$input.val( query );
}
else
{
query = $input.val();
}
query = query.toLowerCase();
// Scroll to top
$panels.scrollTop( 0 );
// Search through items
$items
.add( $labels )
.addClass( _c.hidden );
$items
.each(
function()
{
var $t = $(this);
if ( $(_searchText, $t).text().toLowerCase().indexOf( query ) > -1 )
{
$t.add( $t.prevAll( '.' + _c.label ).first() ).removeClass( _c.hidden );
}
}
);
// Update parent for submenus
$( $panels.get().reverse() ).each(
function()
{
var $t = $(this),
$p = $t.data( _d.parent );
if ( $p )
{
var $i = $t.add( $t.find( '> .' + _c.list ) ).find( '> li' )
.not( '.' + _c.subtitle )
.not( '.' + _c.label )
.not( '.' + _c.hidden );
if ( $i.length )
{
$p.removeClass( _c.hidden )
.removeClass( _c.nosubresults )
.prevAll( '.' + _c.label ).first().removeClass( _c.hidden );
}
else
{
if ( $t.hasClass( _c.current ) )
{
$p.trigger( _e.open );
}
$p.addClass( _c.nosubresults );
}
}
}
);
// Show/hide no results message
that.$menu[ $items.not( '.' + _c.hidden ).length ? 'removeClass' : 'addClass' ]( _c.noresults );
// Update for other addons
that.$menu.trigger( _e.update );
}
);
}
}
};
$[ _PLUGIN_ ].defaults[ _ADDON_ ] = {
add : false,
search : false,
showLinksOnly : true,
placeholder : 'Search',
noResults : 'No results found.'
};
// Add to plugin
$[ _PLUGIN_ ].addons = $[ _PLUGIN_ ].addons || [];
$[ _PLUGIN_ ].addons.push( _ADDON_ );
// Functions
function preventKeypressSearch( c )
{
switch( c )
{
case 9: // tab
case 16: // shift
case 17: // control
case 18: // alt
case 37: // left
case 38: // top
case 39: // right
case 40: // bottom
return true;
}
return false;
}
})( jQuery );
+12
View File
@@ -0,0 +1,12 @@
/*
* jQuery mmenu searchfield addon
* mmenu.frebsite.nl
*
* Copyright (c) Fred Heusschen
* www.frebsite.nl
*
* Dual licensed under the MIT and GPL licenses.
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*/
!function(e){function s(e){switch(e){case 9:case 16:case 17:case 18:case 37:case 38:case 39:case 40:return!0}return!1}var n="mmenu",t="searchfield";e[n].prototype["_addon_"+t]=function(){var a=this,r=this.opts[t],o=e[n]._c,l=e[n]._d,d=e[n]._e;if(o.add("search hassearch noresults nosubresults counter"),d.add("search reset change"),"boolean"==typeof r&&(r={add:r,search:r}),"object"!=typeof r&&(r={}),r=e.extend(!0,{},e[n].defaults[t],r),r.add&&(e('<div class="'+o.search+'" />').prependTo(this.$menu).append('<input placeholder="'+r.placeholder+'" type="text" autocomplete="off" />'),r.noResults&&e("ul, ol",this.$menu).first().append('<li class="'+o.noresults+'">'+r.noResults+"</li>")),e("div."+o.search,this.$menu).length&&this.$menu.addClass(o.hassearch),r.search){var i=e("div."+o.search,this.$menu).find("input");if(i.length){var u=e("."+o.panel,this.$menu),h=e("."+o.list+"> li."+o.label,this.$menu),c=e("."+o.list+"> li",this.$menu).not("."+o.subtitle).not("."+o.label).not("."+o.noresults),f="> a";r.showLinksOnly||(f+=", > span"),i.off(d.keyup+" "+d.change).on(d.keyup,function(e){s(e.keyCode)||a.$menu.trigger(d.search)}).on(d.change,function(){a.$menu.trigger(d.search)}),this.$menu.off(d.reset+" "+d.search).on(d.reset+" "+d.search,function(e){e.stopPropagation()}).on(d.reset,function(){a.$menu.trigger(d.search,[""])}).on(d.search,function(s,n){"string"==typeof n?i.val(n):n=i.val(),n=n.toLowerCase(),u.scrollTop(0),c.add(h).addClass(o.hidden),c.each(function(){var s=e(this);e(f,s).text().toLowerCase().indexOf(n)>-1&&s.add(s.prevAll("."+o.label).first()).removeClass(o.hidden)}),e(u.get().reverse()).each(function(){var s=e(this),n=s.data(l.parent);if(n){var t=s.add(s.find("> ."+o.list)).find("> li").not("."+o.subtitle).not("."+o.label).not("."+o.hidden);t.length?n.removeClass(o.hidden).removeClass(o.nosubresults).prevAll("."+o.label).first().removeClass(o.hidden):(s.hasClass(o.current)&&n.trigger(d.open),n.addClass(o.nosubresults))}}),a.$menu[c.not("."+o.hidden).length?"removeClass":"addClass"](o.noresults),a.$menu.trigger(d.update)})}}},e[n].defaults[t]={add:!1,search:!1,showLinksOnly:!0,placeholder:"Search",noResults:"No results found."},e[n].addons=e[n].addons||[],e[n].addons.push(t)}(jQuery);
+976
View File
@@ -0,0 +1,976 @@
/*
* jQuery mmenu v4.2.4
* @requires jQuery 1.7.0 or later
*
* mmenu.frebsite.nl
*
* Copyright (c) Fred Heusschen
* www.frebsite.nl
*
* Dual licensed under the MIT and GPL licenses.
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*/
(function( $ ) {
var _PLUGIN_ = 'mmenu',
_VERSION_ = '4.2.4';
// Plugin already excists
if ( $[ _PLUGIN_ ] )
{
return;
}
// Global variables
var glbl = {
$wndw: null,
$html: null,
$body: null,
$page: null,
$blck: null,
$allMenus: null
};
var _c = {}, _d = {}, _e = {},
_serialnr = 0,
_strollTop = 0;
$[ _PLUGIN_ ] = function( $menu, opts, conf )
{
glbl.$allMenus = glbl.$allMenus.add( $menu );
this.$menu = $menu;
this.opts = opts
this.conf = conf;
this.serialnr = _serialnr++;
this._init();
return this;
};
$[ _PLUGIN_ ].prototype = {
open: function()
{
var that = this;
this._openSetup();
// For some reason, some browsers need a (pretty long) delay before the .mm-opened class sets the needed styles
// Without it, the page isn't animated
setTimeout(
function()
{
that._openFinish();
}, 50
);
return 'open';
},
_openSetup: function()
{
_strollTop = glbl.$wndw.scrollTop();
// Set opened
this.$menu.addClass( _c.current );
// Close others
glbl.$allMenus.not( this.$menu ).trigger( _e.close );
// Store style and position
glbl.$page.data( _d.style, glbl.$page.attr( 'style' ) || '' );
// Trigger window-resize to measure height
glbl.$wndw.trigger( _e.resize, [ true ] );
// Add options
if ( this.opts.modal )
{
glbl.$html.addClass( _c.modal );
}
if ( this.opts.moveBackground )
{
glbl.$html.addClass( _c.background );
}
if ( this.opts.position != 'left' )
{
glbl.$html.addClass( _c.mm( this.opts.position ) );
}
if ( this.opts.zposition != 'back' )
{
glbl.$html.addClass( _c.mm( this.opts.zposition ) );
}
if ( this.opts.classes )
{
glbl.$html.addClass( this.opts.classes );
}
// Open
glbl.$html.addClass( _c.opened );
this.$menu.addClass( _c.opened );
},
_openFinish: function()
{
var that = this;
// Callback
transitionend( glbl.$page,
function()
{
that.$menu.trigger( _e.opened );
}, this.conf.transitionDuration
);
// Opening
glbl.$html.addClass( _c.opening );
this.$menu.trigger( _e.opening );
},
close: function()
{
var that = this;
// Callback
transitionend( glbl.$page,
function()
{
that.$menu
.removeClass( _c.current )
.removeClass( _c.opened );
glbl.$html
.removeClass( _c.opened )
.removeClass( _c.modal )
.removeClass( _c.background )
.removeClass( _c.mm( that.opts.position ) )
.removeClass( _c.mm( that.opts.zposition ) );
if ( that.opts.classes )
{
glbl.$html.removeClass( that.opts.classes );
}
// Restore style and position
glbl.$page.attr( 'style', glbl.$page.data( _d.style ) );
// Closed
that.$menu.trigger( _e.closed );
}, this.conf.transitionDuration
);
// Closing
glbl.$html.removeClass( _c.opening );
this.$menu.trigger( _e.closing );
return 'close';
},
_init: function()
{
this.opts = extendOptions( this.opts, this.conf, this.$menu );
this.direction = ( this.opts.slidingSubmenus ) ? 'horizontal' : 'vertical';
// INIT PAGE & MENU
this._initPage( glbl.$page );
this._initMenu();
this._initBlocker();
this._initPanles();
this._initLinks();
this._initOpenClose();
this._bindCustomEvents();
if ( $[ _PLUGIN_ ].addons )
{
for ( var a = 0; a < $[ _PLUGIN_ ].addons.length; a++ )
{
if ( typeof this[ '_addon_' + $[ _PLUGIN_ ].addons[ a ] ] == 'function' )
{
this[ '_addon_' + $[ _PLUGIN_ ].addons[ a ] ]();
}
}
}
},
_bindCustomEvents: function()
{
var that = this;
this.$menu
.off( _e.open + ' ' + _e.close + ' ' + _e.setPage+ ' ' + _e.update )
.on( _e.open + ' ' + _e.close + ' ' + _e.setPage+ ' ' + _e.update,
function( e )
{
e.stopPropagation();
}
);
// Menu-events
this.$menu
.on( _e.open,
function( e )
{
if ( $(this).hasClass( _c.current ) )
{
e.stopImmediatePropagation();
return false;
}
return that.open();
}
)
.on( _e.close,
function( e )
{
if ( !$(this).hasClass( _c.current ) )
{
e.stopImmediatePropagation();
return false;
}
return that.close();
}
)
.on( _e.setPage,
function( e, $p )
{
that._initPage( $p );
that._initOpenClose();
}
);
// Panel-events
var $panels = this.$menu.find( this.opts.isMenu && this.direction != 'horizontal' ? 'ul, ol' : '.' + _c.panel );
$panels
.off( _e.toggle + ' ' + _e.open + ' ' + _e.close )
.on( _e.toggle + ' ' + _e.open + ' ' + _e.close,
function( e )
{
e.stopPropagation();
}
);
if ( this.direction == 'horizontal' )
{
$panels
.on( _e.open,
function( e )
{
return openSubmenuHorizontal( $(this), that.$menu );
}
);
}
else
{
$panels
.on( _e.toggle,
function( e )
{
var $t = $(this);
return $t.triggerHandler( $t.parent().hasClass( _c.opened ) ? _e.close : _e.open );
}
)
.on( _e.open,
function( e )
{
$(this).parent().addClass( _c.opened );
return 'open';
}
)
.on( _e.close,
function( e )
{
$(this).parent().removeClass( _c.opened );
return 'close';
}
);
}
},
_initBlocker: function()
{
var that = this;
if ( !glbl.$blck )
{
glbl.$blck = $( '<div id="' + _c.blocker + '" />' )
.appendTo( glbl.$body );
}
glbl.$blck
.off( _e.touchstart )
.on( _e.touchstart,
function( e )
{
e.preventDefault();
e.stopPropagation();
glbl.$blck.trigger( _e.mousedown );
}
)
.on( _e.mousedown,
function( e )
{
e.preventDefault();
if ( !glbl.$html.hasClass( _c.modal ) )
{
that.$menu.trigger( _e.close );
}
}
);
},
_initPage: function( $p )
{
if ( !$p )
{
$p = $(this.conf.pageSelector, glbl.$body);
if ( $p.length > 1 )
{
$[ _PLUGIN_ ].debug( 'Multiple nodes found for the page-node, all nodes are wrapped in one <' + this.conf.pageNodetype + '>.' );
$p = $p.wrapAll( '<' + this.conf.pageNodetype + ' />' ).parent();
}
}
$p.addClass( _c.page );
glbl.$page = $p;
},
_initMenu: function()
{
var that = this;
// Clone if needed
if ( this.conf.clone )
{
this.$menu = this.$menu.clone( true );
this.$menu.add( this.$menu.find( '*' ) ).filter( '[id]' ).each(
function()
{
$(this).attr( 'id', _c.mm( $(this).attr( 'id' ) ) );
}
);
}
// Strip whitespace
this.$menu.contents().each(
function()
{
if ( $(this)[ 0 ].nodeType == 3 )
{
$(this).remove();
}
}
);
// Inject to body
this.$menu[ this.conf.menuInjectMethod + 'To' ]( this.conf.menuWrapperSelector )
.addClass( _c.menu );
// Add direction class
this.$menu.addClass( _c.mm( this.direction ) );
// Add options classes
if ( this.opts.classes )
{
this.$menu.addClass( this.opts.classes );
}
if ( this.opts.isMenu )
{
this.$menu.addClass( _c.ismenu );
}
if ( this.opts.position != 'left' )
{
this.$menu.addClass( _c.mm( this.opts.position ) );
}
if ( this.opts.zposition != 'back' )
{
this.$menu.addClass( _c.mm( this.opts.zposition ) );
}
},
_initPanles: function()
{
var that = this;
// Refactor List class
this.__refactorClass( $('.' + this.conf.listClass, this.$menu), 'list' );
// Add List class
if ( this.opts.isMenu )
{
$('ul, ol', this.$menu)
.not( '.mm-nolist' )
.addClass( _c.list );
}
var $lis = $('.' + _c.list + ' > li', this.$menu);
// Refactor Selected class
this.__refactorClass( $lis.filter( '.' + this.conf.selectedClass ), 'selected' );
// Refactor Label class
this.__refactorClass( $lis.filter( '.' + this.conf.labelClass ), 'label' );
// Refactor Spacer class
this.__refactorClass( $lis.filter( '.' + this.conf.spacerClass ), 'spacer' );
// setSelected-event
$lis
.off( _e.setSelected )
.on( _e.setSelected,
function( e, selected )
{
e.stopPropagation();
$lis.removeClass( _c.selected );
if ( typeof selected != 'boolean' )
{
selected = true;
}
if ( selected )
{
$(this).addClass( _c.selected );
}
}
);
// Refactor Panel class
this.__refactorClass( $('.' + this.conf.panelClass, this.$menu), 'panel' );
// Add Panel class
this.$menu
.children()
.filter( this.conf.panelNodetype )
.add( this.$menu.find( '.' + _c.list ).children().children().filter( this.conf.panelNodetype ) )
.addClass( _c.panel );
var $panels = $('.' + _c.panel, this.$menu);
// Add an ID to all panels
$panels
.each(
function( i )
{
var $t = $(this),
id = $t.attr( 'id' ) || _c.mm( 'm' + that.serialnr + '-p' + i );
$t.attr( 'id', id );
}
);
// Add open and close links to menu items
$panels
.find( '.' + _c.panel )
.each(
function( i )
{
var $t = $(this),
$u = $t.is( 'ul, ol' ) ? $t : $t.find( 'ul ,ol' ).first(),
$l = $t.parent(),
$a = $l.find( '> a, > span' ),
$p = $l.closest( '.' + _c.panel );
$t.data( _d.parent, $l );
if ( $l.parent().is( '.' + _c.list ) )
{
var $btn = $( '<a class="' + _c.subopen + '" href="#' + $t.attr( 'id' ) + '" />' ).insertBefore( $a );
if ( !$a.is( 'a' ) )
{
$btn.addClass( _c.fullsubopen );
}
if ( that.direction == 'horizontal' )
{
$u.prepend( '<li class="' + _c.subtitle + '"><a class="' + _c.subclose + '" href="#' + $p.attr( 'id' ) + '">' + $a.text() + '</a></li>' );
}
}
}
);
// Link anchors to panels
var evt = this.direction == 'horizontal' ? _e.open : _e.toggle;
$panels
.each(
function( i )
{
var $opening = $(this),
id = $opening.attr( 'id' );
$('a[href="#' + id + '"]', that.$menu)
.off( _e.click )
.on( _e.click,
function( e )
{
e.preventDefault();
$opening.trigger( evt );
}
);
}
);
if ( this.direction == 'horizontal' )
{
// Add opened-classes
var $selected = $('.' + _c.list + ' > li.' + _c.selected, this.$menu);
$selected
.add( $selected.parents( 'li' ) )
.parents( 'li' ).removeClass( _c.selected )
.end().each(
function()
{
var $t = $(this),
$u = $t.find( '> .' + _c.panel );
if ( $u.length )
{
$t.parents( '.' + _c.panel ).addClass( _c.subopened );
$u.addClass( _c.opened );
}
}
)
.closest( '.' + _c.panel ).addClass( _c.opened )
.parents( '.' + _c.panel ).addClass( _c.subopened );
}
else
{
// Replace Selected-class with opened-class in parents from .Selected
$('li.' + _c.selected, this.$menu)
.addClass( _c.opened )
.parents( '.' + _c.selected ).removeClass( _c.selected );
}
// Set current opened
var $current = $panels.filter( '.' + _c.opened );
if ( !$current.length )
{
$current = $panels.first();
}
$current
.addClass( _c.opened )
.last()
.addClass( _c.current );
// Rearrange markup
if ( this.direction == 'horizontal' )
{
$panels.find( '.' + _c.panel ).appendTo( this.$menu );
}
},
_initLinks: function()
{
var that = this;
$('.' + _c.list + ' > li > a', this.$menu)
.not( '.' + _c.subopen )
.not( '.' + _c.subclose )
.not( '[rel="external"]' )
.not( '[target="_blank"]' )
.off( _e.click )
.on( _e.click,
function( e )
{
var $t = $(this),
href = $t.attr( 'href' );
// Set selected item
if ( that.__valueOrFn( that.opts.onClick.setSelected, $t ) )
{
$t.parent().trigger( _e.setSelected );
}
// Prevent default / don't follow link. Default: false
var preventDefault = that.__valueOrFn( that.opts.onClick.preventDefault, $t, href.slice( 0, 1 ) == '#' );
if ( preventDefault )
{
e.preventDefault();
}
// Block UI. Default: false if preventDefault, true otherwise
if ( that.__valueOrFn( that.opts.onClick.blockUI, $t, !preventDefault ) )
{
glbl.$html.addClass( _c.blocking );
}
// Close menu. Default: true if preventDefault, false otherwise
if ( that.__valueOrFn( that.opts.onClick.close, $t, preventDefault ) )
{
that.$menu.triggerHandler( _e.close );
}
}
);
},
_initOpenClose: function()
{
var that = this;
// Open menu
var id = this.$menu.attr( 'id' );
if ( id && id.length )
{
if ( this.conf.clone )
{
id = _c.umm( id );
}
$('a[href="#' + id + '"]')
.off( _e.click )
.on( _e.click,
function( e )
{
e.preventDefault();
that.$menu.trigger( _e.open );
}
);
}
// Close menu
var id = glbl.$page.attr( 'id' );
if ( id && id.length )
{
$('a[href="#' + id + '"]')
.off( _e.click )
.on( _e.click,
function( e )
{
e.preventDefault();
that.$menu.trigger( _e.close );
}
);
}
},
__valueOrFn: function( o, $e, d )
{
if ( typeof o == 'function' )
{
return o.call( $e[ 0 ] );
}
if ( typeof o == 'undefined' && typeof d != 'undefined' )
{
return d;
}
return o;
},
__refactorClass: function( $e, c )
{
$e.removeClass( this.conf[ c + 'Class' ] ).addClass( _c[ c ] );
}
};
$.fn[ _PLUGIN_ ] = function( opts, conf )
{
// First time plugin is fired
if ( !glbl.$wndw )
{
_initPlugin();
}
// Extend options
opts = extendOptions( opts, conf );
conf = extendConfiguration( conf );
return this.each(
function()
{
var $menu = $(this);
if ( $menu.data( _PLUGIN_ ) )
{
return;
}
$menu.data( _PLUGIN_, new $[ _PLUGIN_ ]( $menu, opts, conf ) );
}
);
};
$[ _PLUGIN_ ].version = _VERSION_;
$[ _PLUGIN_ ].defaults = {
position : 'left',
zposition : 'back',
moveBackground : true,
slidingSubmenus : true,
modal : false,
classes : '',
onClick : {
// close : true,
// blockUI : null,
// preventDefault : null,
setSelected : true
}
};
$[ _PLUGIN_ ].configuration = {
panelClass : 'Panel',
listClass : 'List',
selectedClass : 'Selected',
labelClass : 'Label',
spacerClass : 'Spacer',
pageNodetype : 'div',
panelNodetype : 'ul, ol, div',
pageSelector : null,
menuWrapperSelector : 'body',
menuInjectMethod : 'prepend',
transitionDuration : 400
};
/*
SUPPORT
*/
(function() {
var wd = window.document,
ua = window.navigator.userAgent,
ds = document.createElement( 'div' ).style;
var _touch = 'ontouchstart' in wd,
_overflowscrolling = 'WebkitOverflowScrolling' in wd.documentElement.style,
_oldAndroidBrowser = (function() {
if ( ua.indexOf( 'Android' ) >= 0 )
{
return 2.4 > parseFloat( ua.slice( ua.indexOf( 'Android' ) +8 ) );
}
return false;
})();
$[ _PLUGIN_ ].support = {
touch: _touch,
oldAndroidBrowser: _oldAndroidBrowser,
overflowscrolling: (function() {
if ( !_touch )
{
return true;
}
if ( _overflowscrolling )
{
return true;
}
if ( _oldAndroidBrowser )
{
return false;
}
return true;
})()
};
})();
/*
DEBUG
*/
$[ _PLUGIN_ ].debug = function( msg ) {};
$[ _PLUGIN_ ].deprecated = function( depr, repl )
{
if ( typeof console != 'undefined' && typeof console.warn != 'undefined' )
{
console.warn( 'MMENU: ' + depr + ' is deprecated, use ' + repl + ' instead.' );
}
};
function extendOptions( o, c, $m )
{
if ( $m )
{
if ( typeof o != 'object' )
{
o = {};
}
if ( typeof o.isMenu != 'boolean' )
{
var $c = $m.children();
o.isMenu = ( $c.length == 1 && $c.is( c.panelNodetype ) );
}
return o;
}
// Extend from defaults
o = $.extend( true, {}, $[ _PLUGIN_ ].defaults, o );
// DEPRECATED
if ( o.position == 'top' || o.position == 'bottom' )
{
if ( o.zposition == 'back' || o.zposition == 'next' )
{
$[ _PLUGIN_ ].deprecated( 'Using position "' + o.position + '" in combination with zposition "' + o.zposition + '"', 'zposition "front"' );
o.zposition = 'front';
}
}
// /DEPRECATED
return o;
}
function extendConfiguration( c )
{
c = $.extend( true, {}, $[ _PLUGIN_ ].configuration, c )
// Set pageSelector
if ( typeof c.pageSelector != 'string' )
{
c.pageSelector = '> ' + c.pageNodetype;
}
// Restrict injectMethod
if ( c.menuInjectMethod != 'append' )
{
c.menuInjectMethod = 'prepend';
}
return c;
}
function _initPlugin()
{
glbl.$wndw = $(window);
glbl.$html = $('html');
glbl.$body = $('body');
glbl.$allMenus = $();
// Classnames, Datanames, Eventnames
$.each( [ _c, _d, _e ],
function( i, o )
{
o.add = function( c )
{
c = c.split( ' ' );
for ( var d in c )
{
o[ c[ d ] ] = o.mm( c[ d ] );
}
};
}
);
// Classnames
_c.mm = function( c ) { return 'mm-' + c; };
_c.add( 'menu ismenu panel list subtitle selected label spacer current highest hidden page blocker modal background opened opening subopened subopen fullsubopen subclose' );
_c.umm = function( c )
{
if ( c.slice( 0, 3 ) == 'mm-' )
{
c = c.slice( 3 );
}
return c;
};
// Datanames
_d.mm = function( d ) { return 'mm-' + d; };
_d.add( 'parent style' );
// Eventnames
_e.mm = function( e ) { return e + '.mm'; };
_e.add( 'toggle open opening opened close closing closed update setPage setSelected transitionend webkitTransitionEnd mousedown touchstart mouseup touchend scroll touchmove click keydown keyup resize' );
// Prevent tabbing
glbl.$wndw
.on( _e.keydown,
function( e )
{
if ( glbl.$html.hasClass( _c.opened ) )
{
if ( e.keyCode == 9 )
{
e.preventDefault();
return false;
}
}
}
);
// Set page min-height to window height
var _h = 0;
glbl.$wndw
.on( _e.resize,
function( e, force )
{
if ( force || glbl.$html.hasClass( _c.opened ) )
{
var nh = glbl.$wndw.height();
if ( force || nh != _h )
{
_h = nh;
glbl.$page.css( 'minHeight', nh );
}
}
}
);
$[ _PLUGIN_ ]._c = _c;
$[ _PLUGIN_ ]._d = _d;
$[ _PLUGIN_ ]._e = _e;
$[ _PLUGIN_ ].glbl = glbl;
}
function openSubmenuHorizontal( $opening, $m )
{
if ( $opening.hasClass( _c.current ) )
{
return false;
}
var $panels = $('.' + _c.panel, $m),
$current = $panels.filter( '.' + _c.current );
$panels
.removeClass( _c.highest )
.removeClass( _c.current )
.not( $opening )
.not( $current )
.addClass( _c.hidden );
if ( $opening.hasClass( _c.opened ) )
{
$current
.addClass( _c.highest )
.removeClass( _c.opened )
.removeClass( _c.subopened );
}
else
{
$opening
.addClass( _c.highest );
$current
.addClass( _c.subopened );
}
$opening
.removeClass( _c.hidden )
.removeClass( _c.subopened )
.addClass( _c.current )
.addClass( _c.opened );
return 'open';
}
function transitionend( $e, fn, duration )
{
var _ended = false,
_fn = function()
{
if ( !_ended )
{
fn.call( $e[ 0 ] );
}
_ended = true;
};
$e.one( _e.transitionend, _fn );
$e.one( _e.webkitTransitionEnd, _fn );
setTimeout( _fn, duration * 1.1 );
}
})( jQuery );
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+21
View File
@@ -0,0 +1,21 @@
{
"name": "jQuery.mmenu",
"filename": "js/jquery.mmenu.min.js",
"version": "4.2.4",
"homepage": "http://mmenu.frebsite.nl/",
"authors": [
"Fred Heusschen <info@frebsite.nl>"
],
"description": "A jQuery plugin that creates slick app look-alike sliding menus for your (mobile) website with horizontal or vertical submenus. It's easy to customize and has options for headers, labels, counters, a searchfield and more.",
"keywords": [
"mmenu",
"menu",
"navigation",
"mobile",
"panels",
"app"
],
"dependencies": {
"jquery": ">= 1.7.0"
}
}