=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/util/jquery.jqprint.0.3.js' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/util/jquery.jqprint.0.3.js 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/util/jquery.jqprint.0.3.js 2010-04-26 09:09:48 +0000 @@ -0,0 +1,76 @@ +// ----------------------------------------------------------------------- +// Eros Fratini - eros@recoding.it +// jqprint 0.3 +// +// - 19/06/2009 - some new implementations, added Opera support +// - 11/05/2009 - first sketch +// +// Printing plug-in for jQuery, evolution of jPrintArea: http://plugins.jquery.com/project/jPrintArea +// requires jQuery 1.3.x +// +// Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php +//------------------------------------------------------------------------ + +(function($) { + var opt; + + $.fn.jqprint = function (options) { + opt = $.extend({}, $.fn.jqprint.defaults, options); + + var $element = (this instanceof jQuery) ? this : $(this); + + if (opt.operaSupport && $.browser.opera) + { + var tab = window.open("","jqPrint-preview"); + tab.document.open(); + + var doc = tab.document; + } + else + { + var $iframe = $("