Bugzilla – Attachment 157518 Details for
Bug 34468
Add a progress callback to job_progress.js
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34468: Update how we call updateProgress in stage-marc-import.tt
Bug-34468-Update-how-we-call-updateProgress-in-sta.patch (text/plain), 2.91 KB, created by
Martin Renvoize (ashimema)
on 2023-10-20 13:53:52 UTC
(
hide
)
Description:
Bug 34468: Update how we call updateProgress in stage-marc-import.tt
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2023-10-20 13:53:52 UTC
Size:
2.91 KB
patch
obsolete
>From fe02ca92bccd68d0e21e6fd74f69f46e9aa2e0db Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Thu, 3 Aug 2023 10:12:17 +0000 >Subject: [PATCH] Bug 34468: Update how we call updateProgress in > stage-marc-import.tt > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../en/modules/tools/stage-marc-import.tt | 22 ++++++++++--------- > 1 file changed, 12 insertions(+), 10 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt >index be7669afff7..8c21fd8e0aa 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt >@@ -417,16 +417,18 @@ > }) > }); > [% IF job_enqueued %] >- updateProgress([% job_id | html %], function(){ >- $.getJSON('/api/v1/jobs/[% job_id | html %]', function(job){ >- let import_batch_id = job.data.report.import_batch_id; >- $('<p><a href="/cgi-bin/koha/tools/manage-marc-import.pl?import_batch_id=%s">%s</a></p>'.format(import_batch_id, _("View batch"))).appendTo("#job_callback"); >- let basket_id = job.data.report.basket_id; >- let vendor_id = job.data.report.vendor_id; >- if ( basket_id && vendor_id ) { >- $('<p><a id="addtobasket" class="btn btn-default" href="/cgi-bin/koha/acqui/addorderiso2709.pl?import_batch_id=%s&basketno=%s&booksellerid=%s">%s</a></p>'.format(import_batch_id, basket_id, vendor_id, _("Add staged files to basket"))).appendTo("#job_callback"); >- } >- }); >+ updateProgress([% job_id | html %], { >+ finish_callback : function(){ >+ $.getJSON('/api/v1/jobs/[% job_id | html %]', function(job){ >+ let import_batch_id = job.data.report.import_batch_id; >+ $('<p><a href="/cgi-bin/koha/tools/manage-marc-import.pl?import_batch_id=%s">%s</a></p>'.format(import_batch_id, _("View batch"))).appendTo("#job_callback"); >+ let basket_id = job.data.report.basket_id; >+ let vendor_id = job.data.report.vendor_id; >+ if ( basket_id && vendor_id ) { >+ $('<p><a id="addtobasket" class="btn btn-default" href="/cgi-bin/koha/acqui/addorderiso2709.pl?import_batch_id=%s&basketno=%s&booksellerid=%s">%s</a></p>'.format(import_batch_id, basket_id, vendor_id, _("Add staged files to basket"))).appendTo("#job_callback"); >+ } >+ }); >+ } > }); > [% END %] > }); >-- >2.41.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 34468
:
154216
|
154217
|
154739
|
154740
|
157517
| 157518