From 60bc9d708d1798def0c027e4d9d3d384cf31e457 Mon Sep 17 00:00:00 2001 From: Samuel Rouse Date: Mon, 16 Jan 2017 18:58:36 -0500 Subject: [PATCH] 1.8.0 - Added "footers" @RomainGehrig suggested this in PR#50. That PR has conflicts, but we are implementing the change. Just as the header is not a true page header, this is not a true page footer, but it is a convenient way to append content to your print area. --- changelog.txt | 6 +++++- package.json | 2 +- printThis.jquery.json | 2 +- printThis.js | 7 ++++++- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/changelog.txt b/changelog.txt index 3cce6e9..1d2b1ca 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,8 @@ -10/15/2017 Added quoting around values to correct behavior of complex values +01/16/2017 Added footer as proposed in 2015 by @RomainGehrig + Bumped version to 1.8.0 for new feature + Corrected 1.7.1 changelog date to 01/15/2017 + +01/15/2017 Added quoting around values to correct behavior of complex values Bumped to 1.7.1 12/14/2016 Added support for arbitrary BASE urls. diff --git a/package.json b/package.json index 5a39928..bb0da09 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "print-this", - "version": "1.7.1", + "version": "1.8.0", "description": "Printing plug-in for jQuery", "main": "printThis.js", "dependencies": { diff --git a/printThis.jquery.json b/printThis.jquery.json index 00bbbac..c83f0dd 100644 --- a/printThis.jquery.json +++ b/printThis.jquery.json @@ -1,6 +1,6 @@ { "name": "printThis", - "version": "1.7.1", + "version": "1.8.0", "title": "printThis", "description": "Printing plug-in for jQuery. Print specific page elements, add print options, maintain or add new styling using jQuery.", "author": { diff --git a/printThis.js b/printThis.js index 0132ceb..056797e 100644 --- a/printThis.js +++ b/printThis.js @@ -1,5 +1,5 @@ /* - * printThis v1.7.1 + * printThis v1.8.0 * @desc Printing plug-in for jQuery * @author Jason Day * @@ -25,6 +25,7 @@ * removeInline: false, * remove all inline styles from print elements * printDelay: 333, * variable print delay * header: null, * prefix to html + * footer: null, * postfix to html * base: false, * preserve the BASE tag, or accept a string for the URL * formValues: true * preserve input/form values * }); @@ -206,6 +207,9 @@ } } + // print "footer" + if (opt.footer) $body.append(opt.footer); + setTimeout(function() { if ($iframe.hasClass("MSIE")) { // check if the iframe was created with the ugly hack @@ -246,6 +250,7 @@ removeInline: false, // remove all inline styles printDelay: 333, // variable print delay header: null, // prefix to html + footer: null, // postfix to html formValues: true, // preserve input/form values base: false, // preserve the BASE tag, or accept a string for the URL doctypeString: '' // html doctype