Bugzilla – Attachment 85567 Details for
Bug 22045
Cataloging UX enhancement - Improve access to tabs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22045: (follow-up) Fix tab-switching when some tab numbers are missing
Bug-22045-follow-up-Fix-tab-switching-when-some-ta.patch (text/plain), 6.71 KB, created by
Owen Leonard
on 2019-02-22 16:50:08 UTC
(
hide
)
Description:
Bug 22045: (follow-up) Fix tab-switching when some tab numbers are missing
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2019-02-22 16:50:08 UTC
Size:
6.71 KB
patch
obsolete
>From 56e6a8c7418a584b853e7536fca8e06649901a59 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >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 %] > <div class="toolbar-tabs-container"> >- <ul class="toolbar-tabs"> >- [%- FOREACH BIG_LOO IN BIG_LOOP -%][%- SET tabname = BIG_LOO.number -%][% IF loop.first %]<li class="selected">[% ELSE %]<li>[% END %]<a data-tabid="[% BIG_LOO.number | html %]" href="#tab[% BIG_LOO.number | html %]XX">[% tabname | html %]</a></li>[%- END -%] >- </ul> >+ [% IF ( BIG_LOOP.size > 1 ) %] >+ <ul class="toolbar-tabs"> >+ [%- FOREACH BIG_LOO IN BIG_LOOP -%] >+ [% IF loop.first %] >+ <li class="selected"> >+ [% ELSE %] >+ <li> >+ [% END %] >+ <a data-tabid="[% BIG_LOO.number | html %]" href="#tab[% BIG_LOO.number | html %]XX">[% BIG_LOO.number | html %]</a> >+ </li> >+ [%- END -%] >+ </ul> >+ [% END %] > <ul class="tag_anchors_list"> > [% FOREACH BIG_LOO IN BIG_LOOP %] > [% IF loop.first %][% SET tab_selected = "tab_selected" %][% ELSE %][% SET tab_selected = "" %][% END %] > [% FOREACH innerloo IN BIG_LOO.innerloop %] > [% IF ( innerloo.tag ) %] >- <li class="tag_anchors tag_anchors_[% BIG_LOO.number | html %] [% tab_selected | html %]"><a class="tag_anchor" id="tag_anchor_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]" title="tag_anchor_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]" href="#div_indicator_tag_[% innerloo.tag | uri %]_[% innerloo.index | uri %][% innerloo.random | uri %]">[% innerloo.tag | uri %]</a></li> >+ <li class="tag_anchors tag_anchors_[% BIG_LOO.number | html %] [% tab_selected | html %]"> >+ <a class="tag_anchor" id="tag_anchor_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]" title="tag_anchor_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]" href="#div_indicator_tag_[% innerloo.tag | uri %]_[% innerloo.index | uri %][% innerloo.random | uri %]">[% innerloo.tag | uri %]</a> >+ </li> > [% END %] > [% END %] > [% END %] >@@ -609,15 +621,16 @@ function Changefwk() { > <div id="addbibliotabs" class="toptabs numbered"> > <ul> > [% FOREACH BIG_LOO IN BIG_LOOP %] >- <li><a href="#tab[% BIG_LOO.number | uri %]XX">[% BIG_LOO.number | html %]</a></li> >+ <li><a href="#tab[% BIG_LOO.number | uri %]XX">[% BIG_LOO.number | html %]</a></li> > [% END %] > </ul> > > [% FOREACH BIG_LOO IN BIG_LOOP %] >- [% SET tabname = BIG_LOO.number %] > <div id="tab[% BIG_LOO.number | html %]XX"> > >- <h3>Section [% tabname | html %]</h3> >+ [% IF ( BIG_LOOP.size > 1 ) %] >+ <h3>Section [% BIG_LOO.number | html %]</h3> >+ [% END %] > [% FOREACH innerloo IN BIG_LOO.innerloop %] > [% IF ( innerloo.tag ) %] > <div class="tag clearfix" id="tag_[% innerloo.tag | html %]_[% innerloo.index | html %][% innerloo.random | html %]"> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >index b60af5e..dc7f32e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >@@ -31,7 +31,7 @@ $.fn.tabIndex = function () { > return $(this).parent().children('div').index(this); > }; > $.fn.selectTabByID = function (tabID) { >- $(this).tabs("option", "active", $(tabID).tabIndex()); >+ $(this).tabs("option", "active", $( "#" + tabID ).tabIndex()); > }; > > $(document).ready(function() { >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 22045
:
83473
|
83770
|
84728
|
84896
|
84984
|
84985
|
84986
|
84993
|
84994
|
84995
|
84996
|
84997
|
84998
|
85567
|
85578
|
85579
|
85580
|
85581
|
85582
|
85583
|
85584
|
85585