exportPDF: function () {
var date = new Date();
- var element = document.getElementById('pumacarttable');
+ var element = $('#pumacarttable').get(0);
var options = {
- margin: 5,
+ margin: 15,
filename: this.fluidbook.settings.title + ' - Cart - ' + date.getFullYear() + '-' + date.getMonth() + '-' + date.getDay() + '.pdf',
image: {type: 'jpeg', quality: 0.98},
html2canvas: {dpi: 150, scale: 2, letterRendering: true},
jsPDF: {unit: 'mm', format: 'A4', orientation: 'portrait'}
};
- element.classList.add('print');
+ $(element).addClass('print')
html2pdf().set(options).from(element).save().then(function () {
- source.classList.remove('print');
+ $(element).removeClass('print');
});
+
+ setTimeout(function () {
+ $(element).removeClass('print');
+ }, 2000);
},
exportXLS: function () {
currency: "EUR",
minimumFractionDigits: 2,
maximumFractionDigits: 2
- }) + ' ' + suffix;
+ }) + ' ' + suffix;
},
_endMenu: function (title, content, callback) {