Bugzilla – Attachment 20085 Details for
Bug 10678
Allow framework selection when creating from Z39.50
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10678 - Allow framework selection when creating from Z39.50
Bug-10678---Allow-framework-selection-when-creatin.patch (text/plain), 3.76 KB, created by
Tomás Cohen Arazi (tcohen)
on 2013-08-02 20:59:22 UTC
(
hide
)
Description:
Bug 10678 - Allow framework selection when creating from Z39.50
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2013-08-02 20:59:22 UTC
Size:
3.76 KB
patch
obsolete
>From efca51a44d92ffb5a397aa00ae89d74939cd71b9 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@gmail.com> >Date: Fri, 2 Aug 2013 15:22:43 -0300 >Subject: [PATCH] Bug 10678 - Allow framework selection when creating from > Z39.50 > >If we are creating a new record, we are forced to use the default framework >and then change it after we have the cataloguing form filled. This patch >adds the option to choose (from a splitted button dropdown) which framework >to use. > >To test: >- Apply the patch. >- Go to More > Cataloguing >- Check there's a nice split button that says "New from Z39.50" >a) Click the button, the usual Z39.50 search popup should appear and work as expected > (check the URL parameters and see frameworkcode= has no value >b) Click on the dropdown arrow, choose a framework and the usual Z39.50 search popup should > appear, this time frameworkcode= should have the chosen value. > >Regards >To+ > >Edit: fixed a small bug that prevented the default framework to be called. Thanks Owen for testing. > >Sponsored-by: Universidad Nacional de Cordoba >--- > .../prog/en/modules/cataloguing/addbooks.tt | 28 +++++++++++++++++----- > 1 file changed, 22 insertions(+), 6 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt >index 9155235..56b8fb3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt >@@ -7,21 +7,26 @@ > > $(document).ready(function() { > $("#z3950search").click(function(){ >- PopupZ3950(); >+ PopupZ3950(""); >+ return false; >+ }); >+ >+ $(".z3950searchFw").click(function(){ >+ PopupZ3950($(this).prop('id')); > return false; > }); > }); > > /* this function open a popup to search on z3950 server. */ >- function PopupZ3950() { >- var strQuery = GetZ3950Terms(); >+ function PopupZ3950(fw) { >+ var strQuery = GetZ3950Terms(fw); > if(strQuery){ > window.open("/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=[% biblionumber %]"+strQuery,"z3950search",'width=760,height=450,location=yes,toolbar=no,scrollbars=yes,resize=yes'); > } > } > /* provide Z3950 search points */ >- function GetZ3950Terms(){ >- var strQuery="&frameworkcode="; >+ function GetZ3950Terms(fw){ >+ var strQuery="&frameworkcode=" + fw; > [% FOREACH z3950_search_param IN z3950_search_params %] > strQuery += "&" + "[% z3950_search_param.name %]" + "=" + "[% z3950_search_param.encvalue %]"; > [% END %] >@@ -52,7 +57,18 @@ > [% END %] > </ul> > </div> >- <div class="btn-group"><a id="z3950search" class="btn btn-small" href="/cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=[% biblionumber %]&frameworkcode=[% FOREACH z3950_search_param IN z3950_search_params %]&[% z3950_search_param.name %]=[% z3950_search_param.encvalue %][% END %]"><i class="icon-search"></i> Z39.50 search</a></div> >+ <div class="btn-group"> >+ <button class="btn btn-small" id="z3950search"><i class="icon-search"></i> New from Z39.50</button> >+ <button class="btn btn-small dropdown-toggle" data-toggle="dropdown"> >+ <span class="caret"></span> >+ </button> >+ <ul class="dropdown-menu"> >+ <li id="" class="z3950searchFw"><a href="#">Default framework</a></li> >+ [% FOREACH frameworkcodeloo IN frameworkcodeloop %] >+ <li id="[% frameworkcodeloo.value %]" class="z3950searchFw"><a href="#">[% frameworkcodeloo.frameworktext %]</a></li> >+ [% END %] >+ </ul> >+ </div> > </div> > [% END %] > >-- >1.8.1.2
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 10678
:
20081
|
20082
|
20085
|
20088
|
20261
|
20262
|
20890
|
20891