From f8e73978a246780296a304164e551f66430a2d8a Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 7 May 2020 12:33:17 +0200 Subject: [PATCH] Bug 24279: Display the tip in the title of the option This patch tells select2 to retrieve the title attribute from the original option node. Signed-off-by: Marcel de Rooy Signed-off-by: Jonathan Druart --- koha-tmpl/intranet-tmpl/prog/en/includes/select2.inc | 3 +++ .../prog/en/modules/catalogue/moredetail.tt | 12 +----------- .../prog/en/modules/cataloguing/additem.tt | 10 +--------- 3 files changed, 5 insertions(+), 20 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/select2.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/select2.inc index c776cbafc8..9f0a4aeb02 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/select2.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/select2.inc @@ -42,6 +42,9 @@ var n = input.length - max; return _("Please delete %d character(s)").format(n); }, + formatResult: function(item) { + return $('
', {title: item.element[0].title}).text(item.text); + }, formatSelectionTooBig: function (limit) { return _("You can only select %s item(s)").format(limit); }, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt index 62d08605db..9145c17a89 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt @@ -108,8 +108,7 @@ [% FOREACH itemlostloo IN itemlostloop %] [% IF ClaimReturnedLostValue && !ITEM_DAT.itemlost && itemlostloo.authorised_value == ClaimReturnedLostValue #Filter claims returned status from pulldown %] - [% SET add_claims_returned_tip = itemlostloo.lib %] - + [% ELSIF itemlostloo.authorised_value == ITEM_DAT.itemlost %] [% ELSE %] @@ -120,12 +119,6 @@ - [% IF add_claims_returned_tip %] - - [% END %] - [% IF ClaimReturnedLostValue && ITEM_DAT.itemlost == ClaimReturnedLostValue %]

Item has been claimed as returned.

@@ -312,9 +305,6 @@ [% END %] [% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt index 38b22ae343..f8441919e6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt @@ -167,21 +167,13 @@ [% ELSE %] [% IF ite.IS_LOST_AV && aval == Koha.Preference("ClaimReturnedLostValue") %] - [% SET add_claims_returned_tip = mv.labels.$aval %] - + [% ELSE %] [% END %] [% END %] [% END %] - - [% IF ite.IS_LOST_AV && add_claims_returned_tip %] -   - - [% END %] [% ELSIF ( mv.type == 'text_auth' ) %] [% IF mv.readonly %] -- 2.39.5