Skip to content

Commit

Permalink
Small updates and improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
FrDH committed Oct 30, 2014
1 parent cb2828e commit 5b57fa8
Show file tree
Hide file tree
Showing 21 changed files with 78 additions and 68 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "jQuery.mmenu",
"main": "src/js/jquery.mmenu.min.js",
"version": "4.6.2",
"version": "4.6.3",
"homepage": "http://mmenu.frebsite.nl/",
"authors": [
"Fred Heusschen <[email protected]>"
Expand Down
12 changes: 12 additions & 0 deletions demo/css/demo.css
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,18 @@ nav:not(.mm-menu)
height: 40px;
padding: 0 50px;
}
.header.fixed
{
position: fixed;
top: 0;
left: 0;
}
.footer.fixed
{
position: fixed;
bottom: 0;
left: 0;
}
.header a
{
background: center center no-repeat transparent;
Expand Down
2 changes: 1 addition & 1 deletion mmenu.jquery.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mmenu",
"version": "4.6.2",
"version": "4.6.3",
"title": "jQuery mmenu",
"description": "The best jQuery plugin for app look-alike on- and off-canvas menus with sliding submenus for your website and webapp.",
"keywords": [
Expand Down
6 changes: 3 additions & 3 deletions src/css/addons/jquery.mmenu.labels.css
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
/*
jQuery.mmenu labels addon CSS
*/
.mm-list > li.mm-label > span {
.mm-list li.mm-label > span {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
padding: 0;
line-height: 25px; }
.mm-list > li.mm-label.mm-opened a.mm-subopen:after {
.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); }
.mm-list > li.mm-collapsed {
.mm-list li.mm-collapsed:not(.mm-uncollapsed) {
display: none; }

.mm-menu.mm-vertical .mm-list > li.mm-label > a.mm-subopen:after {
Expand Down
6 changes: 3 additions & 3 deletions src/css/jquery.mmenu.all.css
Original file line number Diff line number Diff line change
Expand Up @@ -545,19 +545,19 @@ html.mm-opened.mm-dragging #mm-blocker {
/*
jQuery.mmenu labels addon CSS
*/
.mm-list > li.mm-label > span {
.mm-list li.mm-label > span {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
padding: 0;
line-height: 25px; }
.mm-list > li.mm-label.mm-opened a.mm-subopen:after {
.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); }
.mm-list > li.mm-collapsed {
.mm-list li.mm-collapsed:not(.mm-uncollapsed) {
display: none; }

.mm-menu.mm-vertical .mm-list > li.mm-label > a.mm-subopen:after {
Expand Down
1 change: 0 additions & 1 deletion src/js/addons/jquery.mmenu.fixedelements.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
'-webkit-transform': 'translateY( ' + _top + 'px )',
'transform': 'translateY( ' + _top + 'px )'
});

$bots.css({
'-webkit-transform': 'translateY( -' + _bot + 'px )',
'transform': 'translateY( -' + _bot + 'px )'
Expand Down
56 changes: 27 additions & 29 deletions src/js/addons/jquery.mmenu.labels.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
{
_initAddon();
}

var addon_added = this.vars[ _ADDON_ + '_added' ];
this.vars[ _ADDON_ + '_added' ] = true;

Expand All @@ -44,39 +44,38 @@
.each(
function()
{
var $labl = $(this),
$expn = $labl.nextUntil( '.' + _c.label, ( opts.collapse == 'all' ) ? null : '.' + _c.collapsed );

if ( opts.collapse == 'all' )
{
$labl.addClass( _c.opened );
$expn.removeClass( _c.collapsed );
}
var $l = $(this),
$e = $l.nextUntil( '.' + _c.label, '.' + _c.collapsed );

if ( $expn.length )
if ( $e.length )
{
if ( !$labl.data( _d.updatelabel ) )
if ( !$l.children( '.' + _c.subopen ).length )
{
$labl.data( _d.updatelabel, true );
$labl.wrapInner( '<span />' );
$labl.prepend( '<a href="#" class="' + _c.subopen + ' ' + _c.fullsubopen + '" />' );
$l.wrapInner( '<span />' );
$l.prepend( '<a href="#" class="' + _c.subopen + ' ' + _c.fullsubopen + '" />' );
}

$labl
.find( 'a.' + _c.subopen )
.off( _e.click )
.on( _e.click,
function( e )
{
e.preventDefault();

$labl.toggleClass( _c.opened );
$expn[ $labl.hasClass( _c.opened ) ? 'removeClass' : 'addClass' ]( _c.collapsed );
}
);
}
}
);

if ( !addon_added )
{
glbl.$body
.on( _e.click,
'.' + _c.label + ' .' + _c.subopen,
function( e )
{
e.stopPropagation();
e.preventDefault();

var $l = $(this).parent(),
$e = $l.nextUntil( '.' + _c.label, '.' + _c.collapsed );

$l.toggleClass( _c.opened );
$e[ $l.hasClass( _c.opened ) ? 'addClass' : 'removeClass' ]( _c.uncollapsed );
}
);
}
}

};
Expand Down Expand Up @@ -125,8 +124,7 @@
_d = $[ _PLUGIN_ ]._d;
_e = $[ _PLUGIN_ ]._e;

_c.add( 'collapsed' );
_d.add( 'updatelabel' );
_c.add( 'collapsed uncollapsed' );

glbl = $[ _PLUGIN_ ].glbl;
}
Expand Down
2 changes: 1 addition & 1 deletion src/js/addons/jquery.mmenu.labels.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/js/addons/jquery.mmenu.offcanvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
this[ _ADDON_ + '_initBlocker' ]();
this[ _ADDON_ + '_initAnchors' ]();
this[ _ADDON_ + '_initEvents' ]();

this.$menu[ conf.menuInjectMethod + 'To' ]( conf.menuWrapperSelector );
};

Expand Down Expand Up @@ -332,7 +333,6 @@
function( e, $page )
{
that[ _ADDON_ + '_initPage' ]( $page );
that[ _ADDON_ + '_initOpenClose' ]();
}
);
};
Expand All @@ -349,7 +349,7 @@
{
c.pageSelector = '> ' + c.pageNodetype;
}

return c;
}

Expand Down
2 changes: 1 addition & 1 deletion src/js/addons/jquery.mmenu.offcanvas.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5b57fa8

Please sign in to comment.