Namespace: printListener

printListener

Printer Handler. Will recognise if CTRL+P is pressed / the menu has been used It is important to use the internal functions to trigger printing or it can not be assured that all pages have been laoded and the report is being printed with all of its content
Source:

Methods

(static) addFormat(name, description, executeFunction)

Add a printing format to the print listener
Parameters:
Name Type Description
name string the name of the listener (can be a translation key)
description string the description of the listener (can be a translation key)
executeFunction function the function to execute when this print format is selected
Source:

(static) afterPrint(e)

Do something after printing is switched back (media query)
Parameters:
Name Type Description
e object the event
Source:

(static) beforePrint(e)

Do something before printing is switched on (media query)
Parameters:
Name Type Description
e object the event
Source:

(static) buildPrint(button, element, isOnline)

Attach the print dialog to a button
Parameters:
Name Type Description
button object to use as base for the print menu
element object to prepend the new button to
isOnline boolean if the browser is online. Otherwise: no need for extra print methods.
Source:

(static) resetPrintingFormats()

Clears the printing formats list and adds the default browser printing.
Source:

(static) showPrint(event)

Show the print dialog if there are more than one handler. If exactly one: execute
Parameters:
Name Type Description
event object the triggered event
Source: