Bugzilla – Attachment 52886 Details for
Bug 16812
Revise JS script for z3950_search.tts and remove onclick events
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16812: Revise JS script for z3950_search.tts and remove onclick events
Bug-16812-Revise-JS-script-for-z3950searchtts-and-.patch (text/plain), 28.05 KB, created by
Héctor Eduardo Castro Avalos
on 2016-06-27 07:49:43 UTC
(
hide
)
Description:
Bug 16812: Revise JS script for z3950_search.tts and remove onclick events
Filename:
MIME Type:
Creator:
Héctor Eduardo Castro Avalos
Created:
2016-06-27 07:49:43 UTC
Size:
28.05 KB
patch
obsolete
>From c0b25e860b299cd6da68d6c23f8ab97a38078016 Mon Sep 17 00:00:00 2001 >From: Hector Castro <hector.hecaxmmx@gmail.com> >Date: Fri, 24 Jun 2016 15:55:40 -0600 >Subject: [PATCH] Bug 16812: Revise JS script for z3950_search.tts and remove > onclick events > >Modify JS script to all templates for z3950_search.tt and reduce the >redundant code > >This patch propose: >-z3950_auth_search.tt has various onclick events used in links. > Also fix: acqui/z3950_search.tt and cataloguing/z3950_search.tt >-Trigger onclick events via JQuery .on() >-Make a separate .js and .inc file >-Reduce the number of line and redundant code >-Also add Font Awesome Icons to "Select/Clear all" and "Clear search form" >links > >To test: >1-Apply bug 16600 on top >2-Apply patch >3-Go to Authorities > click New from Z39.50 >4-Fill some fields and click in "Clear search form" link >5-Search under "Dalton" or another author that launch too many headings >6-Clic in some heading and notice the dialog open, test: "Preview MARC", >ISBD (when showed), "Import" and close the dialog "X". Use the "Import" from table too. >7-Use the "next/previous page" button, change "Go to page" to number in and > out of the range presented, also test whit a letter, etc. > >Go to Cataloging > New from Z39.50/SRU >Repeat steps 3 to 6. But this time with bib records. > >Go to Adquisition > Open or Create a basket and choose to "Add to basket" >button. A modal appear, chose the option "Order from external source" >Repeat steps 3 to 6. But this thime with bib records. > >NOTE: The icon trash for "Clear search form" has been selected according >with module "Advanced search" there is an icon trash with link "Clear fields" >that has the same fuctionality. >For some reason the image loading-small.gif does not charge all times when >the code is get out of the template. >DataTable it is specific for each template > >Sponsored-by: Universidad de El Salvador >--- > .../prog/en/includes/z3950_search.inc | 21 ++++++ > .../prog/en/modules/acqui/z3950_search.tt | 53 +++------------ > .../en/modules/cataloguing/z3950_auth_search.tt | 68 ++++---------------- > .../prog/en/modules/cataloguing/z3950_search.tt | 67 ++++--------------- > koha-tmpl/intranet-tmpl/prog/js/z3950_search.js | 75 ++++++++++++++++++++++ > 5 files changed, 131 insertions(+), 153 deletions(-) > create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/z3950_search.inc > create mode 100644 koha-tmpl/intranet-tmpl/prog/js/z3950_search.js > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/z3950_search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/z3950_search.inc >new file mode 100644 >index 0000000..88a933c >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/z3950_search.inc >@@ -0,0 +1,21 @@ >+[% IF ( total_pages ) %] >+<script type="text/javascript"> >+//<![CDATA[ >+function validate_goto_page(){ >+ var page = $('#goto_page').val(); >+ if(isNaN(page)) { >+ alert(_("The page entered is not a number.")); >+ return false; >+ } >+ else if(page < 1 || page > [% total_pages %] ) { >+ alert(_("The page should be a number between 1 and %s.").format([% total_pages %])); >+ return false; >+ } >+ else { >+ return true; >+ } >+} >+//]]> >+</script> >+[% END %] >+ >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 ebb18df..5c597f7 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 >@@ -17,25 +17,6 @@ > "aaSorting": [[ 1, "asc" ]], > "bPaginate": false > } ) ); >- >- $("#CheckAll").click(function(){ >- $(".checkboxed").checkCheckboxes(); >- return false; >- }); >- $("#CheckNone").click(function(){ >- $(".checkboxed").unCheckCheckboxes(); >- return false; >- }); >- >- $("#closemenu").click(function(e){ >- $(".linktools").hide(); >- $("tr").removeClass("selected"); >- }); >- $("#resetZ3950Search").click(function(e) { >- e.preventDefault(); >- $("form[name='f']").find("input[type=text]").val(""); >- }); >- > /* Inline edit/delete links */ > $("td").click(function(event){ > var $tgt = $(event.target); >@@ -64,27 +45,13 @@ > $("#dataPreviewLabel").html(""); > $("#dataPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/loading-small.gif\" alt=\"\" /> "+_("Loading")+"</div>"); > }); >-}); >- >-[% IF ( total_pages ) %] >-function validate_goto_page(){ >- var page = $('#goto_page').val(); >- if(isNaN(page)) { >- alert(_("The page entered is not a number.")); >- return false; >- } >- else if(page < 1 || page > [% total_pages %] ) { >- alert(_("The page should be a number between 1 and %s.").format([% total_pages %])); >- return false; >- } >- else { >- return true; >- } >-} >-[% END %] > >+}); >+ var MSG_CHOOSE_Z3950 = _("Please choose at least one external target"); > //]]> > </script> >+[% INCLUDE 'z3950_search.inc' %] >+<script type="text/javascript" src="[% interface %]/[% theme %]/js/z3950_search.js"></script> > <style type="text/css"> > .linktools { background-color:#FFF;border-top:1px solid #DDD; border-left: 1px solid #DDD; border-right: 1px solid #666; border-bottom:1px solid #666;display: none; white-space: nowrap;} > .linktools a { font-size : 85%; text-decoration:none; padding:.3em;;background-color:#FFF; display:block;float:left;border-right:1px solid #DDD;} >@@ -128,15 +95,15 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : > [% END %] > </select> > </li> >+ <li><a id="resetZ3950Search" href="#"><i class="fa fa-trash"></i> Clear search form</a></li> > </ol> >- <p><a id="resetZ3950Search" href="#">Clear search form</a></p> > </fieldset> > <input type="hidden" name="biblionumber" value="[% biblionumber %]" /> > <input type="hidden" name="basketno" value="[% basketno %]" /> > <input type="hidden" name="booksellerid" value="[% booksellerid %]" /> > </div> > <div class="yui-u second"> >-<h2>Search targets <span style="display: inline; font-size: 70%; padding-left: 1em;"><span class="checkall"><a id="CheckAll" href="#">Select all</a></span><span class="clearall"><a id="CheckNone" href="#">Clear all</a></span></span></h2> >+<h2>Search targets <span style="display: inline; font-size: 70%; padding-left: 1em;"><span class="checkall"><a id="CheckAll" href="#"><i class="fa fa-check"></i> Select all</a></span> | <span class="clearall"><a id="CheckNone" href="#"><i class="fa fa-remove"></i> Clear all</a></span></span></h2> > <div id="z3950_search_targets_acq"> > [% FOREACH serverloo IN serverloop %] > <p> >@@ -153,7 +120,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : > </div> > </div> > >- <fieldset class="action"><input type="submit" class="submit" value="Search" onclick="cursor :'wait'"/> <a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?booksellerid=[% booksellerid %]&basketno=[% basketno %]">Cancel</a></fieldset> >+ <fieldset class="action"><input type="submit" class="submit" value="Search" /> <a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?booksellerid=[% booksellerid %]&basketno=[% basketno %]">Cancel</a></fieldset> > </form> > > >@@ -233,13 +200,13 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : > [% END %] > > [% IF ( show_prevbutton ) %] >- <input type="button" name="changepage_prev" value="Previous Page" onclick="$('#current_page').val([% current_page %]-1);$('#page_form').submit();" /> >+ <input type="button" name="changepage_prev" value="Previous page" data-currentpage="[% current_page %]" /> > [% END %] > Page [% current_page %] / [% total_pages %] > [% IF ( show_nextbutton ) %] >- <input type="button" name="changepage_next" value="Next Page" onclick="$('#current_page').val([% current_page %]+1);$('#page_form').submit();" /> >+ <input type="button" name="changepage_next" value="Next page" data-currentpage="[% current_page %]" /> > [% END %] >- <br />Go to page : <input id="goto_page" name="goto_page" value="[% current_page %]" size="4" /><input type="submit" name="changepage_goto" onclick="return validate_goto_page();" value="Go" /> >+ <br />Go to page : <input id="goto_page" name="goto_page" value="[% current_page %]" size="4" /><input type="submit" name="changepage_goto" value="Go" /> > </form> > > [% ELSE %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt >index bb21b5b..ec370de 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt >@@ -6,26 +6,9 @@ > [% INCLUDE 'datatables.inc' %] > <script type="text/javascript"> > //<![CDATA[ >-function Import(Breeding,AuthType,authid) { >- opener.document.location="../authorities/authorities.pl?breedingid="+Breeding+"&authtypecode="+AuthType+"&authid="+authid; >- window.close(); >- return false; >-} >- >-function closemenu(){ >- $(".linktools").hide(); >- $("tr").removeClass("selected"); >-} > > $(document).ready(function(){ >- $("#CheckAll").click(function(){ >- $(".checkboxed").checkCheckboxes(); >- return false; >- }); >- $("#CheckNone").click(function(){ >- $(".checkboxed").unCheckCheckboxes(); >- return false; >- }); >+ > $("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, { > "sDom": 't', > "aoColumnDefs": [ >@@ -50,17 +33,6 @@ $(document).ready(function(){ > $(".linktools",row).show().css("position","absolute").css("top",top).css("left",left); > } > }); >- $("form[name='f']").submit(function(){ >- if ($('input[type=checkbox]').filter(':checked').length == 0) { >- alert(_("Please choose at least one Z39.50 target")); >- return false; >- } else >- return true; >- }); >- $("#resetZ3950Search").click(function(e) { >- e.preventDefault(); >- $("form[name='f']").find("input[type=text]").val(""); >- }); > $(".previewMARC").on("click", function(e){ > e.preventDefault(); > var ltitle = $(this).text(); >@@ -73,27 +45,13 @@ $(document).ready(function(){ > $("#marcPreviewLabel").html(""); > $("#marcPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/loading-small.gif\" alt=\"\" /> "+_("Loading")+"</div>"); > }); >-}); >- >-[% IF ( total_pages ) %] >-function validate_goto_page(){ >- var page = $('#goto_page').val(); >- if(isNaN(page)) { >- alert(_("The page entered is not a number.")); >- return false; >- } >- else if(page < 1 || page > [% total_pages %] ) { >- alert(_("The page should be a number between 1 and %s.").format([% total_pages %])); >- return false; >- } >- else { >- return true; >- } >-} >-[% END %] > >+}); >+ var MSG_CHOOSE_Z3950 = _("Please choose at least one external target"); > //]]> > </script> >+[% INCLUDE 'z3950_search.inc' %] >+<script type="text/javascript" src="[% interface %]/[% theme %]/js/z3950_search.js"></script> > <style type="text/css"> > .linktools { background-color:#FFF;border-top:1px solid #DDD; border-left: 1px solid #DDD; border-right: 1px solid #666; border-bottom:1px solid #666;display: none; white-space: nowrap;} > .linktools a { font-size : 85%; text-decoration:none; padding:.3em;;background-color:#FFF; display:block;float:left;border-right:1px solid #DDD;} >@@ -139,12 +97,12 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : > <li><label for="subjectsubdiv">Subject sub-division: </label> <input type="text" id="subjectsubdiv" name="subjectsubdiv" value="" /></li> > <li><label for="title">Title (any): </label> <input type="text" id="title" name="title" value="[% title | html %]" /></li> > <li><label for="uniformtitle">Title (uniform): </label> <input type="text" id="uniformtitle" name="uniformtitle" value="[% uniformtitle | html %]" /></li> >+ <li><a id="resetZ3950Search" href="#"><i class="fa fa-trash"></i> Clear search form</a></li> > </ol> >- <p><a id="resetZ3950Search" href="#">Clear search form</a></p> > </fieldset> > </div> > <div class="yui-g"> >- <h2>Search targets <span style="display: inline; font-size: 70%; padding-left: 1em;"><span class="checkall"><a id="CheckAll" href="#">Select all</a></span><span class="clearall"><a id="CheckNone" href="#">Clear all</a></span></span></h2> >+ <h2>Search targets <span style="display: inline; font-size: 70%; padding-left: 1em;"><span class="checkall"><a id="CheckAll" href="#"><i class="fa fa-check"></i> Select all</a></span> | <span class="clearall"><a id="CheckNone" href="#"><i class="fa fa-remove"></i> Clear all</a></span></span></h2> > <div id="z3950_search_targets_auth"> > [% FOREACH serverloo IN serverloop %] > <p> >@@ -158,7 +116,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : > [% END %] > </div> > </div> >- <fieldset class="action"><input type="submit" class="submit" value="Search" onclick="cursor :'wait'"/> <a class="cancel close" href="#">Cancel</a></fieldset> >+ <fieldset class="action"><input type="submit" class="submit" value="Search"/> <a class="cancel close" href="#">Cancel</a></fieldset> > </form> > [% ELSE %] > <h2>Results for Authority Records</h2> >@@ -174,11 +132,11 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : > <tbody>[% FOREACH breeding_loo IN breeding_loop %] > [% IF ( breeding_loo.breedingid ) %] > <tr id="row[% breeding_loo.breedingid %]"> >- <td>[% breeding_loo.server %] <div class="linktools"><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" class="previewMARC">Preview MARC</a> <a href="#" onclick="Import([% breeding_loo.breedingid %],'[% breeding_loo.heading_code %]','[% breeding_loo.authid %]'); return false">Import</a><a href="#" onclick="closemenu();return false;" title="Close this menu"> X </a></div> </td> >+ <td>[% breeding_loo.server %] <div class="linktools"><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" class="previewMARC">Preview MARC</a> <a href="#" class="import_record" data-breedingid="[% breeding_loo.breedingid %]" data-heading_code="[% breeding_loo.heading_code %]" data-authid="[% breeding_loo.authid %]">Import</a><a href="#" id="close_menu" title="Close this menu"> X </a></div> </td> > <td>[% breeding_loo.heading %]</td> > <td>[% breeding_loo.heading_code %]</td> > <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" class="previewMARC">MARC</a></td> >- <td><a href="#" onclick="Import([% breeding_loo.breedingid %],'[% breeding_loo.heading_code %]','[% breeding_loo.authid %]'); return false">Import</a></td> >+ <td><a href="#" class="import_record" data-breedingid="[% breeding_loo.breedingid %]" data-heading_code="[% breeding_loo.heading_code %]" data-authid="[% breeding_loo.authid %]">Import</a></td> > </tr> > [% END %] > [% END %]</tbody> >@@ -215,13 +173,13 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : > [% END %] > > [% IF ( show_prevbutton ) %] >- <input type="button" name="changepage_prev" value="Previous page" onclick="$('#current_page').val([% current_page %]-1);$('#page_form').submit();" /> >+ <input type="button" name="changepage_prev" value="Previous page" data-currentpage="[% current_page %]" /> > [% END %] > Page [% current_page %] / [% total_pages %] > [% IF ( show_nextbutton ) %] >- <input type="button" name="changepage_next" value="Next page" onclick="$('#current_page').val([% current_page %]+1);$('#page_form').submit();" /> >+ <input type="button" name="changepage_next" value="Next page" data-currentpage="[% current_page %]" /> > [% END %] >- <br />Go to page : <input id="goto_page" name="goto_page" value="[% current_page %]" size="4" /><input type="submit" name="changepage_goto" onclick="return validate_goto_page();" value="Go" /> >+ <br />Go to page : <input id="goto_page" name="goto_page" value="[% current_page %]" size="4" /><input type="submit" name="changepage_goto" value="Go" /> > </form> > > <p><form method="get" action="/cgi-bin/koha/cataloguing/z3950_auth_search.pl"><input type="hidden" name="authid" value="[% authid %]" /><input type="submit" value="Try another search"/></form></p> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt >index e5f82c5..2946b8e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt >@@ -6,26 +6,9 @@ > [% INCLUDE 'datatables.inc' %] > <script type="text/javascript"> > //<![CDATA[ >-function Import(GetThisOne,biblionumber) { >- opener.document.location="../cataloguing/addbiblio.pl?biblionumber="+biblionumber+"&z3950=1&frameworkcode=[% frameworkcode %]&breedingid="+GetThisOne; >- window.close(); >- return false; >-} >- >-function closemenu(){ >- $(".linktools").hide(); >- $("tr").removeClass("selected"); >-} > > $(document).ready(function(){ >- $("#CheckAll").click(function(){ >- $(".checkboxed").checkCheckboxes(); >- return false; >- }); >- $("#CheckNone").click(function(){ >- $(".checkboxed").unCheckCheckboxes(); >- return false; >- }); >+ > $("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, { > "sDom": 't', > "aoColumnDefs": [ >@@ -51,17 +34,6 @@ $(document).ready(function(){ > $(".linktools",row).show().css("position","absolute").css("top",top).css("left",left); > } > }); >- $("form[name='f']").submit(function(){ >- if ($('input[type=checkbox]').filter(':checked').length == 0) { >- alert(_("Please choose at least one external target")); >- return false; >- } else >- return true; >- }); >- $("#resetZ3950Search").click(function(e) { >- e.preventDefault(); >- $("form[name='f']").find("input[type=text]").val(""); >- }); > $(".previewData").on("click", function(e){ > e.preventDefault(); > var ltitle = $(this).text(); >@@ -76,26 +48,11 @@ $(document).ready(function(){ > }); > > }); >- >-[% IF ( total_pages ) %] >-function validate_goto_page(){ >- var page = $('#goto_page').val(); >- if(isNaN(page)) { >- alert(_("The page entered is not a number.")); >- return false; >- } >- else if(page < 1 || page > [% total_pages %] ) { >- alert(_("The page should be a number between 1 and %s.").format([% total_pages %])); >- return false; >- } >- else { >- return true; >- } >-} >-[% END %] >- >+ var MSG_CHOOSE_Z3950 = _("Please choose at least one external target"); > //]]> > </script> >+[% INCLUDE 'z3950_search.inc' %] >+<script type="text/javascript" src="[% interface %]/[% theme %]/js/z3950_search.js"></script> > <style type="text/css"> > .linktools { background-color:#FFF;border-top:1px solid #DDD; border-left: 1px solid #DDD; border-right: 1px solid #666; border-bottom:1px solid #666;display: none; white-space: nowrap;} > .linktools a { font-size : 85%; text-decoration:none; padding:.3em;;background-color:#FFF; display:block;float:left;border-right:1px solid #DDD;} >@@ -135,13 +92,13 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : > <li><label for="controlnumber">Control no.: </label> <input type="text" id="controlnumber" name="controlnumber" value="" /></li> > <li><label for="dewey">Dewey: </label> <input type="text" id="dewey" name="dewey" value="" /></li> > <li><label for="stdid">Standard ID: </label> <input type="text" id="stdid" name="stdid" value="" /></li> >+ <li><a id="resetZ3950Search" href="#"><i class="fa fa-trash"></i> Clear search form</a></li> > </ol> >- <p><a id="resetZ3950Search" href="#">Clear search form</a></p> > <input type="hidden" name="biblionumber" value="[% biblionumber %]" /> > <input type="hidden" name="frameworkcode" value="[% frameworkcode %]" /> > </div> > <div class="yui-g"> >- <h2>Search targets <span style="display: inline; font-size: 70%; padding-left: 1em;"><span class="checkall"><a id="CheckAll" href="#">Select all</a></span><span class="clearall"><a id="CheckNone" href="#">Clear all</a></span></span></h2> >+ <h2>Search targets <span style="display: inline; font-size: 70%; padding-left: 1em;"><span class="checkall"><a id="CheckAll" href="#"><i class="fa fa-check"></i> Select all</a></span> | <span class="clearall"><a id="CheckNone" href="#"><i class="fa fa-remove"></i> Clear all</a></span></span></h2> > <div id="z3950_search_targets"> > [% FOREACH serverloo IN serverloop %] > <p> >@@ -156,7 +113,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : > [% END %] > </div> > </div> >- <fieldset class="action"><input type="submit" class="submit" value="Search" onclick="cursor :'wait'"/> <a class="cancel close" href="#">Cancel</a></fieldset> >+ <fieldset class="action"><input type="submit" class="submit" value="Search" /> <a class="cancel close" href="#">Cancel</a></fieldset> > </form> > > >@@ -206,7 +163,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : > [% IF ( breeding_loo.breedingid ) %] > > <tr id="row[% breeding_loo.breedingid %]"> >- <td>[% breeding_loo.server %] <div class="linktools"><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" class="previewData">Preview MARC</a> <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&importid=[% breeding_loo.breedingid %]" class="previewData">Preview card</a> <a href="#" onclick="Import([% breeding_loo.breedingid %],[% breeding_loo.biblionumber %]); return false">Import</a><a href="#" onclick="closemenu();return false;" title="Close this menu"> X </a></div> </td> >+ <td>[% breeding_loo.server %] <div class="linktools"><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" class="previewData">Preview MARC</a> <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&importid=[% breeding_loo.breedingid %]" class="previewData">Preview card</a> <a href="#" class="import_record" data-breedingid="[% breeding_loo.breedingid %]" data-biblionumber="[% breeding_loo.biblionumber %]" data-frameworkcode="[% frameworkcode %]">Import</a><a href="#" id="close_menu" title="Close this menu"> X </a></div> </td> > <td>[% breeding_loo.title |html %]</td> > <td>[% breeding_loo.author %]</td> > <td>[% breeding_loo.date %]</td> >@@ -215,7 +172,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : > <td>[% breeding_loo.lccn %]</td> > <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% breeding_loo.breedingid %]" class="previewData">MARC</a></td> > <td><a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&importid=[% breeding_loo.breedingid %]" class="previewData">Card</a></td> >- <td><a href="#" onclick="Import([% breeding_loo.breedingid %],[% breeding_loo.biblionumber %]); return false">Import</a></td> >+ <td><a href="#" class="import_record" data-breedingid="[% breeding_loo.breedingid %]" data-biblionumber="[% breeding_loo.biblionumber %]" data-frameworkcode="[% frameworkcode %]">Import</a></td> > </tr> > [% END %] > [% END %]</tbody> >@@ -253,13 +210,13 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : > [% END %] > > [% IF ( show_prevbutton ) %] >- <input type="button" name="changepage_prev" value="Previous Page" onclick="$('#current_page').val([% current_page %]-1);$('#page_form').submit();" /> >+ <input type="button" name="changepage_prev" value="Previous page" data-currentpage="[% current_page %]" /> > [% END %] > Page [% current_page %] / [% total_pages %] > [% IF ( show_nextbutton ) %] >- <input type="button" name="changepage_next" value="Next Page" onclick="$('#current_page').val([% current_page %]+1);$('#page_form').submit();" /> >+ <input type="button" name="changepage_next" value="Next page" data-currentpage="[% current_page %]" /> > [% END %] >- <br />Go to page : <input id="goto_page" name="goto_page" value="[% current_page %]" size="4" /><input type="submit" name="changepage_goto" onclick="return validate_goto_page();" value="Go" /> >+ <br />Go to page : <input id="goto_page" name="goto_page" value="[% current_page %]" size="4" /><input type="submit" name="changepage_goto" value="Go" /> > </form> > > [% ELSE %] >diff --git a/koha-tmpl/intranet-tmpl/prog/js/z3950_search.js b/koha-tmpl/intranet-tmpl/prog/js/z3950_search.js >new file mode 100644 >index 0000000..c221c02 >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/js/z3950_search.js >@@ -0,0 +1,75 @@ >+//z3950_search.js for Authorities, Bib records and Acquisitions module >+function Import(Breeding, recordid, AuthType, FrameworkCode) { >+ >+ if ( AuthType == false ) { >+ opener.document.location="../cataloguing/addbiblio.pl?biblionumber="+recordid+"&z3950=1&frameworkcode="+FrameworkCode+"&breedingid="+Breeding; >+ } else { >+ opener.document.location="../authorities/authorities.pl?breedingid="+Breeding+"&authtypecode="+AuthType+"&authid="+recordid; >+ } >+ window.close(); >+ return false; >+ >+} >+ >+$( document ).ready( function() { >+ >+ $( "#CheckAll" ).click( function() { >+ $( ".checkboxed" ).checkCheckboxes(); >+ return false; >+ }); >+ $( "#CheckNone" ).click( function() { >+ $( ".checkboxed" ).unCheckCheckboxes(); >+ return false; >+ }); >+ $( "#close_menu" ).on( "click", function(e) { >+ e.preventDefault(); >+ $( ".linktools" ).hide(); >+ $( "tr" ).removeClass( "selected" ); >+ return false; >+ }); >+ $( ".submit" ).on( "click", function() { >+ $( "body" ).css( "cursor", "wait" ); >+ }); >+ $( "[name='changepage_prev']" ).on( "click", function() { >+ var data_current_page_prev = $( this ).data( "currentpage" ); >+ $( '#current_page' ).val( data_current_page_prev - 1 ); >+ $( '#page_form' ).submit(); >+ }); >+ $( "[name='changepage_next']" ).on( "click", function() { >+ var data_current_page_next = $( this ).data( "currentpage" ); >+ $( '#current_page' ).val( data_current_page_next + 1 ); >+ $( '#page_form' ).submit(); >+ }); >+ $( "[name='changepage_goto']" ).on( "click", function() { >+ return validate_goto_page(); >+ }); >+ $( "#resetZ3950Search" ).click( function(e) { >+ e.preventDefault(); >+ $( "form[name='f']" ).find( "input[type=text]" ).val( "" ); >+ }); >+ $( "form[name='f']" ).submit( function() { >+ if ( $( 'input[type=checkbox]' ).filter( ':checked' ).length == 0 ) { >+ alert( MSG_CHOOSE_Z3950 ); >+ $( "body" ).css( "cursor", "default" ); >+ return false; >+ } else { >+ return true; >+ } >+ }); >+ $( ".import_record" ).on( "click", function(e) { >+ e.preventDefault(); >+ var data_breedingid = $( this ).data( "breedingid" ); >+ var data_headingcode = $( this ).data( "heading_code" ); >+ var data_authid = $( this ).data( "authid" ); >+ var data_biblionumber = $( this ).data( "biblionumber" ); >+ var data_frameworkcode = $( this ).data( "frameworkcode" ); >+ if ( data_headingcode == undefined ) { >+ Import( data_breedingid, data_biblionumber, false , data_frameworkcode ); >+ } else { >+ Import( data_breedingid, data_authid, data_headingcode ); >+ } >+ return false; >+ }); >+ >+}); >+ >-- >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 16812
:
52868
|
52871
|
52872
|
52873
|
52885
|
52886
|
53005
|
53006
|
53308
|
53348