Bugzilla – Attachment 52868 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: Remove multiple onclick event from z3950_auth_search.tt
Bug-16812-Remove-multiple-onclick-event-from-z3950.patch (text/plain), 4.94 KB, created by
Héctor Eduardo Castro Avalos
on 2016-06-24 21:57:32 UTC
(
hide
)
Description:
Bug 16812: Remove multiple onclick event from z3950_auth_search.tt
Filename:
MIME Type:
Creator:
Héctor Eduardo Castro Avalos
Created:
2016-06-24 21:57:32 UTC
Size:
4.94 KB
patch
obsolete
>From 54a06c61e688d888a196a3b7125a5c48c5b21823 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: Remove multiple onclick event from > z3950_auth_search.tt > >z3950_auth_search.tt has various onclick events used in links. > >This patch propose to triger event via JQuery .on() >Also add Font Awesome Icons to "Select/Clear all" links >--- > .../en/modules/cataloguing/z3950_auth_search.tt | 24 ++++++++++++++++---- > 1 file changed, 20 insertions(+), 4 deletions(-) > >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..db64930 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 >@@ -73,6 +73,22 @@ $(document).ready(function(){ > $("#marcPreviewLabel").html(""); > $("#marcPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/loading-small.gif\" alt=\"\" /> "+_("Loading")+"</div>"); > }); >+ $( ".submit" ).on( "click", function() { >+ $( "body" ).css( "cursor", "wait" ); >+ }); >+ $( ".import_auth_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" ); >+ Import(data_breedingid, data_headingcode, data_authid ); >+ return false; >+ }); >+ $( ".close_menu" ).on( "click", function() { >+ e.preventDefault(); >+ closemenu(); >+ return false; >+ }); > }); > > [% IF ( total_pages ) %] >@@ -144,7 +160,7 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color : > </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 +174,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 +190,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_auth_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_auth_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> >-- >1.7.10.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