@@ -, +, @@ - Go to Administration -> System preferences. - Test the various preference categories and confirm that the submenus appear correctly and jump you to the right section. - Test that if you click a section heading to collapse it that clicking the corresponding submenu link in the sidebar causes it to expand again. - Do a search for system preferences and confirm that the sidebar menu displays correctly. - Confirm that the "View all..." links take you to the correct page and section. --- koha-tmpl/intranet-tmpl/prog/css/preferences.css | 49 ++++- koha-tmpl/intranet-tmpl/prog/css/right-to-left.css | 12 -- .../intranet-tmpl/prog/en/includes/prefs-menu.inc | 202 +++++++++++++++++++-- .../prog/en/modules/admin/preferences.tt | 14 +- koha-tmpl/intranet-tmpl/prog/img/collapse.gif | Bin 57 -> 0 bytes koha-tmpl/intranet-tmpl/prog/img/expand.gif | Bin 57 -> 0 bytes .../intranet-tmpl/prog/js/pages/preferences.js | 15 +- 7 files changed, 249 insertions(+), 43 deletions(-) delete mode 100644 koha-tmpl/intranet-tmpl/prog/img/collapse.gif delete mode 100644 koha-tmpl/intranet-tmpl/prog/img/expand.gif --- a/koha-tmpl/intranet-tmpl/prog/css/preferences.css +++ a/koha-tmpl/intranet-tmpl/prog/css/preferences.css @@ -47,19 +47,35 @@ caption { h3 { color : #003366; margin : .4em 0; - width : 40%; } -h3.expanded { - background: transparent url("../img/collapse.gif") 0 6px no-repeat; - cursor : pointer; - padding-left : 12px; +/* https://css-tricks.com/hash-tag-links-padding/#article-header-id-4 */ +h3:target { + margin-top: -12px; + padding-top: 50px; } +h3:target::before { + padding: 0 5px; + position: absolute; + top: 25px; +} + +h3 i { + color: #336699; +} + +h3.expanded, h3.collapsed { - background: transparent url("../img/expand.gif") 0 6px no-repeat; - cursor : pointer; - padding-left : 12px; + cursor: pointer; +} + +h3.expanded i.fa.fa-caret-down::before { + content: "\f0d7"; +} + +h3.collapsed i.fa.fa-caret-down::before { + content: "\f0da"; } .humanMsg strong { @@ -134,4 +150,19 @@ span.overridden { border: 1px solid #EEE; margin: 1em 1em 1em 0; resize: vertical; -} +} + +#menu ul li.active a.pref_sublink { + background: #FFF none; + border: 0; + color: #004D99; + font-size: 100%; + hyphens: auto; + margin: 0; + padding: .2em .5em; + text-align: right; +} + +#menu ul ul { + padding-left: 0; +} --- a/koha-tmpl/intranet-tmpl/prog/css/right-to-left.css +++ a/koha-tmpl/intranet-tmpl/prog/css/right-to-left.css @@ -377,18 +377,6 @@ p label, { float: left; } -/*the arrwos in pref.*/ -h3.expanded { - background: url("../img/collapse.gif") no-repeat scroll right 6px transparent; - cursor: pointer; - padding-right: 12px; -} -h3.collapsed { - background: url("../img/expand.gif") no-repeat scroll right 6px transparent; - cursor: pointer; - padding-right: 12px; - -} .dropdown-menu { position: absolute; top: 100%; --- a/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-menu.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/prefs-menu.inc @@ -1,21 +1,185 @@ + +[% BLOCK subtabs %] + [% UNLESS ( searchfield ) %] + [% FOREACH TAB IN TABS %] + + [% END %] + [% END %] +[% END %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tt @@ -47,8 +47,18 @@ [% FOREACH LINE IN TAB.LINES %] [% IF ( LINE.is_group_title ) %] [% UNLESS ( loop.first ) %][% END %] -

[% LINE.title | html %]

- +
+
+

[% LINE.title | html %]

+
+
+ [% IF ( searchfield ) %] + + [% END %] +
+
+ +
[% UNLESS ( loop.last ) %][% END %] [% ELSE %] --- a/koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js +++ a/koha-tmpl/intranet-tmpl/prog/js/pages/preferences.js @@ -150,7 +150,8 @@ $( document ).ready( function () { var collapsible = $(".collapsed,.expanded"); $(collapsible).on("click",function(){ - var panel = $(this).next("div"); + var h3Id = $(this).attr("id"); + var panel = $("#collapse_" + h3Id); if(panel.is(":visible")){ $(this).addClass("collapsed").removeClass("expanded").attr("title",MSG_CLICK_TO_EXPAND); panel.hide(); @@ -160,6 +161,18 @@ $( document ).ready( function () { } }); + $(".pref_sublink").on("click", function(){ + /* If the user clicks a sub-menu link in the sidebar, + check to see if it is collapsed. If so, expand it */ + var href = $(this).attr("href"); + href = href.replace("#",""); + var panel = $("#collapse_" + href ); + if( panel.is(":hidden") ){ + $("#" + href ).addClass("expanded").removeClass("collapsed").attr("title",MSG_CLICK_TO_COLLAPSE); + panel.show(); + } + }); + if ( to_highlight ) { var words = to_highlight.split( ' ' ); $( '.prefs-tab table' ).find( 'td, th' ).not( '.name-cell' ).each( function ( i, td ) { --
PreferenceValue