WooCommerce PDF Invoices & Packing Slips - Version 2.14.1

Version Description

  • New: Relaunch the Setup Wizard manually from the Status tab
  • Fix: Dynamic wpo_wcpdf_tmp_path_{$type} filter hook name parsing
  • Fix: removing inline preview for media upload
  • UI: Show sticky save button on settings change
  • UI: Fill in the document icon sheet with white
Download this release

Release Info

Developer pomegranate
Plugin Icon 128x128 WooCommerce PDF Invoices & Packing Slips
Version 2.14.1
Comparing to
See all releases

Code changes from version 2.14.0 to 2.14.1

assets/css/settings-styles.css CHANGED
@@ -488,6 +488,55 @@ body.woocommerce_page_wpo_wcpdf_options_page {
488
  color: white !important;
489
  }
490
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
491
  .preview-document .preview-data p {
492
  padding: 1.4em 0;
493
  margin: 0;
488
  color: white !important;
489
  }
490
 
491
+ .preview-document .preview-data-wrapper .save-settings {
492
+ padding: 1em 0 0 0;
493
+ float: right;
494
+ overflow: hidden;
495
+ position: relative;
496
+ }
497
+
498
+ .preview-document .preview-data-wrapper .save-settings p {
499
+ padding: 0;
500
+ margin: 0 0 0 2em;
501
+ position: relative;
502
+ margin-right: -200px;
503
+ transition: margin-right .3s ease-out;
504
+ }
505
+
506
+ .preview-document .preview-data-wrapper .save-settings p:after {
507
+ content: '';
508
+ display: block;
509
+ pointer-events: none;
510
+ position: absolute;
511
+ box-sizing: border-box;
512
+ border-radius: 3px;
513
+ right: 0;
514
+ top: 0;
515
+ background: transparent;
516
+ width: 100%;
517
+ height: 100%;
518
+ z-index: 10;
519
+ border: 0px solid white;
520
+ animation: border-pulse 4s infinite;
521
+
522
+ }
523
+
524
+ @keyframes border-pulse {
525
+ 0% {
526
+ border-color: rgba(255, 255, 255, 0);
527
+ border-width: 8px;
528
+ }
529
+ 50% {
530
+ border-color: rgba(255, 255, 255, 1);
531
+ border-width: 0;
532
+ }
533
+ }
534
+
535
+ .preview-document .preview-data-wrapper .save-settings p input:focus {
536
+ outline-width: 0;
537
+ box-shadow: none;
538
+ }
539
+
540
  .preview-document .preview-data p {
541
  padding: 1.4em 0;
542
  margin: 0;
assets/css/settings-styles.min.css CHANGED
@@ -1 +1 @@
1
- span.wpo-warning{display:inline-block;border:1px solid red;border-left:4px solid red;padding:5px 15px;background-color:#fff}.wcpdf-extensions-ad{position:relative;min-height:90px;border:1px solid #3d5c99;background-color:#ebf5ff;padding:15px;padding-left:100px;margin-top:15px}img.wpo-helper{position:absolute;bottom:0;left:3px}.wcpdf-extensions-ad h3{margin:0}.wcpdf-extensions-ad ul{margin:0;margin-left:1.5em}.wcpdf-extensions li{margin:0}.wcpdf-extensions li ul{list-style-type:square;margin-top:.5em;margin-bottom:.5em}.wcpdf-extensions>li:before{content:"";border-color:transparent transparent transparent #111;border-style:solid;border-width:.35em .35em .35em .45em;display:block;height:0;width:0;left:-1em;top:.9em;position:relative}.wcpdf-extensions li:not(.expanded){cursor:pointer}.wcpdf-extensions .expanded:before{border-color:#111 transparent transparent transparent;left:-1.17em;border-width:.45em .45em .35em .35em!important}.wcpdf-extensions .more{padding:10px;background-color:#fff;border:1px solid #ccc;border-radius:5px}.wcpdf-extensions table td{vertical-align:top}.dropbox-logo{margin-bottom:-10px;margin-right:10px}.cloud-logo{margin-bottom:-10px;margin-top:-5px;margin-right:10px}#img-header_logo{max-height:200px;width:auto;max-width:100%}.multiple-text-input label{min-width:120px;display:inline-block}table.wcpdf_documents_settings_list{width:100%;border-collapse:collapse;border-spacing:0;background-color:#fff;border-top:2px solid #000}table.wcpdf_documents_settings_list tr.odd{background-color:#ebf5ff}table.wcpdf_documents_settings_list td{padding:5px}table.wcpdf_documents_settings_list a{text-decoration:none}table.wcpdf_documents_settings_list td.settings-icon{text-align:right}table.wcpdf_documents_settings_list td.title{font-weight:700}.wcpdf_document_settings_sections{margin-bottom:40px;position:relative}.wcpdf_document_settings_sections>h2{cursor:pointer;padding:1em .8em;margin:0;border:1px solid #eaeaea}.wcpdf_document_settings_sections ul{background:#fff;list-style:none;margin:0;padding:0;width:100%;display:block;height:auto;display:none;box-sizing:border-box;position:absolute;border-left:1px solid #eaeaea;border-right:1px solid #eaeaea;z-index:1000;box-shadow:0 35px 35px -8px rgba(0,0,0,.1);-webkit-box-shadow:0 35px 35px -8px rgba(0,0,0,.1)}.wcpdf_document_settings_sections ul.active{display:block}.wcpdf_document_settings_sections ul li{box-sizing:border-box;padding:0;margin-bottom:0;border-bottom:1px solid #eaeaea;font-size:1.1em}.wcpdf_document_settings_sections ul li:hover{cursor:pointer;background:#51266b;color:#fff}.wcpdf_document_settings_sections ul li:hover a{color:#fff}.wcpdf_document_settings_sections ul li a{color:#000;text-decoration:none;padding:1.2em 1.6em;display:block}.wcpdf_document_settings_sections .arrow-down{font-size:.7em;color:#999;margin-left:8px;font-weight:400;float:right}.wcpdf_document_settings_sections p:hover,.wcpdf_document_settings_sections p:hover>.arrow-down{color:#222}.edit-next-number{opacity:.5}.edit-next-number:hover{opacity:1;cursor:pointer}body.woocommerce_page_wpo_wcpdf_options_page{background:#fff}.wrap [class$=icon32]+h2{font-size:18px;padding:1em}.wrap .notice{margin:15px 0 0}.nav-tab-wrapper a.nav-tab{background:0 0;border:none;border-bottom:3px solid transparent;padding:1em 0;margin:0 1.2em;font-size:15px}.nav-tab-wrapper a.nav-tab.nav-tab-active{border-bottom:3px solid #51266b}#wpo-wcpdf-preview-wrapper{width:100%;height:auto;position:relative;display:flex;align-items:flex-start}#wpo-wcpdf-preview-wrapper .preview-document,#wpo-wcpdf-preview-wrapper .sidebar{transition:.3s ease-in-out}#wpo-wcpdf-preview-wrapper .sidebar{height:auto;padding:4em 0 0 0;box-sizing:border-box;background:0 0;flex:0 0 35%;overflow-x:hidden}#wpo-wcpdf-preview-wrapper .sidebar>form{background:#fff;overflow:visible;padding:0;margin-left:2em;box-sizing:border-box;width:calc(100% - 4em);max-width:50vw}#wpo-wcpdf-preview-wrapper .sidebar>form.editor{max-width:none}#wpo-wcpdf-preview-wrapper .sidebar .form-table,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>th,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>td,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>th{display:block;width:100%;padding:0}#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>th,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>th{padding-bottom:.6em}#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>td{padding-bottom:2.4em}#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td p.description,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>td>p.description{font-size:.85em;padding-top:.7em}#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td>input[type=text],#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td>select,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td>textarea,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>td>input[type=text],#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>td>select,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>td>textarea{max-width:none;width:100%}#wpo-wcpdf-preview-wrapper input[type=text][size]{width:auto!important;max-width:100%!important}#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td>input#next_invoice_number{width:auto!important}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table,#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar .form-table,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar .form-table{display:table}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table tbody,#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar .form-table tbody,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar .form-table tbody{display:table-row-group}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table tbody tr,#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table tr,#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar .form-table tbody tr,#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar .form-table tr,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar .form-table tbody tr,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar .form-table tr{display:table-row}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table>tbody>tr>td,#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table>tbody>tr>th,#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar .form-table>tbody>tr>td,#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar .form-table>tbody>tr>th,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar .form-table>tbody>tr>td,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar .form-table>tbody>tr>th{display:table-cell;padding:15px 10px 15px 0;width:auto}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table>tbody>tr>th,#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar .form-table>tbody>tr>th,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar .form-table>tbody>tr>th{width:300px!important}#wpo-wcpdf-settings .form-table .ui-tabs-nav{padding-left:0!important;margin-left:0!important}#wpo-wcpdf-settings .translations input,#wpo-wcpdf-settings .translations textarea{width:100%}#wpo-wcpdf-settings .wcpdf-attachment-settings-hint{border-left:4px solid #51266b}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar{flex:0 0 100%}#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar{flex:0 0 95%}#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=full] .sidebar{flex:0 0 95%;margin-left:-95%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar{flex:0 0 95%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=sidebar] .sidebar{flex:0 0 35%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=full] .sidebar{margin-left:-35%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-from-preview-state=full] .sidebar{transition-delay:.4s}#wpo-wcpdf-preview-wrapper .preview-document{padding:0;box-sizing:border-box;position:sticky;top:2.4em;flex:0 0 60%}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .preview-document{display:none}#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .preview-document{display:none}#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=full] .preview-document{flex:0 0 95%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .preview-document{flex:0 0 60%;margin-right:-60%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=sidebar] .preview-document{flex:0 0 60%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=full] .preview-document{flex:0 0 95%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-from-preview-state=full] .preview-document{transition-delay:.4s}.preview-document .preview{width:100%;box-sizing:border-box;padding-right:5%}.preview-document .preview>#preview-canvas{display:block;max-width:800px;max-height:85vh;width:auto!important;margin:0 auto;background:#fff;box-shadow:0 0 35px -8px rgba(0,0,0,.12);-webkit-box-shadow:0 0 35px -8px rgba(0,0,0,.12)}#wpo-wcpdf-preview-wrapper[data-preview-states="2"] #preview-canvas{max-height:170vh}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-from-preview-state=sidebar] #preview-canvas{max-height:170vh;transition:max-height .4s ease-in-out .3s}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-from-preview-state=full] #preview-canvas{transition:max-height .4s ease-in-out 0s}.preview-document .preview-data-wrapper{width:100%;height:4em}.preview-document .preview-data-wrapper .preview-document-type,.preview-document .preview-data-wrapper .preview-order-data{float:right}.preview-document .preview-data-wrapper .preview-document-type{margin-right:30px}.preview-document .preview-data-wrapper .preview-document-type ul>li{text-decoration:none;color:initial;padding:1.4em 1.6em}.preview-document .preview-data-wrapper .preview-document-type ul>li:hover{color:#fff!important}.preview-document .preview-data p{padding:1.4em 0;margin:0;color:#666;text-align:right;cursor:pointer;font-weight:lighter;float:right}.preview-document .preview-data p.order-search{display:none}.preview-document .preview-data input{float:right;margin:1em 0 0 1em;padding:.1em .5em;width:20ch;margin-right:-25ch;display:none}.preview-document .preview-data input.active{margin-right:0;display:inline-block}.preview-document .preview-data ul{position:absolute;right:0;top:4em;background:#fff;box-shadow:0 0 25px -10px rgba(0,0,0,.2);-webkit-box-shadow:0 0 25px -10px rgba(0,0,0,.2);list-style:none;margin:0;padding:0;min-width:24em;display:block;height:0;overflow:hidden}.preview-document .preview-data ul.active{height:auto;z-index:1}.preview-document .preview-data ul li{box-sizing:border-box;padding:0;margin-bottom:0;border-bottom:1px solid #eaeaea;font-size:1.1em}.preview-document .preview-data ul li:hover{cursor:pointer;background:#51266b;color:#fff}.preview-document .preview-data ul li a,.preview-document .preview-data.preview-order-data ul li{display:block;padding:1.4em 1.6em}.preview-document .preview-data .arrow-down{font-size:.8em;color:#999;margin-left:8px}.preview-document .preview-data p:hover,.preview-document .preview-data p:hover>.arrow-down{color:#222}.preview-document .preview-data #preview-order-search-results{display:none;position:absolute;right:0;top:4em;width:300px;box-shadow:0 0 25px -10px rgba(0,0,0,.2);-webkit-box-shadow:0 0 25px -10px rgba(0,0,0,.2);padding:20px 0;background-color:#fff}.preview-document .preview-data #preview-order-search-results a{display:block;border-left:1px solid #999;border-right:1px solid #999;border-top:1px solid #999;color:#000;padding:10px;margin:0 20px;text-decoration:none;cursor:pointer}.preview-document .preview-data #preview-order-search-results a:last-child{border-bottom:1px solid #999}.preview-document .preview-data #preview-order-search-results a:hover{background-color:#51266b;color:#fff}.preview-document .preview-data #preview-order-search-results .order-number{font-weight:700}.preview-document .preview-data #preview-order-search-results .date,.preview-document .preview-data #preview-order-search-results .total{margin-top:6px;display:inline-block}.preview-document .preview-data #preview-order-search-results .total{float:right}.preview-document .preview-data #preview-order-search-results .error{margin:0 20px}.preview-document .preview-order-search-wrapper{position:relative;float:right}.preview-document .preview-order-search-wrapper img.preview-order-search-clear{position:absolute;width:30px;height:16px;top:22px;right:6px;display:none;cursor:pointer}#wpo-wcpdf-preview-wrapper .gutter{flex:0 0 5%;position:sticky;top:2.4em;height:170vh}#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .gutter .slide-left,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .gutter .slide-left{float:right}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=sidebar] .gutter .slide-left{border:none}#wpo-wcpdf-preview-wrapper .slider{box-sizing:border-box;padding-top:2.4em;color:#999;font-weight:700;cursor:pointer;font-size:.7em;line-height:1em;width:50%;height:100%;float:left}#wpo-wcpdf-preview-wrapper .slider.slide-left{text-align:right;padding-right:10px;border-right:1px solid #ccc}#wpo-wcpdf-preview-wrapper .slider.slide-right{text-align:left;padding-left:10px;border-left:1px solid #ccc;display:none}#wpo-wcpdf-preview-wrapper .slider:hover{color:#222}#wpo-wcpdf-preview-wrapper .slider.slide-left:after{content:'Preview';position:absolute;right:2em;font-size:1.4em;display:none}#wpo-wcpdf-preview-wrapper .slider.slide-right:after{content:'Settings';position:absolute;left:2em;font-size:1.4em;display:none}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .gutter{display:none}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=sidebar] .gutter{height:100vh}#wpo-wcpdf-preview-wrapper[data-preview-state=full] .slide-right:after{display:inline-block}#wpo-wcpdf-preview-wrapper[data-preview-state=closed] .slide-left:after{display:inline-block}#wpo-wcpdf-preview-wrapper.static .gutter,#wpo-wcpdf-preview-wrapper.static .preview-document{position:static!important}#wpo-wcpdf-preview-wrapper.static .sidebar{height:170vh!important;overflow:hidden}#wpo-wcpdf-preview-wrapper input.readonly,#wpo-wcpdf-preview-wrapper input[readonly],#wpo-wcpdf-preview-wrapper textarea.readonly,#wpo-wcpdf-preview-wrapper textarea[readonly]{background-color:#f8f8f8}#wpo-wcpdf-preview-wrapper[data-preview-state=sidebar] .select2.select2-container{width:100%!important}@media screen and (min-width:1920px){.preview-document .preview>#preview-canvas{max-width:900px}}@media screen and (max-width:1200px){.preview-document .preview>#preview-canvas{max-width:680px}.nav-tab-wrapper a.nav-tab{padding:1em 2em;margin:0 .5em .5em 0;border:1px solid #ccc;box-sizing:border-box;height:4em}.nav-tab-wrapper a.nav-tab.nav-tab-active{border:3px solid #51266b}}@media screen and (max-width:960px){.preview-document .preview>#preview-canvas{width:80vw!important}#wpo-wcpdf-preview-wrapper .sidebar>form{max-width:100%}#wpo-wcpdf-preview-wrapper[data-preview-state=closed] .select2.select2-container{width:100%!important}#wpo-wcpdf-preview-wrapper .sidebar .form-table,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>th,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>td,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>th{display:block!important}.preview-document .preview-data-wrapper{height:6em}.preview-document .preview-data p{padding:2.2em 0}#wpo-wcpdf-preview-wrapper .slider.slide-left:after,#wpo-wcpdf-preview-wrapper .slider.slide-right:after{top:1.5em;padding:1em;background:#fff;border:1px solid #ccc}#wpo-wcpdf-preview-wrapper .slider.slide-right:after{left:0}#wpo-wcpdf-preview-wrapper .slider.slide-left:after{right:0}}
1
+ span.wpo-warning{display:inline-block;border:1px solid red;border-left:4px solid red;padding:5px 15px;background-color:#fff}.wcpdf-extensions-ad{position:relative;min-height:90px;border:1px solid #3d5c99;background-color:#ebf5ff;padding:15px;padding-left:100px;margin-top:15px}img.wpo-helper{position:absolute;bottom:0;left:3px}.wcpdf-extensions-ad h3{margin:0}.wcpdf-extensions-ad ul{margin:0;margin-left:1.5em}.wcpdf-extensions li{margin:0}.wcpdf-extensions li ul{list-style-type:square;margin-top:.5em;margin-bottom:.5em}.wcpdf-extensions>li:before{content:"";border-color:transparent transparent transparent #111;border-style:solid;border-width:.35em .35em .35em .45em;display:block;height:0;width:0;left:-1em;top:.9em;position:relative}.wcpdf-extensions li:not(.expanded){cursor:pointer}.wcpdf-extensions .expanded:before{border-color:#111 transparent transparent transparent;left:-1.17em;border-width:.45em .45em .35em .35em!important}.wcpdf-extensions .more{padding:10px;background-color:#fff;border:1px solid #ccc;border-radius:5px}.wcpdf-extensions table td{vertical-align:top}.dropbox-logo{margin-bottom:-10px;margin-right:10px}.cloud-logo{margin-bottom:-10px;margin-top:-5px;margin-right:10px}#img-header_logo{max-height:200px;width:auto;max-width:100%}.multiple-text-input label{min-width:120px;display:inline-block}table.wcpdf_documents_settings_list{width:100%;border-collapse:collapse;border-spacing:0;background-color:#fff;border-top:2px solid #000}table.wcpdf_documents_settings_list tr.odd{background-color:#ebf5ff}table.wcpdf_documents_settings_list td{padding:5px}table.wcpdf_documents_settings_list a{text-decoration:none}table.wcpdf_documents_settings_list td.settings-icon{text-align:right}table.wcpdf_documents_settings_list td.title{font-weight:700}.wcpdf_document_settings_sections{margin-bottom:40px;position:relative}.wcpdf_document_settings_sections>h2{cursor:pointer;padding:1em .8em;margin:0;border:1px solid #eaeaea}.wcpdf_document_settings_sections ul{background:#fff;list-style:none;margin:0;padding:0;width:100%;display:block;height:auto;display:none;box-sizing:border-box;position:absolute;border-left:1px solid #eaeaea;border-right:1px solid #eaeaea;z-index:1000;box-shadow:0 35px 35px -8px rgba(0,0,0,.1);-webkit-box-shadow:0 35px 35px -8px rgba(0,0,0,.1)}.wcpdf_document_settings_sections ul.active{display:block}.wcpdf_document_settings_sections ul li{box-sizing:border-box;padding:0;margin-bottom:0;border-bottom:1px solid #eaeaea;font-size:1.1em}.wcpdf_document_settings_sections ul li:hover{cursor:pointer;background:#51266b;color:#fff}.wcpdf_document_settings_sections ul li:hover a{color:#fff}.wcpdf_document_settings_sections ul li a{color:#000;text-decoration:none;padding:1.2em 1.6em;display:block}.wcpdf_document_settings_sections .arrow-down{font-size:.7em;color:#999;margin-left:8px;font-weight:400;float:right}.wcpdf_document_settings_sections p:hover,.wcpdf_document_settings_sections p:hover>.arrow-down{color:#222}.edit-next-number{opacity:.5}.edit-next-number:hover{opacity:1;cursor:pointer}body.woocommerce_page_wpo_wcpdf_options_page{background:#fff}.wrap [class$=icon32]+h2{font-size:18px;padding:1em}.wrap .notice{margin:15px 0 0}.nav-tab-wrapper a.nav-tab{background:0 0;border:none;border-bottom:3px solid transparent;padding:1em 0;margin:0 1.2em;font-size:15px}.nav-tab-wrapper a.nav-tab.nav-tab-active{border-bottom:3px solid #51266b}#wpo-wcpdf-preview-wrapper{width:100%;height:auto;position:relative;display:flex;align-items:flex-start}#wpo-wcpdf-preview-wrapper .preview-document,#wpo-wcpdf-preview-wrapper .sidebar{transition:.3s ease-in-out}#wpo-wcpdf-preview-wrapper .sidebar{height:auto;padding:4em 0 0 0;box-sizing:border-box;background:0 0;flex:0 0 35%;overflow-x:hidden}#wpo-wcpdf-preview-wrapper .sidebar>form{background:#fff;overflow:visible;padding:0;margin-left:2em;box-sizing:border-box;width:calc(100% - 4em);max-width:50vw}#wpo-wcpdf-preview-wrapper .sidebar>form.editor{max-width:none}#wpo-wcpdf-preview-wrapper .sidebar .form-table,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>th,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>td,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>th{display:block;width:100%;padding:0}#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>th,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>th{padding-bottom:.6em}#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>td{padding-bottom:2.4em}#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td p.description,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>td>p.description{font-size:.85em;padding-top:.7em}#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td>input[type=text],#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td>select,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td>textarea,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>td>input[type=text],#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>td>select,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>td>textarea{max-width:none;width:100%}#wpo-wcpdf-preview-wrapper input[type=text][size]{width:auto!important;max-width:100%!important}#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td>input#next_invoice_number{width:auto!important}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table,#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar .form-table,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar .form-table{display:table}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table tbody,#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar .form-table tbody,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar .form-table tbody{display:table-row-group}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table tbody tr,#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table tr,#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar .form-table tbody tr,#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar .form-table tr,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar .form-table tbody tr,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar .form-table tr{display:table-row}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table>tbody>tr>td,#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table>tbody>tr>th,#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar .form-table>tbody>tr>td,#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar .form-table>tbody>tr>th,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar .form-table>tbody>tr>td,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar .form-table>tbody>tr>th{display:table-cell;padding:15px 10px 15px 0;width:auto}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar .form-table>tbody>tr>th,#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar .form-table>tbody>tr>th,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar .form-table>tbody>tr>th{width:300px!important}#wpo-wcpdf-settings .form-table .ui-tabs-nav{padding-left:0!important;margin-left:0!important}#wpo-wcpdf-settings .translations input,#wpo-wcpdf-settings .translations textarea{width:100%}#wpo-wcpdf-settings .wcpdf-attachment-settings-hint{border-left:4px solid #51266b}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .sidebar{flex:0 0 100%}#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .sidebar{flex:0 0 95%}#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=full] .sidebar{flex:0 0 95%;margin-left:-95%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .sidebar{flex:0 0 95%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=sidebar] .sidebar{flex:0 0 35%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=full] .sidebar{margin-left:-35%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-from-preview-state=full] .sidebar{transition-delay:.4s}#wpo-wcpdf-preview-wrapper .preview-document{padding:0;box-sizing:border-box;position:sticky;top:2.4em;flex:0 0 60%}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .preview-document{display:none}#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .preview-document{display:none}#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=full] .preview-document{flex:0 0 95%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .preview-document{flex:0 0 60%;margin-right:-60%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=sidebar] .preview-document{flex:0 0 60%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=full] .preview-document{flex:0 0 95%}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-from-preview-state=full] .preview-document{transition-delay:.4s}.preview-document .preview{width:100%;box-sizing:border-box;padding-right:5%}.preview-document .preview>#preview-canvas{display:block;max-width:800px;max-height:85vh;width:auto!important;margin:0 auto;background:#fff;box-shadow:0 0 35px -8px rgba(0,0,0,.12);-webkit-box-shadow:0 0 35px -8px rgba(0,0,0,.12)}#wpo-wcpdf-preview-wrapper[data-preview-states="2"] #preview-canvas{max-height:170vh}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-from-preview-state=sidebar] #preview-canvas{max-height:170vh;transition:max-height .4s ease-in-out .3s}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-from-preview-state=full] #preview-canvas{transition:max-height .4s ease-in-out 0s}.preview-document .preview-data-wrapper{width:100%;height:4em}.preview-document .preview-data-wrapper .preview-document-type,.preview-document .preview-data-wrapper .preview-order-data{float:right}.preview-document .preview-data-wrapper .preview-document-type{margin-right:30px}.preview-document .preview-data-wrapper .preview-document-type ul>li{text-decoration:none;color:initial;padding:1.4em 1.6em}.preview-document .preview-data-wrapper .preview-document-type ul>li:hover{color:#fff!important}.preview-document .preview-data-wrapper .save-settings{padding:1em 0 0 0;float:right;overflow:hidden;position:relative}.preview-document .preview-data-wrapper .save-settings p{padding:0;margin:0 0 0 2em;position:relative;margin-right:-200px;transition:margin-right .3s ease-out}.preview-document .preview-data-wrapper .save-settings p:after{content:'';display:block;pointer-events:none;position:absolute;box-sizing:border-box;border-radius:3px;right:0;top:0;background:0 0;width:100%;height:100%;z-index:10;border:0 solid #fff;animation:border-pulse 4s infinite}@keyframes border-pulse{0%{border-color:rgba(255,255,255,0);border-width:8px}50%{border-color:#fff;border-width:0}}.preview-document .preview-data-wrapper .save-settings p input:focus{outline-width:0;box-shadow:none}.preview-document .preview-data p{padding:1.4em 0;margin:0;color:#666;text-align:right;cursor:pointer;font-weight:lighter;float:right}.preview-document .preview-data p.order-search{display:none}.preview-document .preview-data input{float:right;margin:1em 0 0 1em;padding:.1em .5em;width:20ch;margin-right:-25ch;display:none}.preview-document .preview-data input.active{margin-right:0;display:inline-block}.preview-document .preview-data ul{position:absolute;right:0;top:4em;background:#fff;box-shadow:0 0 25px -10px rgba(0,0,0,.2);-webkit-box-shadow:0 0 25px -10px rgba(0,0,0,.2);list-style:none;margin:0;padding:0;min-width:24em;display:block;height:0;overflow:hidden}.preview-document .preview-data ul.active{height:auto;z-index:1}.preview-document .preview-data ul li{box-sizing:border-box;padding:0;margin-bottom:0;border-bottom:1px solid #eaeaea;font-size:1.1em}.preview-document .preview-data ul li:hover{cursor:pointer;background:#51266b;color:#fff}.preview-document .preview-data ul li a,.preview-document .preview-data.preview-order-data ul li{display:block;padding:1.4em 1.6em}.preview-document .preview-data .arrow-down{font-size:.8em;color:#999;margin-left:8px}.preview-document .preview-data p:hover,.preview-document .preview-data p:hover>.arrow-down{color:#222}.preview-document .preview-data #preview-order-search-results{display:none;position:absolute;right:0;top:4em;width:300px;box-shadow:0 0 25px -10px rgba(0,0,0,.2);-webkit-box-shadow:0 0 25px -10px rgba(0,0,0,.2);padding:20px 0;background-color:#fff}.preview-document .preview-data #preview-order-search-results a{display:block;border-left:1px solid #999;border-right:1px solid #999;border-top:1px solid #999;color:#000;padding:10px;margin:0 20px;text-decoration:none;cursor:pointer}.preview-document .preview-data #preview-order-search-results a:last-child{border-bottom:1px solid #999}.preview-document .preview-data #preview-order-search-results a:hover{background-color:#51266b;color:#fff}.preview-document .preview-data #preview-order-search-results .order-number{font-weight:700}.preview-document .preview-data #preview-order-search-results .date,.preview-document .preview-data #preview-order-search-results .total{margin-top:6px;display:inline-block}.preview-document .preview-data #preview-order-search-results .total{float:right}.preview-document .preview-data #preview-order-search-results .error{margin:0 20px}.preview-document .preview-order-search-wrapper{position:relative;float:right}.preview-document .preview-order-search-wrapper img.preview-order-search-clear{position:absolute;width:30px;height:16px;top:22px;right:6px;display:none;cursor:pointer}#wpo-wcpdf-preview-wrapper .gutter{flex:0 0 5%;position:sticky;top:2.4em;height:170vh}#wpo-wcpdf-preview-wrapper[data-preview-states="2"][data-preview-state=closed] .gutter .slide-left,#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=closed] .gutter .slide-left{float:right}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=sidebar] .gutter .slide-left{border:none}#wpo-wcpdf-preview-wrapper .slider{box-sizing:border-box;padding-top:2.4em;color:#999;font-weight:700;cursor:pointer;font-size:.7em;line-height:1em;width:50%;height:100%;float:left}#wpo-wcpdf-preview-wrapper .slider.slide-left{text-align:right;padding-right:10px;border-right:1px solid #ccc}#wpo-wcpdf-preview-wrapper .slider.slide-right{text-align:left;padding-left:10px;border-left:1px solid #ccc;display:none}#wpo-wcpdf-preview-wrapper .slider:hover{color:#222}#wpo-wcpdf-preview-wrapper .slider.slide-left:after{content:'Preview';position:absolute;right:2em;font-size:1.4em;display:none}#wpo-wcpdf-preview-wrapper .slider.slide-right:after{content:'Settings';position:absolute;left:2em;font-size:1.4em;display:none}#wpo-wcpdf-preview-wrapper[data-preview-states="1"] .gutter{display:none}#wpo-wcpdf-preview-wrapper[data-preview-states="3"][data-preview-state=sidebar] .gutter{height:100vh}#wpo-wcpdf-preview-wrapper[data-preview-state=full] .slide-right:after{display:inline-block}#wpo-wcpdf-preview-wrapper[data-preview-state=closed] .slide-left:after{display:inline-block}#wpo-wcpdf-preview-wrapper.static .gutter,#wpo-wcpdf-preview-wrapper.static .preview-document{position:static!important}#wpo-wcpdf-preview-wrapper.static .sidebar{height:170vh!important;overflow:hidden}#wpo-wcpdf-preview-wrapper input.readonly,#wpo-wcpdf-preview-wrapper input[readonly],#wpo-wcpdf-preview-wrapper textarea.readonly,#wpo-wcpdf-preview-wrapper textarea[readonly]{background-color:#f8f8f8}#wpo-wcpdf-preview-wrapper[data-preview-state=sidebar] .select2.select2-container{width:100%!important}@media screen and (min-width:1920px){.preview-document .preview>#preview-canvas{max-width:900px}}@media screen and (max-width:1200px){.preview-document .preview>#preview-canvas{max-width:680px}.nav-tab-wrapper a.nav-tab{padding:1em 2em;margin:0 .5em .5em 0;border:1px solid #ccc;box-sizing:border-box;height:4em}.nav-tab-wrapper a.nav-tab.nav-tab-active{border:3px solid #51266b}}@media screen and (max-width:960px){.preview-document .preview>#preview-canvas{width:80vw!important}#wpo-wcpdf-preview-wrapper .sidebar>form{max-width:100%}#wpo-wcpdf-preview-wrapper[data-preview-state=closed] .select2.select2-container{width:100%!important}#wpo-wcpdf-preview-wrapper .sidebar .form-table,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>td,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tbody>tr>th,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>td,#wpo-wcpdf-preview-wrapper .sidebar .form-table>tr>th{display:block!important}.preview-document .preview-data-wrapper{height:6em}.preview-document .preview-data p{padding:2.2em 0}#wpo-wcpdf-preview-wrapper .slider.slide-left:after,#wpo-wcpdf-preview-wrapper .slider.slide-right:after{top:1.5em;padding:1em;background:#fff;border:1px solid #ccc}#wpo-wcpdf-preview-wrapper .slider.slide-right:after{left:0}#wpo-wcpdf-preview-wrapper .slider.slide-left:after{right:0}}
assets/images/invoice.svg CHANGED
@@ -1,5 +1,5 @@
1
  <svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <rect x="4" y="1" width="16" height="20" rx="2" stroke="#6C45A6" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
3
  <path d="M0 4C0 3.44772 0.447715 3 1 3H7.5C8.05228 3 8.5 3.44772 8.5 4V6.5C8.5 7.05228 8.05228 7.5 7.5 7.5H1C0.447715 7.5 0 7.05228 0 6.5V4Z" fill="#ED1C24"/>
4
  <path d="M11.5834 17.16C10.7727 17.16 9.75404 17.0747 8.52738 16.904V15.64C8.57004 15.64 8.76204 15.6773 9.10338 15.752C9.41271 15.816 9.66871 15.864 9.87138 15.896C10.0847 15.9173 10.33 15.9387 10.6074 15.96C10.938 15.992 11.2634 16.008 11.5834 16.008V12.36H11.1194C10.106 12.36 9.38604 12.1573 8.95938 11.752C8.53271 11.3467 8.31938 10.7173 8.31938 9.864V9.192C8.31938 8.424 8.56471 7.848 9.05538 7.464C9.54604 7.08 10.3887 6.856 11.5834 6.792V5.656H12.4954V6.776C13.1567 6.776 14.0154 6.83467 15.0714 6.952V8.088C13.7594 7.94933 12.9007 7.86933 12.4954 7.848V11.208H12.9754C13.69 11.208 14.2447 11.2933 14.6394 11.464C15.0447 11.6347 15.3274 11.896 15.4874 12.248C15.658 12.5893 15.7434 13.0533 15.7434 13.64V14.232C15.7434 15.2027 15.482 15.912 14.9594 16.36C14.4367 16.808 13.6154 17.064 12.4954 17.128V19.24H11.5834V17.16ZM11.5834 7.864C10.9007 7.90667 10.4367 8.024 10.1914 8.216C9.94604 8.408 9.82338 8.71733 9.82338 9.144V10.168C9.82338 10.5307 9.95671 10.7973 10.2234 10.968C10.49 11.128 10.9434 11.208 11.5834 11.208V7.864ZM12.4954 15.976C13.0714 15.944 13.5034 15.8373 13.7914 15.656C14.0794 15.464 14.2234 15.1653 14.2234 14.76V13.576C14.2234 13.128 14.0954 12.8133 13.8394 12.632C13.5834 12.4507 13.1354 12.36 12.4954 12.36V15.976Z" fill="#6C45A6"/>
5
  </svg>
1
  <svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect x="4" y="1" width="16" height="20" rx="2" stroke="#6C45A6" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" fill="white"/>
3
  <path d="M0 4C0 3.44772 0.447715 3 1 3H7.5C8.05228 3 8.5 3.44772 8.5 4V6.5C8.5 7.05228 8.05228 7.5 7.5 7.5H1C0.447715 7.5 0 7.05228 0 6.5V4Z" fill="#ED1C24"/>
4
  <path d="M11.5834 17.16C10.7727 17.16 9.75404 17.0747 8.52738 16.904V15.64C8.57004 15.64 8.76204 15.6773 9.10338 15.752C9.41271 15.816 9.66871 15.864 9.87138 15.896C10.0847 15.9173 10.33 15.9387 10.6074 15.96C10.938 15.992 11.2634 16.008 11.5834 16.008V12.36H11.1194C10.106 12.36 9.38604 12.1573 8.95938 11.752C8.53271 11.3467 8.31938 10.7173 8.31938 9.864V9.192C8.31938 8.424 8.56471 7.848 9.05538 7.464C9.54604 7.08 10.3887 6.856 11.5834 6.792V5.656H12.4954V6.776C13.1567 6.776 14.0154 6.83467 15.0714 6.952V8.088C13.7594 7.94933 12.9007 7.86933 12.4954 7.848V11.208H12.9754C13.69 11.208 14.2447 11.2933 14.6394 11.464C15.0447 11.6347 15.3274 11.896 15.4874 12.248C15.658 12.5893 15.7434 13.0533 15.7434 13.64V14.232C15.7434 15.2027 15.482 15.912 14.9594 16.36C14.4367 16.808 13.6154 17.064 12.4954 17.128V19.24H11.5834V17.16ZM11.5834 7.864C10.9007 7.90667 10.4367 8.024 10.1914 8.216C9.94604 8.408 9.82338 8.71733 9.82338 9.144V10.168C9.82338 10.5307 9.95671 10.7973 10.2234 10.968C10.49 11.128 10.9434 11.208 11.5834 11.208V7.864ZM12.4954 15.976C13.0714 15.944 13.5034 15.8373 13.7914 15.656C14.0794 15.464 14.2234 15.1653 14.2234 14.76V13.576C14.2234 13.128 14.0954 12.8133 13.8394 12.632C13.5834 12.4507 13.1354 12.36 12.4954 12.36V15.976Z" fill="#6C45A6"/>
5
  </svg>
assets/images/packing-slip.svg CHANGED
@@ -1,5 +1,5 @@
1
  <svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <rect x="4" y="1" width="16" height="20" rx="2" stroke="#6C45A6" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
3
  <path d="M0 4C0 3.44772 0.447715 3 1 3H7.5C8.05228 3 8.5 3.44772 8.5 4V6.5C8.5 7.05228 8.05228 7.5 7.5 7.5H1C0.447715 7.5 0 7.05228 0 6.5V4Z" fill="#ED1C24"/>
4
  <path d="M8 9H16" stroke="#6C45A6" stroke-width="1.5"/>
5
  <path d="M8 13H16" stroke="#6C45A6" stroke-width="1.5"/>
1
  <svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect x="4" y="1" width="16" height="20" rx="2" stroke="#6C45A6" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" fill="white"/>
3
  <path d="M0 4C0 3.44772 0.447715 3 1 3H7.5C8.05228 3 8.5 3.44772 8.5 4V6.5C8.5 7.05228 8.05228 7.5 7.5 7.5H1C0.447715 7.5 0 7.05228 0 6.5V4Z" fill="#ED1C24"/>
4
  <path d="M8 9H16" stroke="#6C45A6" stroke-width="1.5"/>
5
  <path d="M8 13H16" stroke="#6C45A6" stroke-width="1.5"/>
assets/js/admin-script.js CHANGED
@@ -93,16 +93,11 @@ jQuery( function( $ ) {
93
  $( window ).on( 'resize', determinePreviewStates );
94
 
95
  function determinePreviewStates() {
96
-
97
- // console.log(previousWindowWidth);
98
- // console.log('Now: ' + $(this).width() );
99
-
100
  // Check if preview states are allowed to change based on screen size
101
  if ( $previewWrapper.attr( 'data-preview-states-lock') == false ) {
102
 
103
  // On small screens: 2 preview states and close preview
104
  if ( $(this).width() <= 1200 && ( previousWindowWidth > 1200 || $(this).width() == previousWindowWidth ) ) {
105
- // console.log('Slide!');
106
  if ( $previewWrapper.attr( 'data-preview-state') == 'full' ) {
107
  $previewWrapper.find( '.preview-document' ).show();
108
  $previewWrapper.find( '.sidebar' ).hide();
@@ -250,43 +245,52 @@ jQuery( function( $ ) {
250
  // Preview on user input
251
  $( document ).on( 'keyup paste', '#wpo-wcpdf-settings input:not([type=checkbox]), #wpo-wcpdf-settings textarea, #wpo-wcpdf-settings select:not(.dropdown-add-field)', function( event ) {
252
  if ( ! settingIsExcludedForPreview( $( this ).attr( 'name' ) ) ) {
253
- let duration = event.type == 'keyup' ? 1000 : 0;
254
- triggerPreview( duration );
255
  }
256
  } );
257
 
258
  // Preview on user selected option (using 'change' event breaks the PDF render)
259
  $( document ).on( 'click', '#wpo-wcpdf-settings select:not(.dropdown-add-field) option', function( event ) {
260
  if ( ! settingIsExcludedForPreview( $( this ).parent().attr( 'name' ) ) ) {
261
- triggerPreview();
262
  }
263
  } );
264
 
265
  // Preview on user checkbox change
266
  $( document ).on( 'change', '#wpo-wcpdf-settings input[type="checkbox"]', function( event ) {
267
  if ( ! settingIsExcludedForPreview( $( this ).attr( 'name' ) ) ) {
268
- triggerPreview( 1000 );
 
 
269
  }
270
  } );
271
 
272
  // Preview on select / radio setting change
273
  $( document ).on( 'change', '#wpo-wcpdf-settings input[type="radio"], #wpo-wcpdf-settings select', function( event ) {
274
  if ( ! settingIsExcludedForPreview( $( this ).attr( 'name' ) ) ) {
275
- triggerPreview();
 
 
276
  }
277
  } );
278
 
279
  // Preview on header logo change
280
  $( document.body ).on( 'wpo-wcpdf-media-upload-setting-updated', function( event, $input ) {
281
- triggerPreview();
282
  } );
283
  $( document ).on( 'click', '.wpo_remove_image_button', function( event ) {
284
- triggerPreview();
285
  } );
286
 
287
- // Custom trigger
288
- $( document ).on( 'wpo_wcpdf_refresh_preview', function( event, duration ) {
289
- triggerPreview( duration );
 
 
 
 
 
290
  } );
291
 
292
  // Preview on user click in search result
@@ -299,8 +303,24 @@ jQuery( function( $ ) {
299
  triggerPreview();
300
  } );
301
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
302
  // Trigger the Preview
303
  function triggerPreview( timeoutDuration ) {
 
 
304
  loadPreviewData();
305
  clearTimeout( previewTimeout );
306
  previewTimeout = setTimeout( function() { ajaxLoadPreview() }, timeoutDuration );
@@ -424,13 +444,9 @@ jQuery( function( $ ) {
424
  // Using DocumentInitParameters object to load binary data.
425
  let loadingTask = pdfjsLib.getDocument( { data: pdfData } );
426
  loadingTask.promise.then( function( pdf ) {
427
- console.log( 'PDF loaded' );
428
-
429
  // Fetch the first page
430
  let pageNumber = 1;
431
  pdf.getPage( pageNumber ).then( function( page ) {
432
- console.log( 'Page loaded' );
433
-
434
  let scale = 2;
435
  let viewport = page.getViewport( { scale: scale } );
436
 
@@ -448,7 +464,7 @@ jQuery( function( $ ) {
448
  };
449
  let renderTask = page.render( renderContext );
450
  renderTask.promise.then( function() {
451
- console.log( 'Page rendered' );
452
  } );
453
  } );
454
  }, function( reason ) {
93
  $( window ).on( 'resize', determinePreviewStates );
94
 
95
  function determinePreviewStates() {
 
 
 
 
96
  // Check if preview states are allowed to change based on screen size
97
  if ( $previewWrapper.attr( 'data-preview-states-lock') == false ) {
98
 
99
  // On small screens: 2 preview states and close preview
100
  if ( $(this).width() <= 1200 && ( previousWindowWidth > 1200 || $(this).width() == previousWindowWidth ) ) {
 
101
  if ( $previewWrapper.attr( 'data-preview-state') == 'full' ) {
102
  $previewWrapper.find( '.preview-document' ).show();
103
  $previewWrapper.find( '.sidebar' ).hide();
245
  // Preview on user input
246
  $( document ).on( 'keyup paste', '#wpo-wcpdf-settings input:not([type=checkbox]), #wpo-wcpdf-settings textarea, #wpo-wcpdf-settings select:not(.dropdown-add-field)', function( event ) {
247
  if ( ! settingIsExcludedForPreview( $( this ).attr( 'name' ) ) ) {
248
+ let previewDelay = event.type == 'keyup' ? 1000 : 0;
249
+ settingsChanged( previewDelay );
250
  }
251
  } );
252
 
253
  // Preview on user selected option (using 'change' event breaks the PDF render)
254
  $( document ).on( 'click', '#wpo-wcpdf-settings select:not(.dropdown-add-field) option', function( event ) {
255
  if ( ! settingIsExcludedForPreview( $( this ).parent().attr( 'name' ) ) ) {
256
+ settingsChanged();
257
  }
258
  } );
259
 
260
  // Preview on user checkbox change
261
  $( document ).on( 'change', '#wpo-wcpdf-settings input[type="checkbox"]', function( event ) {
262
  if ( ! settingIsExcludedForPreview( $( this ).attr( 'name' ) ) ) {
263
+ if ( ! event.isTrigger ) { // exclude programmatic triggers that aren't actually changing anything
264
+ settingsChanged( 1000 );
265
+ }
266
  }
267
  } );
268
 
269
  // Preview on select / radio setting change
270
  $( document ).on( 'change', '#wpo-wcpdf-settings input[type="radio"], #wpo-wcpdf-settings select', function( event ) {
271
  if ( ! settingIsExcludedForPreview( $( this ).attr( 'name' ) ) ) {
272
+ if ( ! event.isTrigger ) { // exclude programmatic triggers that aren't actually changing anything
273
+ settingsChanged();
274
+ }
275
  }
276
  } );
277
 
278
  // Preview on header logo change
279
  $( document.body ).on( 'wpo-wcpdf-media-upload-setting-updated', function( event, $input ) {
280
+ settingsChanged();
281
  } );
282
  $( document ).on( 'click', '.wpo_remove_image_button', function( event ) {
283
+ settingsChanged();
284
  } );
285
 
286
+ // Custom trigger to signify settings have changed (will show save button and refresh preview)
287
+ $( document ).on( 'wpo-wcpdf-settings-changed', function( event, delay ) {
288
+ settingsChanged( delay );
289
+ } );
290
+
291
+ // Custom trigger to refresh preview
292
+ $( document ).on( 'wpo-wcpdf-refresh-preview wpo_wcpdf_refresh_preview', function( event, delay ) {
293
+ triggerPreview( delay );
294
  } );
295
 
296
  // Preview on user click in search result
303
  triggerPreview();
304
  } );
305
 
306
+ function settingsChanged( previewDelay ) {
307
+ showSaveBtn();
308
+ triggerPreview( previewDelay );
309
+ }
310
+
311
+ function showSaveBtn() {
312
+ $('.preview-data-wrapper .save-settings p').css('margin-right', '0');
313
+ }
314
+
315
+ // Submit settings form when clicking on secondary save button
316
+ $( document ).on( 'click', '.preview-data-wrapper .save-settings p input', function( event ) {
317
+ $('#wpo-wcpdf-settings input#submit').click();
318
+ } );
319
+
320
  // Trigger the Preview
321
  function triggerPreview( timeoutDuration ) {
322
+ timeoutDuration = typeof timeoutDuration == 'number' ? timeoutDuration : 0;
323
+
324
  loadPreviewData();
325
  clearTimeout( previewTimeout );
326
  previewTimeout = setTimeout( function() { ajaxLoadPreview() }, timeoutDuration );
444
  // Using DocumentInitParameters object to load binary data.
445
  let loadingTask = pdfjsLib.getDocument( { data: pdfData } );
446
  loadingTask.promise.then( function( pdf ) {
 
 
447
  // Fetch the first page
448
  let pageNumber = 1;
449
  pdf.getPage( pageNumber ).then( function( page ) {
 
 
450
  let scale = 2;
451
  let viewport = page.getViewport( { scale: scale } );
452
 
464
  };
465
  let renderTask = page.render( renderContext );
466
  renderTask.promise.then( function() {
467
+ // page rendered
468
  } );
469
  } );
470
  }, function( reason ) {
assets/js/admin-script.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(a){function b(){l=u.val(),m=v.val(),n=w.val(),o=x.serialize()}function c(){v.val(v.data("default")).trigger("change")}function d(){u.val("").trigger("change")}function e(){!1==s.attr("data-preview-states-lock")&&(1200>=a(this).width()&&(1200<r||a(this).width()==r)?"full"==s.attr("data-preview-state")?(s.find(".preview-document").show(),s.find(".sidebar").hide(),s.find(".slide-left").hide(),s.find(".slide-right").show(),s.attr("data-preview-states",2),s.attr("data-preview-state","full"),s.attr("data-from-preview-state","")):(s.find(".preview-document").hide(),s.find(".sidebar").show(),s.find(".slide-left").show(),s.find(".slide-right").hide(),s.attr("data-preview-states",2),s.attr("data-preview-state","closed"),s.attr("data-from-preview-state","")):1200<a(this).width()&&(1200>=r||a(this).width()==r)&&("full"==s.attr("data-preview-state")?(s.find(".preview-document").show(),s.find(".sidebar").hide(),s.find(".slide-left").hide(),s.find(".slide-right").show(),s.attr("data-preview-states",3),s.attr("data-preview-state","full"),s.attr("data-from-preview-state","sidebar"),s.addClass("static")):"closed"==s.attr("data-preview-state")&&a(this).width()!==r?(s.find(".preview-document").hide(),s.find(".sidebar").show(),s.find(".slide-left").show(),s.find(".slide-right").hide(),s.attr("data-preview-states",3),s.attr("data-preview-state","closed"),s.attr("data-from-preview-state",""),s.removeClass("static")):(s.find(".preview-document, .sidebar").show(),s.find(".slide-left, .slide-right").show(),s.attr("data-preview-states",3),s.attr("data-preview-state","sidebar"),s.attr("data-from-preview-state",""),s.removeClass("static")))),r=a(this).width()}function f(a){window.scrollTo(0,0);setTimeout(function(){a.addClass("static")},300)}function g(a){b(),clearTimeout(p),p=setTimeout(function(){i()},a)}function h(b){let c=!1;if(!b)return c;let d=b.includes("[")?b.match(/\[(.*?)\]/)[1]:b;return-1!==a.inArray(d,wpo_wcpdf_admin.preview_excluded_settings)&&(c=!0),c}function i(){let b=wpo_wcpdf_admin.pdfjs_worker,c="preview-canvas",d={action:"wpo_wcpdf_preview",security:n,order_id:l,document_type:m,data:o};t.children(".notice").remove(),t.block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),y=a.ajax({type:"POST",url:wpo_wcpdf_admin.ajaxurl,data:d,beforeSend:function(){null!=y&&y.abort()},success:function(d){d.data.error?(a("#"+c).remove(),t.append("<div class=\"notice notice-error inline\"><p>"+d.data.error+"</p></div>")):d.data.pdf_data&&(a("#"+c).remove(),t.append("<canvas id=\""+c+"\" style=\"width:100%;\"></canvas>"),j(b,c,d.data.pdf_data)),t.unblock()},error:function(b,d){if("abort"!=d){let d=b.status+": "+b.statusText;a("#"+c).remove(),t.append("<div class=\"notice notice-error inline\"><p>"+d+"</p></div>"),t.unblock()}}})}function j(a,b,c){c=window.atob(c);let d=window["pdfjs-dist/build/pdf"];d.GlobalWorkerOptions.workerSrc=a;let e=d.getDocument({data:c});e.promise.then(function(a){console.log("PDF loaded");a.getPage(1).then(function(a){console.log("Page loaded");let c=a.getViewport({scale:2}),d=document.getElementById(b),e=d.getContext("2d");d.height=c.height,d.width=c.width;let f=a.render({canvasContext:e,viewport:c});f.promise.then(function(){console.log("Page rendered")})})},function(a){console.error(a)})}function k(b){let c=b.closest(".preview-data").find("#preview-order-search-results"),d=b.val(),e=b.data("nonce"),f={security:e,action:"wpo_wcpdf_preview_order_search",search:d,document_type:m};c.parent().find("img.preview-order-search-clear").hide(),c.children(".error").remove(),c.children("a").remove(),c.hide(),a.ajax({type:"POST",url:wpo_wcpdf_admin.ajaxurl,data:f,success:function(d){d.data&&(d.data.error?(c.append("<span class=\"error\">"+d.data.error+"</span>"),c.show()):a.each(d.data,function(a,b){let d="<a data-order_id=\""+a+"\"><span class=\"order-number\">#"+b.order_number+"</span> - "+b.billing_first_name+" "+b.billing_last_name;0<b.billing_company.length&&(d=d+", "+b.billing_company);let e="<br><span class=\"date\">"+b.date_created+"</span><span class=\"total\">"+b.total+"</span></a>";c.append(d+e),c.show()})),b.removeClass("ajax-waiting"),b.closest("div").find("img.preview-order-search-clear").show()}})}a(".wcpdf-extensions .more").hide(),a(".wcpdf-extensions > li").on("click",function(){a(this).toggleClass("expanded"),a(this).find(".more").slideToggle()}),a(".edit-next-number").on("click",function(){a(this).hide(),a(this).siblings("input").prop("disabled",!1),a(this).siblings(".save-next-number.button").show()}),a(".save-next-number").on("click",function(){$input=a(this).siblings("input"),$input.addClass("ajax-waiting");let b={security:$input.data("nonce"),action:"wpo_wcpdf_set_next_number",store:$input.data("store"),number:$input.val()};xhr=a.ajax({type:"POST",url:wpo_wcpdf_admin.ajaxurl,data:b,success:function(){$input.removeClass("ajax-waiting"),$input.siblings(".edit-next-number").show(),$input.prop("disabled","disabled"),$input.siblings(".save-next-number.button").hide()}})}),a("[name='wpo_wcpdf_documents_settings_invoice[display_number]']").on("change",function(){"order_number"==a(this).val()?a(this).closest("td").find(".description").slideDown():a(this).closest("td").find(".description").hide()}).trigger("change"),a(".wcpdf_document_settings_sections > h2").on("click",function(){a(this).parent().find("ul").toggleClass("active")});let l,m,n,o,p,q,r,s=a("#wpo-wcpdf-preview-wrapper"),t=a("#wpo-wcpdf-preview-wrapper .preview"),u=a("#wpo-wcpdf-preview-wrapper input[name=\"order_id\"]"),v=a("#wpo-wcpdf-preview-wrapper input[name=\"document_type\"]"),w=a("#wpo-wcpdf-preview-wrapper input[name=\"nonce\"]"),x=a("#wpo-wcpdf-settings"),y=null;a(document).ready(function(){c(),d(),b(),r=a(window).width(),e()}),a(window).on("resize",e),a(".slide-left").on("click",function(){let a=s.attr("data-preview-states"),b=s.attr("data-preview-state");s.find(".preview-data-wrapper ul").removeClass("active"),3==a?"closed"==b?(s.find(".preview-document").show(),s.find(".slide-right").show(),s.attr("data-preview-state","sidebar"),s.attr("data-from-preview-state","closed")):(s.find(".slide-left").hide(),s.find(".sidebar").delay(300).hide(0),s.attr("data-preview-state","full"),s.attr("data-from-preview-state","sidebar"),f(s)):(s.find(".preview-document").show(),s.find(".slide-left").hide(),s.find(".slide-right").show(),s.attr("data-preview-state","full"),s.attr("data-from-preview-state","closed"),f(s))}),a(".slide-right").on("click",function(){let a=s.attr("data-preview-states"),b=s.attr("data-preview-state");s.find(".preview-data-wrapper ul").removeClass("active"),3==a?"full"==b?(s.find(".slide-left").delay(400).show(0),s.find(".sidebar").show(),s.attr("data-preview-state","sidebar"),s.attr("data-from-preview-state","full")):(s.find(".preview-document").hide(300),s.find(".slide-right").hide(),s.attr("data-preview-state","closed"),s.attr("data-from-preview-state","sidebar")):(s.find(".preview-document").hide(300),s.find(".slide-left").show(),s.find(".slide-right").hide(),s.attr("data-preview-state","closed"),s.attr("data-from-preview-state","full")),s.removeClass("static")}),a(".preview-document .preview-data p").on("click",function(){let b=a(this).closest(".preview-data");b.siblings(".preview-data").find("ul").removeClass("active"),b.find("ul").toggleClass("active")}),a(".preview-document .preview-data ul > li").on("click",function(){let b=a(this).closest(".preview-data");b.find("ul").toggleClass("active"),a(this).hasClass("order-search")?(b.find("p.last-order").hide(),b.find("input[name=\"preview-order-search\"]").addClass("active"),b.find("p.order-search").show().find(".order-search-label").text(a(this).text())):(b.find("p.last-order").show(),b.find("p.order-search").hide(),b.find("input[name=\"preview-order-search\"]").removeClass("active").val(""),b.find("#preview-order-search-results").hide(),b.find("img.preview-order-search-clear").hide(),d(),g())}),a(document).ready(g()),a(document).on("keyup paste","#wpo-wcpdf-settings input:not([type=checkbox]), #wpo-wcpdf-settings textarea, #wpo-wcpdf-settings select:not(.dropdown-add-field)",function(b){if(!h(a(this).attr("name"))){let a="keyup"==b.type?1e3:0;g(a)}}),a(document).on("click","#wpo-wcpdf-settings select:not(.dropdown-add-field) option",function(){h(a(this).parent().attr("name"))||g()}),a(document).on("change","#wpo-wcpdf-settings input[type=\"checkbox\"]",function(){h(a(this).attr("name"))||g(1e3)}),a(document).on("change","#wpo-wcpdf-settings input[type=\"radio\"], #wpo-wcpdf-settings select",function(){h(a(this).attr("name"))||g()}),a(document.body).on("wpo-wcpdf-media-upload-setting-updated",function(){g()}),a(document).on("click",".wpo_remove_image_button",function(){g()}),a(document).on("wpo_wcpdf_refresh_preview",function(a,b){g(b)}),a(document).on("click","#preview-order-search-results a",function(b){b.preventDefault(),a(".preview-document .order-search-label").text("#"+a(this).data("order_id")),u.val(a(this).data("order_id")).change(),a(this).closest("div").hide(),a(this).closest("div").children("a").remove(),g()}),a(document).on("click","img.preview-order-search-clear",function(b){b.preventDefault(),a(this).closest("div").find("input#preview-order-search").val(""),a(this).closest(".preview-data").find("#preview-order-search-results").children("a").remove(),a(this).closest(".preview-data").find("#preview-order-search-results").children(".error").remove(),a(this).closest(".preview-data").find("#preview-order-search-results").hide(),a(this).hide()}),a("#wpo-wcpdf-preview-wrapper ul.preview-data-option-list li").on("click",function(){let b=a(this).closest("ul").data("input-name"),c=a("#wpo-wcpdf-preview-wrapper :input[name="+b+"]");c.val(a(this).data("value")).trigger("change")}),v.on("change",function(){let b=a(this).val();if(b.length){let c=a(this).attr("name"),d=a("#wpo-wcpdf-preview-wrapper ul.preview-data-option-list[data-input-name="+c+"]"),e=d.find("li[data-value="+b+"]");d.parent().find(".current-label").text(e.text()),g()}}).trigger("change"),u.on("change",function(){g()}).trigger("change"),a("#preview-order-search").on("keyup paste",function(c){let d=a(this);d.addClass("ajax-waiting");let e="keyup"==c.type?1e3:0;b(),clearTimeout(q),q=setTimeout(function(){k(d)},e)})});
1
+ jQuery(function(a){function b(){n=w.val(),o=x.val(),p=y.val(),q=z.serialize()}function c(){x.val(x.data("default")).trigger("change")}function d(){w.val("").trigger("change")}function e(){!1==u.attr("data-preview-states-lock")&&(1200>=a(this).width()&&(1200<t||a(this).width()==t)?"full"==u.attr("data-preview-state")?(u.find(".preview-document").show(),u.find(".sidebar").hide(),u.find(".slide-left").hide(),u.find(".slide-right").show(),u.attr("data-preview-states",2),u.attr("data-preview-state","full"),u.attr("data-from-preview-state","")):(u.find(".preview-document").hide(),u.find(".sidebar").show(),u.find(".slide-left").show(),u.find(".slide-right").hide(),u.attr("data-preview-states",2),u.attr("data-preview-state","closed"),u.attr("data-from-preview-state","")):1200<a(this).width()&&(1200>=t||a(this).width()==t)&&("full"==u.attr("data-preview-state")?(u.find(".preview-document").show(),u.find(".sidebar").hide(),u.find(".slide-left").hide(),u.find(".slide-right").show(),u.attr("data-preview-states",3),u.attr("data-preview-state","full"),u.attr("data-from-preview-state","sidebar"),u.addClass("static")):"closed"==u.attr("data-preview-state")&&a(this).width()!==t?(u.find(".preview-document").hide(),u.find(".sidebar").show(),u.find(".slide-left").show(),u.find(".slide-right").hide(),u.attr("data-preview-states",3),u.attr("data-preview-state","closed"),u.attr("data-from-preview-state",""),u.removeClass("static")):(u.find(".preview-document, .sidebar").show(),u.find(".slide-left, .slide-right").show(),u.attr("data-preview-states",3),u.attr("data-preview-state","sidebar"),u.attr("data-from-preview-state",""),u.removeClass("static")))),t=a(this).width()}function f(a){window.scrollTo(0,0);setTimeout(function(){a.addClass("static")},300)}function g(a){h(),i(a)}function h(){a(".preview-data-wrapper .save-settings p").css("margin-right","0")}function i(a){a="number"==typeof a?a:0,b(),clearTimeout(r),r=setTimeout(function(){k()},a)}function j(b){let c=!1;if(!b)return c;let d=b.includes("[")?b.match(/\[(.*?)\]/)[1]:b;return-1!==a.inArray(d,wpo_wcpdf_admin.preview_excluded_settings)&&(c=!0),c}function k(){let b=wpo_wcpdf_admin.pdfjs_worker,c="preview-canvas",d={action:"wpo_wcpdf_preview",security:p,order_id:n,document_type:o,data:q};v.children(".notice").remove(),v.block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),A=a.ajax({type:"POST",url:wpo_wcpdf_admin.ajaxurl,data:d,beforeSend:function(){null!=A&&A.abort()},success:function(d){d.data.error?(a("#"+c).remove(),v.append("<div class=\"notice notice-error inline\"><p>"+d.data.error+"</p></div>")):d.data.pdf_data&&(a("#"+c).remove(),v.append("<canvas id=\""+c+"\" style=\"width:100%;\"></canvas>"),l(b,c,d.data.pdf_data)),v.unblock()},error:function(b,d){if("abort"!=d){let d=b.status+": "+b.statusText;a("#"+c).remove(),v.append("<div class=\"notice notice-error inline\"><p>"+d+"</p></div>"),v.unblock()}}})}function l(a,b,c){c=window.atob(c);let d=window["pdfjs-dist/build/pdf"];d.GlobalWorkerOptions.workerSrc=a;let e=d.getDocument({data:c});e.promise.then(function(a){a.getPage(1).then(function(a){let c=a.getViewport({scale:2}),d=document.getElementById(b),e=d.getContext("2d");d.height=c.height,d.width=c.width;let f=a.render({canvasContext:e,viewport:c});f.promise.then(function(){})})},function(a){console.error(a)})}function m(b){let c=b.closest(".preview-data").find("#preview-order-search-results"),d=b.val(),e=b.data("nonce"),f={security:e,action:"wpo_wcpdf_preview_order_search",search:d,document_type:o};c.parent().find("img.preview-order-search-clear").hide(),c.children(".error").remove(),c.children("a").remove(),c.hide(),a.ajax({type:"POST",url:wpo_wcpdf_admin.ajaxurl,data:f,success:function(d){d.data&&(d.data.error?(c.append("<span class=\"error\">"+d.data.error+"</span>"),c.show()):a.each(d.data,function(a,b){let d="<a data-order_id=\""+a+"\"><span class=\"order-number\">#"+b.order_number+"</span> - "+b.billing_first_name+" "+b.billing_last_name;0<b.billing_company.length&&(d=d+", "+b.billing_company);let e="<br><span class=\"date\">"+b.date_created+"</span><span class=\"total\">"+b.total+"</span></a>";c.append(d+e),c.show()})),b.removeClass("ajax-waiting"),b.closest("div").find("img.preview-order-search-clear").show()}})}a(".wcpdf-extensions .more").hide(),a(".wcpdf-extensions > li").on("click",function(){a(this).toggleClass("expanded"),a(this).find(".more").slideToggle()}),a(".edit-next-number").on("click",function(){a(this).hide(),a(this).siblings("input").prop("disabled",!1),a(this).siblings(".save-next-number.button").show()}),a(".save-next-number").on("click",function(){$input=a(this).siblings("input"),$input.addClass("ajax-waiting");let b={security:$input.data("nonce"),action:"wpo_wcpdf_set_next_number",store:$input.data("store"),number:$input.val()};xhr=a.ajax({type:"POST",url:wpo_wcpdf_admin.ajaxurl,data:b,success:function(){$input.removeClass("ajax-waiting"),$input.siblings(".edit-next-number").show(),$input.prop("disabled","disabled"),$input.siblings(".save-next-number.button").hide()}})}),a("[name='wpo_wcpdf_documents_settings_invoice[display_number]']").on("change",function(){"order_number"==a(this).val()?a(this).closest("td").find(".description").slideDown():a(this).closest("td").find(".description").hide()}).trigger("change"),a(".wcpdf_document_settings_sections > h2").on("click",function(){a(this).parent().find("ul").toggleClass("active")});let n,o,p,q,r,s,t,u=a("#wpo-wcpdf-preview-wrapper"),v=a("#wpo-wcpdf-preview-wrapper .preview"),w=a("#wpo-wcpdf-preview-wrapper input[name=\"order_id\"]"),x=a("#wpo-wcpdf-preview-wrapper input[name=\"document_type\"]"),y=a("#wpo-wcpdf-preview-wrapper input[name=\"nonce\"]"),z=a("#wpo-wcpdf-settings"),A=null;a(document).ready(function(){c(),d(),b(),t=a(window).width(),e()}),a(window).on("resize",e),a(".slide-left").on("click",function(){let a=u.attr("data-preview-states"),b=u.attr("data-preview-state");u.find(".preview-data-wrapper ul").removeClass("active"),3==a?"closed"==b?(u.find(".preview-document").show(),u.find(".slide-right").show(),u.attr("data-preview-state","sidebar"),u.attr("data-from-preview-state","closed")):(u.find(".slide-left").hide(),u.find(".sidebar").delay(300).hide(0),u.attr("data-preview-state","full"),u.attr("data-from-preview-state","sidebar"),f(u)):(u.find(".preview-document").show(),u.find(".slide-left").hide(),u.find(".slide-right").show(),u.attr("data-preview-state","full"),u.attr("data-from-preview-state","closed"),f(u))}),a(".slide-right").on("click",function(){let a=u.attr("data-preview-states"),b=u.attr("data-preview-state");u.find(".preview-data-wrapper ul").removeClass("active"),3==a?"full"==b?(u.find(".slide-left").delay(400).show(0),u.find(".sidebar").show(),u.attr("data-preview-state","sidebar"),u.attr("data-from-preview-state","full")):(u.find(".preview-document").hide(300),u.find(".slide-right").hide(),u.attr("data-preview-state","closed"),u.attr("data-from-preview-state","sidebar")):(u.find(".preview-document").hide(300),u.find(".slide-left").show(),u.find(".slide-right").hide(),u.attr("data-preview-state","closed"),u.attr("data-from-preview-state","full")),u.removeClass("static")}),a(".preview-document .preview-data p").on("click",function(){let b=a(this).closest(".preview-data");b.siblings(".preview-data").find("ul").removeClass("active"),b.find("ul").toggleClass("active")}),a(".preview-document .preview-data ul > li").on("click",function(){let b=a(this).closest(".preview-data");b.find("ul").toggleClass("active"),a(this).hasClass("order-search")?(b.find("p.last-order").hide(),b.find("input[name=\"preview-order-search\"]").addClass("active"),b.find("p.order-search").show().find(".order-search-label").text(a(this).text())):(b.find("p.last-order").show(),b.find("p.order-search").hide(),b.find("input[name=\"preview-order-search\"]").removeClass("active").val(""),b.find("#preview-order-search-results").hide(),b.find("img.preview-order-search-clear").hide(),d(),i())}),a(document).ready(i()),a(document).on("keyup paste","#wpo-wcpdf-settings input:not([type=checkbox]), #wpo-wcpdf-settings textarea, #wpo-wcpdf-settings select:not(.dropdown-add-field)",function(b){if(!j(a(this).attr("name"))){let a="keyup"==b.type?1e3:0;g(a)}}),a(document).on("click","#wpo-wcpdf-settings select:not(.dropdown-add-field) option",function(){j(a(this).parent().attr("name"))||g()}),a(document).on("change","#wpo-wcpdf-settings input[type=\"checkbox\"]",function(b){j(a(this).attr("name"))||b.isTrigger||g(1e3)}),a(document).on("change","#wpo-wcpdf-settings input[type=\"radio\"], #wpo-wcpdf-settings select",function(b){j(a(this).attr("name"))||b.isTrigger||g()}),a(document.body).on("wpo-wcpdf-media-upload-setting-updated",function(){g()}),a(document).on("click",".wpo_remove_image_button",function(){g()}),a(document).on("wpo-wcpdf-settings-changed",function(a,b){g(b)}),a(document).on("wpo-wcpdf-refresh-preview wpo_wcpdf_refresh_preview",function(a,b){i(b)}),a(document).on("click","#preview-order-search-results a",function(b){b.preventDefault(),a(".preview-document .order-search-label").text("#"+a(this).data("order_id")),w.val(a(this).data("order_id")).change(),a(this).closest("div").hide(),a(this).closest("div").children("a").remove(),i()}),a(document).on("click",".preview-data-wrapper .save-settings p input",function(){a("#wpo-wcpdf-settings input#submit").click()}),a(document).on("click","img.preview-order-search-clear",function(b){b.preventDefault(),a(this).closest("div").find("input#preview-order-search").val(""),a(this).closest(".preview-data").find("#preview-order-search-results").children("a").remove(),a(this).closest(".preview-data").find("#preview-order-search-results").children(".error").remove(),a(this).closest(".preview-data").find("#preview-order-search-results").hide(),a(this).hide()}),a("#wpo-wcpdf-preview-wrapper ul.preview-data-option-list li").on("click",function(){let b=a(this).closest("ul").data("input-name"),c=a("#wpo-wcpdf-preview-wrapper :input[name="+b+"]");c.val(a(this).data("value")).trigger("change")}),x.on("change",function(){let b=a(this).val();if(b.length){let c=a(this).attr("name"),d=a("#wpo-wcpdf-preview-wrapper ul.preview-data-option-list[data-input-name="+c+"]"),e=d.find("li[data-value="+b+"]");d.parent().find(".current-label").text(e.text()),i()}}).trigger("change"),w.on("change",function(){i()}).trigger("change"),a("#preview-order-search").on("keyup paste",function(c){let d=a(this);d.addClass("ajax-waiting");let e="keyup"==c.type?1e3:0;b(),clearTimeout(s),s=setTimeout(function(){m(d)},e)})});
includes/class-wcpdf-main.php CHANGED
@@ -457,7 +457,7 @@ class Main {
457
  return false;
458
  }
459
 
460
- return apply_filters( 'wpo_wcpdf_tmp_path_{$type}', $tmp_path );;
461
  }
462
 
463
  /**
457
  return false;
458
  }
459
 
460
+ return apply_filters( "wpo_wcpdf_tmp_path_{$type}", $tmp_path );
461
  }
462
 
463
  /**
includes/class-wcpdf-settings-callbacks.php CHANGED
@@ -403,7 +403,7 @@ class Settings_Callbacks {
403
  );
404
  }
405
 
406
- printf( '<img src="%1$s" style="display:block" id="img-%2$s"/>', esc_attr( $attachment_src ), esc_attr( $id ) );
407
  if ( ! empty( $attachment_height ) && ! empty( $in_height ) ) {
408
  $attachment_resolution = round( absint( $attachment_height ) / $in_height );
409
  printf(
403
  );
404
  }
405
 
406
+ printf( '<img src="%1$s" style="display:block" id="img-%2$s" class="media-upload-preview"/>', esc_attr( $attachment_src ), esc_attr( $id ) );
407
  if ( ! empty( $attachment_height ) && ! empty( $in_height ) ) {
408
  $attachment_resolution = round( absint( $attachment_height ) / $in_height );
409
  printf(
includes/class-wcpdf-settings-debug.php CHANGED
@@ -135,6 +135,9 @@ class Settings_Debug {
135
  ?>
136
  </form>
137
  </p>
 
 
 
138
  </div>
139
  <br>
140
  <?php
135
  ?>
136
  </form>
137
  </p>
138
+ <p>
139
+ <a href="<?php echo esc_url( admin_url( 'admin.php?page=wpo-wcpdf-setup' ) ); ?>" class="button"><?php esc_html_e( 'Run the Setup Wizard', 'woocommerce-pdf-invoices-packing-slips' ); ?></a>
140
+ </p>
141
  </div>
142
  <br>
143
  <?php
includes/views/wcpdf-settings-page.php CHANGED
@@ -82,6 +82,7 @@ $review_invitation = sprintf(
82
  }
83
  ?>
84
  <div class="preview-data-wrapper">
 
85
  <div class="preview-data preview-order-data">
86
  <div class="preview-order-search-wrapper">
87
  <input type="text" name="preview-order-search" id="preview-order-search" placeholder="<?php esc_html_e( 'ID, email or name', 'woocommerce-pdf-invoices-packing-slips' ); ?>" data-nonce="<?= wp_create_nonce( 'wpo_wcpdf_preview' ); ?>">
82
  }
83
  ?>
84
  <div class="preview-data-wrapper">
85
+ <div class="save-settings"><?php submit_button(); ?></div>
86
  <div class="preview-data preview-order-data">
87
  <div class="preview-order-search-wrapper">
88
  <input type="text" name="preview-order-search" id="preview-order-search" placeholder="<?php esc_html_e( 'ID, email or name', 'woocommerce-pdf-invoices-packing-slips' ); ?>" data-nonce="<?= wp_create_nonce( 'wpo_wcpdf_preview' ); ?>">
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: woocommerce, pdf, invoices, packing slips, print, delivery notes, invoice,
5
  Requires at least: 3.5
6
  Tested up to: 5.9
7
  Requires PHP: 7.1
8
- Stable tag: 2.14.0
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -102,6 +102,13 @@ There's a setting on the Status tab of the settings page that allows you to togg
102
 
103
  == Changelog ==
104
 
 
 
 
 
 
 
 
105
  = 2.14.0 =
106
  * New: Live preview of PDF document on the settings page
107
  * Fix: checks if number store table exists before applying DB migration
5
  Requires at least: 3.5
6
  Tested up to: 5.9
7
  Requires PHP: 7.1
8
+ Stable tag: 2.14.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
102
 
103
  == Changelog ==
104
 
105
+ = 2.14.1 =
106
+ * New: Relaunch the Setup Wizard manually from the Status tab
107
+ * Fix: Dynamic `wpo_wcpdf_tmp_path_{$type}` filter hook name parsing
108
+ * Fix: removing inline preview for media upload
109
+ * UI: Show sticky save button on settings change
110
+ * UI: Fill in the document icon sheet with white
111
+
112
  = 2.14.0 =
113
  * New: Live preview of PDF document on the settings page
114
  * Fix: checks if number store table exists before applying DB migration
woocommerce-pdf-invoices-packingslips.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WooCommerce PDF Invoices & Packing Slips
4
  * Plugin URI: https://wpovernight.com/downloads/woocommerce-pdf-invoices-packing-slips-bundle/
5
  * Description: Create, print & email PDF invoices & packing slips for WooCommerce orders.
6
- * Version: 2.14.0
7
  * Author: WP Overnight
8
  * Author URI: https://www.wpovernight.com
9
  * License: GPLv2 or later
@@ -21,7 +21,7 @@ if ( !class_exists( 'WPO_WCPDF' ) ) :
21
 
22
  class WPO_WCPDF {
23
 
24
- public $version = '2.14.0';
25
  public $plugin_basename;
26
  public $legacy_mode;
27
  public $legacy_textdomain;
3
  * Plugin Name: WooCommerce PDF Invoices & Packing Slips
4
  * Plugin URI: https://wpovernight.com/downloads/woocommerce-pdf-invoices-packing-slips-bundle/
5
  * Description: Create, print & email PDF invoices & packing slips for WooCommerce orders.
6
+ * Version: 2.14.1
7
  * Author: WP Overnight
8
  * Author URI: https://www.wpovernight.com
9
  * License: GPLv2 or later
21
 
22
  class WPO_WCPDF {
23
 
24
+ public $version = '2.14.1';
25
  public $plugin_basename;
26
  public $legacy_mode;
27
  public $legacy_textdomain;