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
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 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.
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
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>
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>
Pushed to master for 17.11, thanks to everybody involved!
Pushed to 17.05.x, will be in 17.05.06.
Depends on bug 17014 which is not in 16.11.x, skipping.