From 56e6a8c7418a584b853e7536fca8e06649901a59 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 14 Feb 2019 19:37:21 +0000 Subject: [PATCH] Bug 22045: (follow-up) Fix tab-switching when some tab numbers are missing This patch changes the way tab-switching is done so that it switching tabs based on tab id rather than tab index. Using tab index doesn't work when the tab number doesn't match the tab index. To test, apply the patch and load a record or blank editor using a MARC framework which doesn't include one or more tabs (for instance, by deleting the entries in the framework for one tab: DELETE FROM marc_subfield_structure WHERE frameworkcode = 'KT' AND tab = 4; ...backup first). In the MARC editor the numbered tabs should exclude that number. Tab-switching should work correctly. --- koha-tmpl/intranet-tmpl/prog/css/addbiblio.css | 7 +++-- .../prog/en/modules/cataloguing/addbiblio.tt | 31 +++++++++++++++------- koha-tmpl/intranet-tmpl/prog/js/staff-global.js | 2 +- 3 files changed, 28 insertions(+), 12 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/css/addbiblio.css b/koha-tmpl/intranet-tmpl/prog/css/addbiblio.css index e7b3b14..03dd04b 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/addbiblio.css +++ b/koha-tmpl/intranet-tmpl/prog/css/addbiblio.css @@ -208,6 +208,8 @@ tbody tr.active td { border: 1px solid #EDF4F6; border-left: 0; border-right: 1px solid #EDF4F6; + border-bottom-right-radius: 5px; + border-bottom-left-radius: 5px; display: block; font-weight: bold; padding: .3em 1.5em; @@ -217,6 +219,7 @@ tbody tr.active td { .toolbar-tabs li.selected a { background-color: #EDF4F6; border-right: 1px solid #C3D6DB; + border-bottom: 1px solid #C3D6DB; font-weight: bold; } @@ -228,8 +231,8 @@ tbody tr.active td { background-color: #F4F8F9; } -.toolbar-tabs li:last-child a { - +.toolbar-tabs li:first-child a { + border-left: 1px solid #EDF4F6; } .tag_anchors_list { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt index f01d049..70ee70d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt @@ -28,7 +28,7 @@ }); [% IF tab %] - $('#addbibliotabs').selectTabByID("#[% tab | html %]"); + $('#addbibliotabs').selectTabByID("tab[% tab | html %]"); [% END %] Sticky = $("#toolbar"); @@ -139,7 +139,7 @@ $(".toolbar-tabs li").removeClass("selected"); $(this).parent().addClass("selected"); var tabid = $(this).data("tabid"); - $("#addbibliotabs").tabs( "option", "active", tabid ); + $('#addbibliotabs').selectTabByID("tab" + tabid + "XX"); $(".tag_anchors").removeClass("tab_selected").hide(); $(".tag_anchors_" + tabid ).addClass("tab_selected").show(); }); @@ -574,15 +574,27 @@ function Changefwk() { [% END %] [% END %]
- + [% IF ( BIG_LOOP.size > 1 ) %] + + [% END %]