Bugzilla – Attachment 24578 Details for
Bug 7825
Change OPACItemHolds syspref to be of type Choice, choices being "no", "yes", "force"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7825: QA followup - preselection of items
Bug-7825-QA-followup---preselection-of-items.patch (text/plain), 3.63 KB, created by
Jonathan Druart
on 2014-01-20 10:39:11 UTC
(
hide
)
Description:
Bug 7825: QA followup - preselection of items
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-01-20 10:39:11 UTC
Size:
3.63 KB
patch
obsolete
>From 0842cb462dac35ede3aa6ce99151f3c32c781698 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Mon, 20 Jan 2014 11:36:33 +0100 >Subject: [PATCH] Bug 7825: QA followup - preselection of items > >This patch changes the default behavior for the 'force' value. >If the pref is set to force, no item is preselected and the item list is >shown. >--- > .../opac-tmpl/prog/en/modules/opac-reserve.tt | 35 ++++++++++---------- > 1 file changed, 18 insertions(+), 17 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt >index a19e640..1ea64d4 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tt >@@ -31,6 +31,11 @@ function select_first_available(id){ > var copiesRowId = null; > var wasSpecific = false; > var lastCopiesRowId = null; >+ >+ $(".toggle-hold-options").show(); >+ $(".hold-options").hide(); >+ $(".holddatefrom,.holddateto").prop("readOnly", true); >+ > $(".checkitem").parent().click(function(e){ > if(e.target.tagName.toLowerCase() == 'td'){ > $(this).find("input.checkitem").each( function() { >@@ -49,6 +54,15 @@ function select_first_available(id){ > } > }); > >+ $(".toggle-hold-options").on("click",function(e){ >+ e.preventDefault(); >+ toggleLink = $(this); >+ var optionsID = this.id.replace("toggle-hold-options-",""); >+ $("#hold-options-"+optionsID).toggle(0, function() { >+ toggleLink.text($(this).is(':visible') ? _("Hide options") : _("Show more options")); >+ }); >+ }); >+ > // Hides all 'specific copy' table rows on load. > $(".copiesrow").hide(); > >@@ -61,10 +75,6 @@ function select_first_available(id){ > } > }); > >- $(".toggle-hold-options").show(); >- $(".hold-options").hide(); >- $(".holddatefrom,.holddateto").prop("readOnly", true); >- > $(".date-format").each(function(){ > if($(this).hasClass("to")){ var op = "to"; } > if($(this).hasClass("from")){ var op = "from"; } >@@ -117,8 +127,9 @@ function select_first_available(id){ > $(".selectany").attr("checked", "checked"); > [% END %] > >- // If we can choose a specific item, we preselect the first one >- [% IF OPACItemHolds =="1" or OPACItemHolds == 'force' %] >+ // If the user is *allowed* to choose a specific item >+ // The first one is preselected >+ [% IF OPACItemHolds =="1" %] > $("table.copiesrow").each(function(){ > var id = suffixOf($(this).attr("id"), "_"); > select_first_available(id); >@@ -202,17 +213,6 @@ function select_first_available(id){ > $("#biblionumbers").val(biblionumbers); > return true; > }); >- $(".toggle-hold-options").on("click",function(e){ >- e.preventDefault(); >- toggleLink = $(this); >- var optionsID = this.id.replace("toggle-hold-options-",""); >- $("#hold-options-"+optionsID).toggle(0, function() { >- toggleLink.text($(this).is(':visible') ? _("Hide options") : _("Show more options")); >- }); >- }); >- >- >- > > > [% FOREACH bibitemloo IN bibitemloop %] >@@ -485,6 +485,7 @@ function select_first_available(id){ > [% IF OPACItemHolds == 'force' %] > <script type="text/javascript"> > $(document).ready(function() { >+ $("#toggle-hold-options-[% bibitemloo.biblionumber %]").click(); > $("#copiesrow_[% bibitemloo.biblionumber %]").show(); > }); > </script> >-- >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 7825
:
8641
|
8645
|
8646
|
12881
|
12883
|
12884
|
12885
|
12915
|
12920
|
12921
|
12922
|
12923
|
13305
|
13306
|
13307
|
13340
|
13341
|
13350
|
15032
|
15033
|
15034
|
15035
|
15606
|
15607
|
18435
|
18436
|
18878
|
18879
|
18903
|
18904
|
18920
|
18924
|
18925
|
18926
|
18927
|
18928
|
22635
|
22877
|
23631
|
24218
|
24270
|
24271
|
24538
|
24539
|
24540
|
24541
|
24542
|
24578
|
24579
|
24591
|
24592
|
27961
|
27962
|
27963
|
27964
|
27965
|
27966