Bugzilla – Attachment 154740 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.84 KB, created by
Owen Leonard
on 2023-08-24 14:48:12 UTC
(
hide
)
Description:
Bug 34468: Update how we call updateProgress in stage-marc-import.tt
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2023-08-24 14:48:12 UTC
Size:
2.84 KB
patch
obsolete
>From 90c89a34ece91a778c41e54b628127521e4d743f 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> >--- > .../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 be7669afff..8c21fd8e0a 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.30.2
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