1
0
Fork 0

Import upstream theme changes

This commit is contained in:
Daniel Kempkens 2014-05-17 18:56:15 +02:00
parent d3b8966db4
commit 00753d20a9
2 changed files with 21 additions and 18 deletions

View file

@ -4,7 +4,7 @@
*
* Licensed under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*
*
* Copyright 2013, Codrops
* http://www.codrops.com
*/
@ -39,7 +39,7 @@
this.options = $.extend( true, {}, $.DLMenu.defaults, options );
// cache some elements and initialize some variables
this._config();
var animEndEventNames = {
'WebkitAnimation' : 'webkitAnimationEnd',
'OAnimation' : 'oAnimationEnd',
@ -77,10 +77,10 @@
var self = this;
this.$trigger.on( 'click.dlmenu', function() {
if( self.open ) {
self._closeMenu();
}
}
else {
self._openMenu();
}
@ -89,7 +89,7 @@
} );
this.$menuitems.on( 'click.dlmenu', function( event ) {
event.stopPropagation();
var $item = $(this),
@ -97,7 +97,10 @@
if( $submenu.length > 0 ) {
var $flyin = $submenu.clone().css( 'opacity', 0 ).insertAfter( self.$menu ),
var $flyin = $submenu.clone().css({
opacity: 0,
margin: 0
}).insertAfter( self.$menu ),
onAnimationEndFn = function() {
self.$menu.off( self.animEndEventName ).removeClass( self.options.animationClasses.classout ).addClass( 'dl-subview' );
$item.addClass( 'dl-subviewopen' ).parents( '.dl-subviewopen:first' ).removeClass( 'dl-subviewopen' ).addClass( 'dl-subview' );
@ -127,7 +130,7 @@
} );
this.$back.on( 'click.dlmenu', function( event ) {
var $this = $( this ),
$submenu = $this.parents( 'ul.dl-submenu:first' ),
$item = $submenu.parent(),
@ -150,7 +153,7 @@
}
$item.removeClass( 'dl-subviewopen' );
var $subview = $this.parents( '.dl-subview:first' );
if( $subview.is( 'li' ) ) {
$subview.addClass( 'dl-subviewopen' );
@ -161,7 +164,7 @@
return false;
} );
},
closeMenu : function() {
if( this.open ) {
@ -174,11 +177,11 @@
self.$menu.off( self.transEndEventName );
self._resetMenu();
};
this.$menu.removeClass( 'dl-menuopen' );
this.$menu.addClass( 'dl-menu-toggle' );
this.$trigger.removeClass( 'dl-active' );
if( this.supportTransitions ) {
this.$menu.on( this.transEndEventName, onTransitionEndFn );
}
@ -234,9 +237,9 @@
}
instance[ options ].apply( instance, args );
});
}
}
else {
this.each(function() {
this.each(function() {
var instance = $.data( this, 'dlmenu' );
if ( instance ) {
instance._init();
@ -249,4 +252,4 @@
return this;
};
} )( jQuery, window );
} )( jQuery, window );

View file

@ -93,11 +93,11 @@
color: @white;
outline: none;
}
.dl-back > a {
&.dl-back > a {
padding-left: 30px;
background: rgba(0,0,0,0.2);
}
.dl-back:after,
&.dl-back:after,
> a:not(:only-child):after {
position: absolute;
top: 0;
@ -108,7 +108,7 @@
-webkit-font-smoothing: antialiased;
content: "\f105";
}
.dl-back:after {
&.dl-back:after {
left: 10px;
color: rgba(212,204,198,0.5);
-webkit-transform: rotate(180deg);
@ -352,4 +352,4 @@ All this is done for any sub-level being entered.
}
.dl-menuopen li {
display: block
}
}