Bugzilla – Attachment 123277 Details for
Bug 28773
Aquisitions from external source not working for non english language
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28773: (bug 23302 follow-up) Fix add order from z3950 search results
Bug-28773-bug-23302-follow-up-Fix-add-order-from-z.patch (text/plain), 5.00 KB, created by
Jonathan Druart
on 2021-07-29 06:34:30 UTC
(
hide
)
Description:
Bug 28773: (bug 23302 follow-up) Fix add order from z3950 search results
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-07-29 06:34:30 UTC
Size:
5.00 KB
patch
obsolete
>From 3e3134d2b403ffe292ec3b673de0dba2dc04ad42 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 28 Jul 2021 12:04:43 +0200 >Subject: [PATCH] Bug 28773: (bug 23302 follow-up) Fix add order from z3950 > search results > >For translated interface. > >Using 'Order' (the button text) was not a good idea as the interface can >be translated :) > >Signed-off-by: Mark Hofstetter <koha@trust-box.at> >--- > .../prog/en/modules/acqui/z3950_search.tt | 6 +++--- > .../intranet-tmpl/prog/js/z3950_search.js | 20 ++++++++++--------- > 2 files changed, 14 insertions(+), 12 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt >index 4637803dea6..561895d5fa2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt >@@ -184,9 +184,9 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : > <div class="btn-group dropup"> > <a class="btn btn-default btn-xs z3950actions" href="#">MARC</a><button data-toggle="dropdown" class="btn-xs dropdown-toggle"><span class="caret"></span></button> > <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="z3950preview[% breeding_loo.breedingid | html %]"> >- <li><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid | uri %]" title="MARC" class="previewData"><i class="fa fa-eye"></i> MARC</a></li> >- <li><a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&importid=[% breeding_loo.breedingid | uri %]" title="Card" class="previewData"><i class="fa fa-eye"></i> Card</a></li> >- <li><a href="/cgi-bin/koha/acqui/neworderempty.pl?frameworkcode=[% frameworkcode | uri %]&breedingid=[% breeding_loo.breedingid | uri %]&booksellerid=[% booksellerid | uri %]&basketno=[% basketno | uri %]" class="chosen" title="Order"><i class="fa fa-plus"></i> [% tp('verb', 'Order') | html %]</a></li> >+ <li><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid | uri %]" title="MARC" class="previewData" data-action="show_marc"><i class="fa fa-eye"></i> MARC</a></li> >+ <li><a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&importid=[% breeding_loo.breedingid | uri %]" title="Card" class="previewData" data-action="show_card"><i class="fa fa-eye"></i> Card</a></li> >+ <li><a href="/cgi-bin/koha/acqui/neworderempty.pl?frameworkcode=[% frameworkcode | uri %]&breedingid=[% breeding_loo.breedingid | uri %]&booksellerid=[% booksellerid | uri %]&basketno=[% basketno | uri %]" class="chosen" title="Order" data-action="order"><i class="fa fa-plus"></i> [% tp('verb', 'Order') | html %]</a></li> > </ul> > </div> > </td> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/z3950_search.js b/koha-tmpl/intranet-tmpl/prog/js/z3950_search.js >index 10b4149fa00..1e34fd09455 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/z3950_search.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/z3950_search.js >@@ -126,9 +126,9 @@ $( document ).ready( function() { > > $( "#resultst" ).on("click", ".chosen", function(e) { > e.preventDefault(); >- var title = $(this).attr('title'); >- ChangeLastAction( title, 0 ); >- if( title == 'Order' ) window.location = $(this).attr('href'); >+ var action = $(this).data('action'); >+ ChangeLastAction( action, 0 ); >+ if( action == 'order' ) window.location = $(this).attr('href'); > else { > opener.document.location = $(this).attr('href'); > window.close(); >@@ -140,15 +140,17 @@ function InitLastAction() { > if( $("#resultst").length == 0 ) return; > try { last_action = localStorage.getItem('z3950search_last_action'); } catch (err) {} > if( last_action ) { >- var linkcount = $(".z3950actions:eq(0)").siblings(".dropdown-menu").find("a[title='"+last_action+"']").length; >- if( linkcount == 0 ) return; >- if( last_action != 'MARC' ) $( ".z3950actions" ).text( last_action ); >+ var z3950_action_li = $(".z3950actions:eq(0)").siblings(".dropdown-menu").find("a[data-action='"+last_action+"']"); >+ if( z3950_action_li.length == 0 ) return; >+ if( last_action != 'show_marc' ) { >+ $( ".z3950actions" ).text($(z3950_action_li).text()).data('action', last_action); >+ } > } > } > >-function ChangeLastAction(title, change_text) { >- if( last_action && last_action == title ) return; >- last_action = title; >+function ChangeLastAction(action, change_text) { >+ if( last_action && last_action == action ) return; >+ last_action = action; > if( change_text ) $( ".z3950actions" ).text( last_action ); > if( previewed == 0 || change_text == 1 ) > try { localStorage.setItem('z3950search_last_action', last_action); } catch(err) {} >-- >2.20.1
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 28773
:
123244
|
123277
|
123291
|
123292