Minor fixes in the main menu

This commit is contained in:
alekseybobkov 2014-07-28 16:41:08 +11:00
parent e562d1eb05
commit bdd9d02fdc
5 changed files with 21 additions and 1 deletions

View File

@ -7820,6 +7820,11 @@ nav#layout-mainmenu .menu-toggle i,
vertical-align: middle;
margin-right: 10px;
}
.mainmenu-collapsed li a i {
width: 40px;
text-align: left;
display: inline-block;
}
nav#layout-mainmenu.navbar ul li:hover a:active,
.mainmenu-collapsed li:hover a:active,
nav#layout-mainmenu.navbar ul li:hover a:focus,

View File

@ -268,7 +268,7 @@
return (activeElement.get(0).offsetTop + activeElement.height()) < this.el.scrollTop()
}
DragScroll.prototype.goToElement = function(element, callback) {
DragScroll.prototype.goToElement = function(element, callback, options) {
var $el = $(element)
if (!$el.length)
return;
@ -284,6 +284,8 @@
}
}
params = $.extend(params, options || {})
var offset = 0,
animated = false

View File

@ -21,6 +21,7 @@
}
$(this).width($el.get(0).offsetWidth + margin)
$(this).trigger('oc.widthFixed')
}
})
}

View File

@ -21,6 +21,12 @@
$('[data-toggle="tooltip"]', navbar).tooltip({
'container': 'body'
})
$('.layout-cell.width-fix', navbar).one('oc.widthFixed', function(){
var dragScroll = $('[data-control=toolbar]', navbar).data('oc.dragScroll')
if (dragScroll)
dragScroll.goToElement($('ul.nav > li.active', navbar), undefined, {'duration': 0})
})
})
})
})(jQuery);

View File

@ -113,6 +113,12 @@ nav#layout-mainmenu .menu-toggle,
}
}
.mainmenu-collapsed li a i {
width: 40px;
text-align: left;
display: inline-block;
}
nav#layout-mainmenu.navbar ul li:hover,
.mainmenu-collapsed li:hover {
a {