Bugzilla – Attachment 24579 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 (bootstrap)
Bug-7825-QA-followup---preselection-of-items-boots.patch (text/plain), 3.57 KB, created by
Jonathan Druart
on 2014-01-20 10:39:20 UTC
(
hide
)
Description:
Bug 7825: QA followup - preselection of items (bootstrap)
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-01-20 10:39:20 UTC
Size:
3.57 KB
patch
obsolete
>From 0ad49bcf7750e57e8c4a41641046666c843594c8 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Mon, 20 Jan 2014 11:36:48 +0100 >Subject: [PATCH] Bug 7825: QA followup - preselection of items (bootstrap) > >--- > .../opac-tmpl/bootstrap/en/modules/opac-reserve.tt | 39 +++++++++++--------- > 1 file changed, 21 insertions(+), 18 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >index 0a23339..5e316a7 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >@@ -411,6 +411,11 @@ > 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() { >@@ -429,12 +434,22 @@ > } > }); > >+ $(".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(); > >- [% FOREACH bibitemloo IN bibitemloop %] >- [% IF bibitemloo.holdable %] >- [% IF OPACItemHolds == 'force' %] >+ [% IF OPACItemHolds == 'force' %] >+ [% FOREACH bibitemloo IN bibitemloop %] >+ [% IF bibitemloo.holdable %] >+ $("#toggle-hold-options-[% bibitemloo.biblionumber %]").click(); > $("#copiesrow_[% bibitemloo.biblionumber %]").show(); > [% END %] > [% END %] >@@ -449,10 +464,6 @@ > } > }); > >- $(".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"; } >@@ -504,8 +515,9 @@ > $(".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); >@@ -591,15 +603,6 @@ > 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 %] > [% IF ( bibitemloo.holdable ) %] > // http://jqueryui.com/demos/datepicker/#date-range >-- >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