Rytmik Loyalty Bundle Crack Ms Office
var uniqueCodes = []; function generateUniqueCodes() { var list = $('#codes-list'); list.empty(); var amount = $('#amount').val(); var length = $('#length').val(); var template = { length: length || 8, count: amount || 100 }; var amount = $('#amount').val(); var length = $('#length').val(); if (!$('#advanced-options').hasClass('hidden')) { var charset = $('#charset').val(); var prefix = $('#prefix').val(); var postfix = $('#postfix').val(); var pattern = $('#pattern').val(); if (!!charset) template.charset = charset || '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; if (!!prefix) template.prefix = prefix || '; if (!!postfix) template.postfix = postfix || '; if (!!pattern) template.pattern = pattern || '########'; } uniqueCodes = voucher_codes.generate(template); } function showDownloadBUttons() { $('.btn-ex').addClass('block'); $('.btn-pdf1').addClass('block'); } function generateExcellTable() { var result = $('#codes-list'); result.addClass('result-show-field'); result.focus(); var list = $('#codes-list'); list.empty(); uniqueCodes.forEach(function(c) { list.append($('<tr>').append($('<td>').text(c))); }); if (uniqueCodes.length 0) { result.css('border', 'none'); } } function generatePDFTable() { var line; var list = $('#table'); list.empty(); uniqueCodes.forEach(function(c, i, a) { if (i % 2 0) { line = $('<tr>'); list.append(line); } line.append($('<td>').append(c)); }); var doc = new jsPDF('p', 'pt'); doc.autoTable({ html: '#table', styles: { overflow: 'linebreak', fontStyle: 'Lato', fontSize: 22, valign: 'middle', halign: 'center', cellWidth: 'wrap', rowPageBreak: 'auto', showHead: 'never', lineColor: [0, 0, 0], textColor: [0, 0, 0], fillColor: [255, 255, 255], lineWidth: 1 }, margin: { left: 0, right: 0, top: 0, bottom: 0 }, columnStyles: { 0: { cellWidth: 297.5, minCellHeight: 210.5 }, 1: { cellWidth: 297.5, minCellHeight: 210.5 } }, bodyStyles: { lineColor: [0, 0, 0], textColor: [0, 0, 0], fillColor: [255, 255, 255], lineWidth: 1 }, alternateRowStyles: { lineColor: [0, 0, 0], textColor: [0, 0, 0], fillColor: [255, 255, 255], lineWidth: 1 } }); doc.save('voucherify.pdf'); } $('#advanced-button').on('click', function() { $('#advanced-options').toggleClass('hidden'); }); $('.btn-ex').addClass('hidden'); $('.btn-pdf1').addClass('hidden'); $('#generate').on('click', function() { generateUniqueCodes(); generateExcellTable(); showDownloadBUttons(); cleanUpAdvancedOptions(); }); function cleanUpAdvancedOptions() { $('#charset').val( '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' ); $('#prefix').val('); $('#postfix').val('); $('#pattern').val('); $('#advanced-options').removeClass('hidden'); $('#form').focus(); } $('#template1').on('click', function() { cleanUpAdvancedOptions(); $('#length').val(8); $('#charset').val( '23456789abcdefghjkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ' ); }); $('#template2').on('click', function() { cleanUpAdvancedOptions(); $('#length').val(6); $('#charset').val('ABCDEFGHIJKLMNOPQRSTUVWXYZ'); }); $('#template3').on('click', function() { cleanUpAdvancedOptions(); $('#pattern').val('####-####-####-####'); $('#charset').val('0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'); }); $('#template4').on('click', function() { cleanUpAdvancedOptions(); $('#length').val(16); $('#charset').val( '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()_+=-{}[];'|:,./<>?`~' ); }); $('#template5').on('click', function() { cleanUpAdvancedOptions(); $('#length').val(5); $('#prefix').val('EUR-'); $('#postfix').val('-2021'); $('#charset').val('ABCDEFGHIJKLMNOPQRSTUVWXYZ'); }); $('#template6').on('click', function() { cleanUpAdvancedOptions(); $('#pattern').val('FR##_SH#PP#NG_N#W'); $('#charset').val('0123456789'); }); var tableToExcel = (function() { var uri = 'data:application/vnd.ms-excel;base64,', template = '<html xmlns:o='urn:schemas-microsoft-com:office:office' xmlns:x='urn:schemas-microsoft-com:office:excel' xmlns='http://www.w3.org/TR/REC-html40'><head></head><table>{table}</table>