Bugzilla – Attachment 81461 Details for
Bug 15516
Allow to place a hold on first available item from a group of titles
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15516: (follow-up) Fix modal for hold group
Bug-15516-follow-up-Fix-modal-for-hold-group.patch (text/plain), 8.12 KB, created by
Josef Moravec
on 2018-10-29 07:42:33 UTC
(
hide
)
Description:
Bug 15516: (follow-up) Fix modal for hold group
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2018-10-29 07:42:33 UTC
Size:
8.12 KB
patch
obsolete
>From 7b9ea37554f5b439ed9347e5961cc1456b960888 Mon Sep 17 00:00:00 2001 >From: Josef Moravec <josef.moravec@gmail.com> >Date: Fri, 21 Sep 2018 11:17:41 +0000 >Subject: [PATCH] Bug 15516: (follow-up) Fix modal for hold group > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >--- > .../prog/en/includes/hold-group-modal.inc | 36 ++++++++-------------- > .../prog/en/modules/circ/circulation.tt | 4 ++- > .../prog/en/modules/circ/pendingreserves.tt | 5 +-- > .../prog/en/modules/members/moremember.tt | 4 ++- > .../prog/en/modules/reserve/request.tt | 7 +++-- > koha-tmpl/intranet-tmpl/prog/js/hold-group.js | 12 ++++++++ > 6 files changed, 38 insertions(+), 30 deletions(-) > create mode 100644 koha-tmpl/intranet-tmpl/prog/js/hold-group.js > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/hold-group-modal.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/hold-group-modal.inc >index 77ec0e6..628760a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/hold-group-modal.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/hold-group-modal.inc >@@ -1,27 +1,17 @@ >-<div id="hold-group-modal" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="hold-group-modal-label" aria-hidden="true"> >- <div class="modal-header"> >+<div id="hold-group-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="hold-group-modal-label" aria-hidden="true"> >+ <div class="modal-dialog" role="document"> >+ <div class="modal-content"> >+ <div class="modal-header"> > <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">Ã</button> > <h3 id="hold-group-modal-label">Reserve group</h3> >- </div> >- <div class="modal-body"> >+ </div> >+ <div class="modal-body"> > <div id="loading"> <img src="[% interface %]/[% theme %]/img/loading-small.gif" alt="" /> Loading </div> >- </div> >- <div class="modal-footer"> >- <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button> >- </div> >-</div> >+ </div> >+ <div class="modal-footer"> >+ <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button> >+ </div> >+ </div><!-- /.modal-content --> >+ </div><!-- /.modal-dialog --> >+</div><!-- /.modal --> > >-<script> >- $(document).ready(function() { >- $('body').on('click', 'a.hold-group', function() { >- var href = $(this).attr('href'); >- $('#hold-group-modal .modal-body').load(href + " #main"); >- $('#hold-group-modal').modal('show'); >- return false; >- }) >- >- $('#hold-group-modal').on('hidden', function(){ >- $('#hold-group-modal .modal-body').html('<div id="loading"><img src="[% interface %]/[% theme %]/img/loading-small.gif" alt="" /> ' + _("Loading") + '</div>'); >- }); >- }); >-</script> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index 65dcdbd..5e0717c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -973,6 +973,8 @@ No patron matched <span class="ex">[% message | html %]</span> > </div> > </div> > >+[% INCLUDE 'hold-group-modal.inc' %] >+ > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'strings.inc' %] > [% INCLUDE 'calendar.inc' %] >@@ -986,6 +988,7 @@ No patron matched <span class="ex">[% message | html %]</span> > [% Asset.js("js/checkouts.js") | $raw %] > [% Asset.js("js/holds.js") | $raw %] > [% Asset.js("js/circ-patron-search-results.js") | $raw %] >+ [% Asset.js("js/hold-group.js") | $raw %] > <script type="text/javascript"> > /* Set some variable needed in circulation.js */ > var MSG_DT_LOADING_RECORDS = _("Loading... you may continue scanning."); >@@ -1101,5 +1104,4 @@ No patron matched <span class="ex">[% message | html %]</span> > [% Asset.js("js/members-menu.js") | $raw %] > [% END %] > >-[% INCLUDE 'reserve-group-modal.inc' %] > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >index b18b7a9..76186da 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >@@ -201,10 +201,13 @@ > </div> > </div> > >+[% INCLUDE 'hold-group-modal.inc' %] >+ > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'calendar.inc' %] > [% INCLUDE 'datatables.inc' %] > [% INCLUDE 'columns_settings.inc' %] >+ [% Asset.js("js/hold-group.js") | $raw %] > <script type="text/javascript"> > $(document).ready(function() { > var columns_settings = [% ColumnsSettings.GetColumns('circ', 'holds', 'holds-to-pull', 'json') | $raw %]; >@@ -265,6 +268,4 @@ > </script> > [% END %] > >-[%# TODO: this module needs to be separated to html and js part to be included correctly %] >-[% INCLUDE 'hold-group-modal.inc' %] > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >index afe9a91..c178c44 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >@@ -791,6 +791,8 @@ > </div> > </div> [% # /div#bd %] > >+[% INCLUDE 'hold-group-modal.inc' %] >+ > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'datatables.inc' %] > [% INCLUDE 'columns_settings.inc' %] >@@ -806,6 +808,7 @@ > [% INCLUDE 'str/members-menu.inc' %] > [% Asset.js("js/members-menu.js") | $raw %] > [% Asset.js("js/messaging-preference-form.js") | $raw %] >+ [% Asset.js("js/hold-group.js") | $raw %] > <script> > /* Set some variable needed in circulation.js */ > var interface = "[% interface | html %]"; >@@ -929,5 +932,4 @@ > </script> > [% END %] > >-[% INCLUDE 'hold-group-modal.inc' %] > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >index 8488e41..00266eb 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >@@ -536,7 +536,7 @@ > [% IF ( biblioloo.reserveloop ) %] > [% IF ( multi_hold ) %] > <h3> >- <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.biblionumber | uri %]"> >+ <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblioloo.biblionumber | uri %]"> > [% biblioloo.title | html %] > </a> > </h3> >@@ -659,10 +659,13 @@ > </div> > </div> > >+[% INCLUDE 'hold-group-modal.inc' %] >+ > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'datatables.inc' %] > [% INCLUDE 'calendar.inc' %] > [% Asset.js("js/circ-patron-search-results.js") | $raw %] >+ [% Asset.js("js/hold-group.js") | $raw %] > <script> > var MSG_CONFIRM_DELETE_HOLD = _("Are you sure you want to cancel this hold?"); > var patron_homebranch = "[% Branches.GetName( patron.branchcode ) |replace("'", "\'") |replace('"', '\"') |replace('\n', '\\n') |replace('\r', '\\r') | html %]"; >@@ -876,6 +879,4 @@ > </script> > [% END %] > >-[% INCLUDE 'hold-group-modal.inc' %] >- > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/js/hold-group.js b/koha-tmpl/intranet-tmpl/prog/js/hold-group.js >new file mode 100644 >index 0000000..ca96128 >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/js/hold-group.js >@@ -0,0 +1,12 @@ >+$(document).ready(function() { >+ $('body').on('click', 'a.hold-group', function() { >+ var href = $(this).attr('href'); >+ $('#hold-group-modal .modal-body').load(href + " #main"); >+ $('#hold-group-modal').modal('show'); >+ return false; >+ }); >+ >+ $('#hold-group-modal').on('hidden', function(){ >+ $('#hold-group-modal .modal-body').html('<div id="loading"><img src="[% interface %]/[% theme %]/img/loading-small.gif" alt="" /> ' + _("Loading") + '</div>'); >+ }); >+}); >-- >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 15516
:
46392
|
47498
|
47570
|
47961
|
47962
|
47963
|
48097
|
48098
|
48448
|
48449
|
50094
|
50095
|
50096
|
53742
|
53743
|
53744
|
53770
|
53771
|
53772
|
53774
|
53775
|
53776
|
54977
|
55300
|
55304
|
55305
|
55306
|
55307
|
55308
|
55768
|
55769
|
55770
|
55771
|
55772
|
58799
|
58800
|
58801
|
58802
|
58803
|
59314
|
59315
|
59316
|
59317
|
59318
|
69902
|
69903
|
69904
|
69905
|
69906
|
72485
|
72486
|
72487
|
72488
|
72489
|
72491
|
79077
|
79078
|
79080
|
79081
|
79082
|
79083
|
79213
|
79214
|
79215
|
79216
|
79217
|
79218
|
79219
|
79220
|
79221
|
79222
|
81453
|
81454
|
81455
|
81456
|
81457
|
81458
|
81459
|
81460
|
81461
|
81462
|
81463
|
84554
|
84555
|
84556
|
84557
|
84558
|
84559
|
84560
|
84561
|
84562
|
84563
|
84564
|
87828
|
87829
|
87830
|
87831
|
87832
|
87833
|
87834
|
87835
|
87836
|
87837
|
87838
|
88038
|
88039
|
88125
|
88173
|
88174
|
88175
|
88176
|
88177
|
88178
|
88179
|
88180
|
88181
|
88182
|
88183
|
88184
|
88185
|
88186
|
90289
|
90290
|
90291
|
90292
|
90293
|
90294
|
90295
|
90296
|
90297
|
90298
|
90299
|
90300
|
90301
|
90302
|
90303
|
90829
|
90830
|
90831
|
90832
|
90833
|
90834
|
90835
|
90836
|
90837
|
90838
|
90839
|
90840
|
90841
|
90842
|
90843
|
90844
|
92783
|
92784
|
92785
|
92786
|
92787
|
92788
|
92789
|
92790
|
92791
|
92792
|
92793
|
92794
|
92795
|
92796
|
92797
|
92798
|
114513
|
114514
|
114515
|
114516
|
114517
|
114518
|
114585
|
114586
|
114603
|
114624
|
114625
|
114626
|
114627
|
114628
|
114629
|
114630
|
114631
|
114632
|
114633
|
114634
|
114635
|
114636
|
114637
|
114638
|
114639
|
114640
|
114641
|
114642
|
114643
|
114644
|
114645
|
114647
|
114648
|
114649
|
114650
|
114651
|
114652
|
114653
|
114654
|
114655
|
114656
|
114657
|
114658
|
114659
|
117423
|
117424
|
117425
|
117426
|
118281
|
118282
|
118283
|
118284
|
118285
|
118286
|
118350
|
118351
|
118352
|
118353
|
118354
|
118355
|
120368
|
120369
|
120370
|
120371
|
120372
|
120373
|
120574
|
120643
|
120644
|
120645
|
120646
|
120647
|
120648
|
120649
|
120650
|
120651
|
121523
|
121623
|
122097
|
122102
|
122627
|
128189
|
128190
|
128191
|
128192
|
128193
|
128194
|
128195
|
128196
|
128197
|
128198
|
128199
|
128200
|
128201
|
128202
|
128255
|
128256
|
128257
|
128258
|
128259
|
128260
|
128261
|
128262
|
128263
|
128264
|
128265
|
128266
|
128267
|
128268
|
128269
|
128285
|
128286
|
128287
|
128288
|
128289
|
128290
|
128291
|
128292
|
128293
|
128294
|
128295
|
128296
|
128297
|
128298
|
128299
|
138576
|
138577
|
138578
|
138579
|
138580
|
138581
|
138582
|
138583
|
138584
|
138585
|
138586
|
138587
|
138588
|
138589
|
138593
|
138594
|
138595
|
138596
|
138597
|
138738
|
138739
|
138740
|
138741
|
138742
|
138772
|
138868
|
138869
|
162076
|
162077
|
162078
|
162079
|
162080
|
162081
|
162082
|
162083
|
162084