@@ -, +, @@ - Confirm that the tabs look correct, with the same style they had before the template change. - The first tab ("0") should be selected by default. - Confirm that tab-switching works correctly: The tab color should change and the list of numbered tags in the menu just below should change to match the section. - Confirm that these tag number links still work correctly to jump you down the page to the corresponding tag. - Without filling in any mandatory fields, click the "Save" button. - You should get an error message about missing mandatory fields. - Clicking the "Go to field" link should take you to the correct tab and the correct tag. - Append a hash to the URL to pre-select a tab other than the first one, e.g. "/cgi-bin/koha/authorities/authorities.pl?authtypecode=PERSO_NAME#tab5XX_panel" The correct tab should be selected upon page load. --- .../intranet-tmpl/prog/css/addbiblio.css | 3 +- .../en/modules/authorities/authorities.tt | 40 +++++++++++-------- 2 files changed, 25 insertions(+), 18 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/css/addbiblio.css +++ a/koha-tmpl/intranet-tmpl/prog/css/addbiblio.css @@ -376,7 +376,8 @@ tbody tr.active td { width: 100%; } -.toolbar-tabs-container .nav-tabs li.selected a:hover { +.toolbar-tabs-container .nav-tabs li.selected a:hover, +.toolbar-tabs-container .nav-tabs li.selected a:focus { background-color: #418940; border: 1px solid #418940; border-left: 0; --- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt @@ -33,6 +33,8 @@ if( hashPieces[0] !== "" ){ selectTab( hashPieces[0] ); window.scrollTo( 0, 0 ); + } else { + selectTab( "#tab0XX_panel" ); } $( "ul.sortable_field", "#authoritytabs" ).sortable(); @@ -57,7 +59,7 @@ return false; }); - $(".toolbar-tabs a").on("click",function(e){ + $(".toolbar-tabs-container .nav-tabs a").on("click",function(e){ e.preventDefault(); selectTab( this.hash ); }); @@ -75,7 +77,7 @@ e.preventDefault(); var tab = $(this).data("tab"); var field = $(this).data("field"); - var tablink = $("a[data-tabid='" + tab + "']" ); + var tablink = $("a[data-tabname='tab" + tab + "XX']" ).get(0).hash; selectTab( tablink ); window.scrollTo( 0, getScrollto( field, "toolbar" ) ); }); @@ -93,9 +95,10 @@ function selectTab( tablink ){ let a = $("a[href='" + tablink + "']"); - $(".toolbar-tabs li").removeClass("selected"); + $(".toolbar-tabs-container .nav-tabs li").removeClass("selected"); a.tab("show").parent().addClass("selected"); - var tabid = a.data("tabid"); + /* Get number from string like "tab9XX" */ + var tabid = a.data("tabname").substring(3, 4); $(".tag_anchors").removeClass("tab_selected").hide(); $(".tag_anchors_" + tabid ).addClass("tab_selected").show(); } @@ -363,17 +366,18 @@
[% IF ( BIG_LOOP && BIG_LOOP.size > 1 ) %] - + [% END # /WRAPPER tabs_nav %] [% END %]
-
-
+ + [% WRAPPER tabs id= "authoritytabs" %] + [% WRAPPER tab_panels %] [% FOREACH BIG_LOO IN BIG_LOOP %] [% IF loop.first %] -
+ [% SET bt_active = 1 %] [% ELSE %] -
+ [% SET bt_active = 0 %] [% END %] + [% WRAPPER tab_panel tabname="tab${BIG_LOO.number}XX" bt_active= bt_active %] [% IF ( BIG_LOOP.size > 1 ) %]

Section [% BIG_LOO.number | html %]

[% END %] @@ -608,10 +614,10 @@ [% END # /IF ( innerloo.tag ) %] [% END # /FOREACH innerloo %] -
+ [% END # /tab_panel#tabXXX %] [% END #/FOREACH BIG_LOO %] -
-
+ [% END # /WRAPPER tab_panels %] + [% END # /WRAPPER tabs %]
[% FOREACH hidden_loo IN hidden_loop %] --