summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjmburnz2013-03-13 19:40:53 (GMT)
committer jmburnz2013-03-13 19:40:53 (GMT)
commitf1fdf2ac0f5333a8cf5afb013db23f344768a6ec (patch)
tree4ecfcf6790345c9f792c7cff8be89ac77aae43e3
parente2cfdeaa3895684c014f14ddf0c6d9ef4246b32f (diff)
Format CSS so its readable, update some CSS for superfish, improve the js so it matches the right element on legacy sub-themes
-rwxr-xr-xat_core/inc/forms/at_core.submit.menutoggle.inc51
-rwxr-xr-xat_core/scripts/menu-toggle.js2
2 files changed, 48 insertions, 5 deletions
diff --git a/at_core/inc/forms/at_core.submit.menutoggle.inc b/at_core/inc/forms/at_core.submit.menutoggle.inc
index 2549a96..0774616 100755
--- a/at_core/inc/forms/at_core.submit.menutoggle.inc
+++ b/at_core/inc/forms/at_core.submit.menutoggle.inc
@@ -19,12 +19,55 @@ function at_core_submit_menu_toggle($values, $theme_name, $path) {
}
$menu_toggle_css = array();
- $menu_toggle_css_active = '.at-mt .at-menu-toggle-button {position:static;top:0} .at-mt .menu-toggle{display:none} .at-mt .menu-toggle ul li,.at-mt .menu-toggle ul li a{display:block;float:none}';
- $menu_toggle_css_inactive = '.at-mt .at-menu-toggle-button {position:absolute;top:-99999em} .at-mt .menu-toggle {display:block !important}';
+ $menu_toggle_css_active = '
+ .at-mt .at-menu-toggle-button {
+ position: static;
+ top: 0;
+ }
+ .at-mt .menu-toggle {
+ display: none;
+ }
+ .at-mt .menu-toggle ul li,
+ .at-mt .menu-toggle ul li a {
+ display: block;
+ float:none;
+ }';
+
+ $menu_toggle_css_inactive = '
+ .at-mt .at-menu-toggle-button {
+ position: absolute;
+ top: -99999em;
+ }
+ .at-mt .menu-toggle {
+ display:block !important;
+ }';
- // We need extra overrides for superfish if the module is active
+ // We need extra overrides for superfish if the module is active, pre Superfish module 1.9
if (module_exists('superfish')) {
- $menu_toggle_superfish_css = '.at-mt #menu-toggle .sf-menu {float:none;margin:0;height:auto} .at-mt #menu-toggle .sf-menu ul,.at-mt #menu-toggle .sf-menu li {margin:0;position:relative;top:0;display:block;float:none;clear:both;width:100%!important;left:0!important}';
+ $menu_toggle_superfish_css = '
+ .at-mt .menu-toggle .sf-menu {
+ float: none;
+ margin: 0;
+ height: auto;
+ }
+ .at-mt .menu-toggle .sf-menu ul,
+ .at-mt .menu-toggle .sf-menu li {
+ margin: 0;
+ position: relative;
+ top: 0;
+ display: block;
+ float: none;
+ clear: both;
+ width: 100% !important;
+ left: 0 !important;
+ }
+ .at-mt .menu-toggle .sf-menu ul {
+ left: 0;
+ position: static;
+ }
+ .at-mt .menu-toggle .sf-hidden {
+ display: none !important;
+ }';
}
else {
$menu_toggle_superfish_css = '';
diff --git a/at_core/scripts/menu-toggle.js b/at_core/scripts/menu-toggle.js
index 5e94962..702029d 100755
--- a/at_core/scripts/menu-toggle.js
+++ b/at_core/scripts/menu-toggle.js
@@ -36,7 +36,7 @@
// Toggle menus open or closed
$(".at-menu-toggle-button-link").click(function() {
- $(this).parent().next().slideToggle(100, 'swing');
+ $(this).parent().siblings('.menu-toggle').slideToggle(100, 'swing');
return false;
});