Bugzilla – Attachment 116963 Details for
Bug 26633
Add advanced editor for transfer limits
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26633: (QA follow-up) Add error handling for loading transfer limits table
Bug-26633-QA-follow-up-Add-error-handling-for-load.patch (text/plain), 2.61 KB, created by
Katrin Fischer
on 2021-02-17 19:04:42 UTC
(
hide
)
Description:
Bug 26633: (QA follow-up) Add error handling for loading transfer limits table
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2021-02-17 19:04:42 UTC
Size:
2.61 KB
patch
obsolete
>From b6e8e686de968f89b96c08b2a3f322e97bd87cc6 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 16 Nov 2020 12:16:50 -0500 >Subject: [PATCH] Bug 26633: (QA follow-up) Add error handling for loading > transfer limits table > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > .../prog/en/modules/admin/transfer_limits.tt | 33 ++++++++++++++-------- > 1 file changed, 21 insertions(+), 12 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/transfer_limits.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/transfer_limits.tt >index 75a4512333..9b66c30c89 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/transfer_limits.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/transfer_limits.tt >@@ -429,19 +429,28 @@ > if (val) { > $('#loading_limits').show(); > >- $.getJSON(url, function(data) { >- $(".limit-checkboxes").attr("disabled", false); >- $(".limit-checkboxes").attr("checked", true); >- $(".limit-checkboxes").data('limit_id', null); >- >- for (var i = 0; i < data.length; i++) { >- let limit = data[i]; >- let checkbox = $(`#limit-${limit.from_library_id}-${limit.to_library_id}`); >- checkbox.attr('checked', false); >- checkbox.data('limit_id', limit.limit_id); >+ $.ajax({ >+ dataType: "json", >+ url: url, >+ success: function(data) { >+ $(".limit-checkboxes").attr("disabled", false); >+ $(".limit-checkboxes").attr("checked", true); >+ $(".limit-checkboxes").data('limit_id', null); >+ >+ for (var i = 0; i < data.length; i++) { >+ let limit = data[i]; >+ let checkbox = $(`#limit-${limit.from_library_id}-${limit.to_library_id}`); >+ checkbox.attr('checked', false); >+ checkbox.data('limit_id', limit.limit_id); >+ } >+ }, >+ complete: function() { >+ $('#loading_limits').hide(); >+ }, >+ error: function(xhr, status, error) { >+ var errorMessage = xhr.status + ': ' + xhr.statusText >+ alert('Error - ' + errorMessage); > } >- >- $('#loading_limits').hide(); > }); > } > } >-- >2.11.0
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 26633
:
111380
|
111381
|
112327
|
112328
|
112330
|
112437
|
112438
|
112587
|
112778
|
112779
|
112780
|
112781
|
112782
|
112923
|
112924
|
112925
|
112926
|
112927
|
112928
|
112929
|
113053
|
113265
|
113266
|
113267
|
113268
|
113269
|
113270
|
113271
|
113272
|
113273
|
113274
|
113275
|
113676
|
113677
|
113961
|
116612
|
116613
|
116952
|
116953
|
116954
|
116955
|
116956
|
116957
|
116958
|
116959
|
116960
|
116961
|
116962
| 116963 |
116964