mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-12 03:50:22 +00:00
Remove old Javascript hacks for the main menu and replace with flex-based CSS properties
This commit is contained in:
@@ -15,8 +15,6 @@
|
||||
//= require jquery.cookie
|
||||
//= require jquery.jstree/jquery.jstree
|
||||
//= require jquery.vAlign
|
||||
//= require jquery.horizontalNav
|
||||
//= require jquery.adaptivemenu
|
||||
//= require angular
|
||||
//= require angular-resource
|
||||
//= require angular-animate
|
||||
|
||||
@@ -8,27 +8,10 @@ Hopefully, this will evolve into a propper class.
|
||||
**/
|
||||
|
||||
jQuery(function($) {
|
||||
// Make main menu use full width
|
||||
mainMenu = $('.fullwidth-menu')
|
||||
if (typeof mainMenu.horizontalNav === 'function' )
|
||||
mainMenu.horizontalNav({
|
||||
tableDisplay: false,
|
||||
responsiveDelay: 0
|
||||
});
|
||||
|
||||
// Vertical align of checkbox fields
|
||||
if (typeof $('.field.checkbox label').vAlign === 'function' )
|
||||
$('.field.checkbox label').vAlign()
|
||||
|
||||
// We activate AdaptiveMenu only if not on webdriver
|
||||
// Re-adjusting the admin menu during tests causes tests to fail.
|
||||
if (!navigator.webdriver && typeof Spree !== 'undefined') {
|
||||
$('.main-menu-wrapper ul').AdaptiveMenu({
|
||||
text: "<a href='#'><i class='icon-chevron-down'></i> " + Spree.translations.more + "</a>",
|
||||
klass: "dropdown"
|
||||
});
|
||||
}
|
||||
|
||||
// Add some tips
|
||||
if (typeof $('.with-tip').powerTip === 'function' ) {
|
||||
$('.with-tip').powerTip({
|
||||
|
||||
Reference in New Issue
Block a user