Bug 19329 - IntranetSlipPrinterJS label is obsoleted
Summary: IntranetSlipPrinterJS label is obsoleted
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low major
Assignee: Josef Moravec
QA Contact: Julian Maurice
URL:
Keywords:
Depends on: 17014
Blocks:
  Show dependency treegraph
 
Reported: 2017-09-16 07:55 UTC by Josef Moravec
Modified: 2019-06-27 09:24 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: String patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 19329: Fix slip printing when IntranetSlipPrinterJS defined (1.12 KB, patch)
2017-09-16 08:14 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 19329: Update IntranetSlipPrinterJS system preference description. (2.02 KB, patch)
2017-09-19 07:16 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 19329: Update IntranetSlipPrinterJS system preference description. (2.15 KB, patch)
2017-09-19 08:04 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 19329: Update IntranetSlipPrinterJS system preference description. (2.22 KB, patch)
2017-09-29 09:39 UTC, Julian Maurice
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Josef Moravec 2017-09-16 07:55:39 UTC

    
Comment 1 Josef Moravec 2017-09-16 08:14:20 UTC
Created attachment 67172 [details] [review]
Bug 19329: Fix slip printing when IntranetSlipPrinterJS defined

Test plan:
1) Set IntranetSlipPrinterJS according to documentation (= define
function printThenClose)
2) Go to circulation and try to print some slip
=> without patch the printThenClose function is not executed
=> with patch it is executed as it should
Comment 2 Owen Leonard 2017-09-18 15:49:59 UTC
The manual refers to the wiki, which includes this instruction:

"Important: The script must implement the function $( window ).load(function()
because it replaces the original function)."

The example on that wiki page includes a try-catch example which includes "window.print()" and "window.close()."

Isn't this patch going to create conflicts for libraries with existing IntranetSlipPrinterJS setups?
Comment 3 Josef Moravec 2017-09-19 05:42:13 UTC
(In reply to Owen Leonard from comment #2)
> The manual refers to the wiki, which includes this instruction:
> 
> "Important: The script must implement the function $( window
> ).load(function()
> because it replaces the original function)."
> 
> The example on that wiki page includes a try-catch example which includes
> "window.print()" and "window.close()."
> 
> Isn't this patch going to create conflicts for libraries with existing
> IntranetSlipPrinterJS setups?

In that case, yes it would be conflict. Then we need to document it better in UI, because the text by the system preference '' says:

'Use the following JavaScript for printing slips. Define at least function printThenClose().'

Which is what does not work.

I will rework the patch to just change this sentence. Thanks Owen.
Comment 4 Josef Moravec 2017-09-19 07:16:58 UTC
Created attachment 67197 [details] [review]
Bug 19329: Update IntranetSlipPrinterJS system preference description.

Test plan:
0) Apply the patch
1) Go to administration -> system preferences -> staff client
2) Read the description by IntranetSlipPrinterJS and confirm it's right
Comment 5 Marc Véron 2017-09-19 08:04:51 UTC
Created attachment 67199 [details] [review]
Bug 19329: Update IntranetSlipPrinterJS system preference description.

Test plan:
0) Apply the patch
1) Go to administration -> system preferences -> staff client
2) Read the description by IntranetSlipPrinterJS and confirm it's right

Signed-off-by: Marc Véron <veron@veron.ch>
Comment 6 Julian Maurice 2017-09-29 09:39:19 UTC
Created attachment 67435 [details] [review]
Bug 19329: Update IntranetSlipPrinterJS system preference description.

Test plan:
0) Apply the patch
1) Go to administration -> system preferences -> staff client
2) Read the description by IntranetSlipPrinterJS and confirm it's right

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Comment 7 Jonathan Druart 2017-09-29 15:48:45 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 8 Fridolin Somers 2017-10-25 08:08:32 UTC
Pushed to 17.05.x, will be in 17.05.06.
Comment 9 Katrin Fischer 2017-10-29 18:11:59 UTC
Depends on bug 17014 which is not in 16.11.x, skipping.