Sha256: 4cb27769cfd3b4b509900cec02ca1329672482be97c931931e5dd4049130615f

Contents?: true

Size: 621 Bytes

Versions: 1

Compression:

Stored size: 621 Bytes

Contents

//
// When a .print_pdf link is clicked, use its data-target attribute with
// http://printjs.crabbly.com/ to print the PDF. This, without leaving the current page,
// will bring up the print dialog. IE 11/Edge not supported however.
//
$(document).ready(function() {
  $(".print-pdf").on("click", function(e) {
    // No IE/Edge supports smil - for these we revert to the default behaviour of showing
    // the PDF in a new tab and the user must print manually.
    if (Modernizr.smil) {
      var url = $(this).data("target");
      if (url) {
        e.preventDefault();
        printJS(url);
      }
    }
  });
});

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
renalware-core-2.0.0.pre.beta4 app/assets/javascripts/renalware/pdf.js