diff --git a/interface/web/themes/default/assets/javascripts/responsive.js b/interface/web/themes/default/assets/javascripts/responsive.js index dd64ff953a3e3e86653e12f6c9d2adc81e5544bc..abdf1ecac797ac06344d9ba3b1cd42ec687c8e2e 100644 --- a/interface/web/themes/default/assets/javascripts/responsive.js +++ b/interface/web/themes/default/assets/javascripts/responsive.js @@ -9,9 +9,11 @@ function loadPushyMenu() { // Hauptnavigation $('<ul />').appendTo($responsiveNavigation); + var $addto = false; $($mainNavigation).find('a').each(function () { var $item = $(this); var $activeClass = $item.hasClass('active') ? ' class="active"' : ''; + var isactive = $activeClass != '' ? true : false; var capp = $item.attr('data-capp'); if(capp) $activeClass += ' data-capp="' + capp + '"'; @@ -19,11 +21,14 @@ function loadPushyMenu() { capp = $item.attr('data-load-content'); if(capp) $activeClass += ' data-load-content="' + capp + '"'; - $responsiveNavigation.find('ul').append($('<li><a href="' + $item.attr('href') + '"' + $activeClass + '><i class="icon ' + $item.data('icon-class') + '"></i>' + $item.text() + '</a></li>')); + var $newel = $('<li><a href="' + $item.attr('href') + '"' + $activeClass + '><i class="icon ' + $item.data('icon-class') + '"></i>' + $item.text() + '</a></li>'); + if(isactive != '') $addto = $newel; + $responsiveNavigation.find('ul').append($newel); }); // Subnavigation - $('<ul class="subnavi" />').appendTo($responsiveNavigation); + if(!$addto) $addto = $responsiveNavigation; + $('<ul class="subnavi" />').appendTo($addto); $($subNavigation).find('a').each(function () { var $item = $(this); @@ -35,6 +40,9 @@ function loadPushyMenu() { capp = $item.attr('data-load-content'); if(capp) addattr += ' data-load-content="' + capp + '"'; + capp = $item.hasClass('subnav-header'); + if(capp) addattr += ' class="subnav-header"'; + $responsiveNavigation.find('ul.subnavi').append($('<li><a href="' + $item.attr('href') + '"' + addattr + '>' + $item.text() + '</a></li>')); }); }; diff --git a/interface/web/themes/default/assets/javascripts/responsive.min.js b/interface/web/themes/default/assets/javascripts/responsive.min.js index 51b621b2505fae25ce3a0c0950145ca0b9379906..a984d7f09609a56cb227e57d43e818488051c75d 100644 --- a/interface/web/themes/default/assets/javascripts/responsive.min.js +++ b/interface/web/themes/default/assets/javascripts/responsive.min.js @@ -1 +1 @@ -function loadPushyMenu(){var a=$("#main-navigation");var c=$("#sidebar");var b=$("nav.pushy");b.html("");$("<ul />").appendTo(b);$(a).find("a").each(function(){var d=$(this);var f=d.hasClass("active")?' class="active"':"";var e=d.attr("data-capp");if(e){f+=' data-capp="'+e+'"'}e=d.attr("data-load-content");if(e){f+=' data-load-content="'+e+'"'}b.find("ul").append($('<li><a href="'+d.attr("href")+'"'+f+'><i class="icon '+d.data("icon-class")+'"></i>'+d.text()+"</a></li>"))});$('<ul class="subnavi" />').appendTo(b);$(c).find("a").each(function(){var d=$(this);var e="";var f=d.attr("data-capp");if(f){e+=' data-capp="'+f+'"'}f=d.attr("data-load-content");if(f){e+=' data-load-content="'+f+'"'}b.find("ul.subnavi").append($('<li><a href="'+d.attr("href")+'"'+e+">"+d.text()+"</a></li>"))})}; \ No newline at end of file +function loadPushyMenu(){var a=$("#main-navigation");var d=$("#sidebar");var b=$("nav.pushy");b.html("");$("<ul />").appendTo(b);var c=false;$(a).find("a").each(function(){var e=$(this);var i=e.hasClass("active")?' class="active"':"";var g=i!=""?true:false;var h=e.attr("data-capp");if(h){i+=' data-capp="'+h+'"'}h=e.attr("data-load-content");if(h){i+=' data-load-content="'+h+'"'}var f=$('<li><a href="'+e.attr("href")+'"'+i+'><i class="icon '+e.data("icon-class")+'"></i>'+e.text()+"</a></li>");if(g!=""){c=f}b.find("ul").append(f)});if(!c){c=b}$('<ul class="subnavi" />').appendTo(c);$(d).find("a").each(function(){var e=$(this);var f="";var g=e.attr("data-capp");if(g){f+=' data-capp="'+g+'"'}g=e.attr("data-load-content");if(g){f+=' data-load-content="'+g+'"'}g=e.hasClass("subnav-header");if(g){f+=' class="subnav-header"'}b.find("ul.subnavi").append($('<li><a href="'+e.attr("href")+'"'+f+">"+e.text()+"</a></li>"))})}; \ No newline at end of file diff --git a/interface/web/themes/default/assets/stylesheets/responsive.css b/interface/web/themes/default/assets/stylesheets/responsive.css index e72ebfc250dcfaffc4526d7958e86e390070241f..dd91918a32184ce74bfb229ed1b2f9c63946722f 100644 --- a/interface/web/themes/default/assets/stylesheets/responsive.css +++ b/interface/web/themes/default/assets/stylesheets/responsive.css @@ -7,7 +7,10 @@ html, body { .pushy ul.subnavi li { font-size: 12px; } .pushy ul.subnavi li a { - padding: 2px 10px; } + padding: 2px 10px; + font-weight: normal; } + .pushy ul.subnavi li a.subnav-header { + font-weight: bold; } .pushy a { padding: 10px; transition: color ease 500ms; } diff --git a/interface/web/themes/default/assets/stylesheets/responsive.min.css b/interface/web/themes/default/assets/stylesheets/responsive.min.css index 5f8c2386abbb5456e9902b43a8a2c473d68f5b1f..1ff506d4205a98468c30ed0210c1763a27c88247 100644 --- a/interface/web/themes/default/assets/stylesheets/responsive.min.css +++ b/interface/web/themes/default/assets/stylesheets/responsive.min.css @@ -1 +1 @@ -html,body{height:100%}.pushy ul{padding-left:0;list-style:none}.pushy ul.subnavi li{font-size:12px}.pushy ul.subnavi li a{padding:2px 10px}.pushy a{padding:10px;transition:color ease 500ms}.pushy i{font-size:22px;vertical-align:sub}@media screen and (max-width:970px){#main-wrapper,#content,#sidebar{width:100%}#inner-wrapper{margin:0 10px}#sidebar.news-sidebar{margin-top:0}}@media screen and (max-width:860px){#main-navigation{display:block}#main-navigation a{float:left;display:block;margin-top:-1px;padding-top:6px;width:60px;height:50px;border-bottom:0;border-right-style:solid;border-right-width:1px;border-bottom-style:solid;border-bottom-width:1px}#main-navigation .icon{font-size:16px}#main-navigation .title{font-size:10px}#main-navigation .btn{border-radius:0}#main-navigation .btn:first-child{margin-left:-1px}}@media screen and (max-width:670px){#main-navigation,#sidebar{display:none}.menu-btn{display:block;margin-top:8px;margin-right:10px;font-size:30px}}@media screen and (max-width:600px){#headerbar{float:left;width:100%}#searchform{float:left;margin-top:0}#logout-button{margin-top:0;margin-left:0}#sidebar{margin-top:10px}.table,.table thead,.table tbody,.table tr,.table th,.table td{display:block}.table caption{width:100%}.table thead tr{position:absolute;top:-9999px;left:-9999px}.table tbody tr{border-top:0}.progress{width:100%}}@media screen and (max-width:350px){#searchform input{width:130px}} \ No newline at end of file +html,body{height:100%}.pushy ul{padding-left:0;list-style:none}.pushy ul.subnavi li{font-size:12px}.pushy ul.subnavi li a{padding:2px 10px;font-weight:normal}.pushy ul.subnavi li a.subnav-header{font-weight:bold}.pushy a{padding:10px;transition:color ease 500ms}.pushy i{font-size:22px;vertical-align:sub}@media screen and (max-width:970px){#main-wrapper,#content,#sidebar{width:100%}#inner-wrapper{margin:0 10px}#sidebar.news-sidebar{margin-top:0}}@media screen and (max-width:860px){#main-navigation{display:block}#main-navigation a{float:left;display:block;margin-top:-1px;padding-top:6px;width:60px;height:50px;border-bottom:0;border-right-style:solid;border-right-width:1px;border-bottom-style:solid;border-bottom-width:1px}#main-navigation .icon{font-size:16px}#main-navigation .title{font-size:10px}#main-navigation .btn{border-radius:0}#main-navigation .btn:first-child{margin-left:-1px}}@media screen and (max-width:670px){#main-navigation,#sidebar{display:none}.menu-btn{display:block;margin-top:8px;margin-right:10px;font-size:30px}}@media screen and (max-width:600px){#headerbar{float:left;width:100%}#searchform{float:left;margin-top:0}#logout-button{margin-top:0;margin-left:0}#sidebar{margin-top:10px}.table,.table thead,.table tbody,.table tr,.table th,.table td{display:block}.table caption{width:100%}.table thead tr{position:absolute;top:-9999px;left:-9999px}.table tbody tr{border-top:0}.progress{width:100%}}@media screen and (max-width:350px){#searchform input{width:130px}} \ No newline at end of file diff --git a/interface/web/themes/default/templates/sidenav.tpl.htm b/interface/web/themes/default/templates/sidenav.tpl.htm index b2fda81e0c11e4b143c67c00310037c59e24a1a0..9515c40ab5c6bc9c10273900bbe69557b5ffe899 100644 --- a/interface/web/themes/default/templates/sidenav.tpl.htm +++ b/interface/web/themes/default/templates/sidenav.tpl.htm @@ -1,5 +1,5 @@ <tmpl_loop name="nav_left"> - <header><tmpl_if name="startpage"><a href="#" data-load-content="<tmpl_var name='startpage'>"></tmpl_if><tmpl_var name="title"><tmpl_if name="startpage"></a></tmpl_if></header> + <header><tmpl_if name="startpage"><a href="#" class="subnav-header" data-load-content="<tmpl_var name='startpage'>"></tmpl_if><tmpl_var name="title"><tmpl_if name="startpage"></a></tmpl_if></header> <ul id="sub-navigation"> <tmpl_loop name="items"> <li<tmpl_if name="html_id"> id='<tmpl_var name="html_id">' </tmpl_if>>