Bugzilla – Attachment 33803 Details for
Bug 13293
Regression: Override renewal limit option broken with AJAX circ
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13293 - Regression: Override renewal limit option broken with AJAX circ
Bug-13293---Regression-Override-renewal-limit-opti.patch (text/plain), 4.05 KB, created by
Frédéric Demians
on 2014-11-22 07:56:35 UTC
(
hide
)
Description:
Bug 13293 - Regression: Override renewal limit option broken with AJAX circ
Filename:
MIME Type:
Creator:
Frédéric Demians
Created:
2014-11-22 07:56:35 UTC
Size:
4.05 KB
patch
obsolete
>From 1e6b0eb857643372d0d7aaa45669e314ec27e911 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 21 Nov 2014 08:13:46 -0500 >Subject: [PATCH] Bug 13293 - Regression: Override renewal limit option broken > with AJAX circ > >The "Override renewal limit" checkbox no longer works to un-hide the >renewal checkboxes in the table of checkouts. I assume this is because >the script works in such a way that it is looking for the checkboxes >before they are part of the document. > >Test Plan: >1) Apply this patch >2) Check the "Override renewal limit" checkbox >3) Note the checkbox now appears > >Note, this change allows the "X of Y renewals remaining" to be displayed >for non-renewable items. I left this as it is for two reasons: 1) it >gives the librarian more information that may be useful, and 2) it looks >nicer and more uniform. > >Signed-off-by: Frederic Demians <f.demians@tamil.fr> > >I confirm the bug and the solution. >--- > koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js | 28 ++++++++++++++----------- > 1 file changed, 16 insertions(+), 12 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js >index 5c18219..a135496 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js >@@ -281,7 +281,7 @@ $(document).ready(function() { > if ( oObj.can_renew ) { > // Do nothing > } else if ( oObj.can_renew_error == "on_reserve" ) { >- content += "<span class='renewals-disabled'>" >+ content += "<span class='renewals-disabled-no-override'>" > + "<a href='/cgi-bin/koha/reserve/request.pl?biblionumber=" + oObj.biblionumber + "'>" + ON_HOLD + "</a>" > + "</span>"; > >@@ -324,18 +324,22 @@ $(document).ready(function() { > span_class = "renewals-allowed"; > } > >- if ( oObj.renewals_remaining && oObj.onsite_checkout == 0 ) { >- content += "<span class='" + span_class + "' style='" + span_style + "'>" >- + "<input type='checkbox' "; >- if ( oObj.date_due_overdue ) { >- content += "checked='checked' "; >- } >- content += "class='renew' id='renew_" + oObj.itemnumber + "' name='renew' value='" + oObj.itemnumber +"'/>" >- + "</span>"; >+ var can_force_renew = ( oObj.onsite_checkout == 0 ) && ( oObj.can_renew_error != "on_reserve" ); >+ var can_renew = ( oObj.renewals_remaining > 0 && !oObj.can_renew_error ); >+ if ( oObj.onsite_checkout == 0 ) { >+ if ( can_renew || can_force_renew ) { >+ content += "<span class='" + span_class + "' style='" + span_style + "'>" >+ + "<input type='checkbox' "; >+ if ( oObj.date_due_overdue && can_renew ) { >+ content += "checked='checked' "; >+ } >+ content += "class='renew' id='renew_" + oObj.itemnumber + "' name='renew' value='" + oObj.itemnumber +"'/>" >+ + "</span>"; > >- content += "<span class='renewals'>(" >- + RENEWALS_REMAINING.format( oObj.renewals_remaining, oObj.renewals_allowed ) >- + ")</span>"; >+ content += "<span class='renewals'>(" >+ + RENEWALS_REMAINING.format( oObj.renewals_remaining, oObj.renewals_allowed ) >+ + ")</span>"; >+ } > } > > content += "</span>"; >-- >2.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 13293
:
33676
|
33787
|
33803
|
33805