Skip to content

Commit

Permalink
Merge branch 'main' into mpdf-templates-compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmigf committed Oct 7, 2024
2 parents 5f54a01 + 8bdda5b commit a1c0401
Show file tree
Hide file tree
Showing 40 changed files with 1,701 additions and 595 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/release-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ jobs:
path: ${{ env.plugin_slug }}
submodules: true

- name: Check stable version in readme.txt
run: |
STABLE_TAG=$(grep -oP '(?<=Stable tag: ).*' ${{ env.plugin_slug }}/readme.txt | tr -d '[:space:]')
if [ "$STABLE_TAG" != "${{ env.version }}" ]; then
echo "Stable tag ($STABLE_TAG) does not match release version (${{ env.version }}). Halting execution."
exit 1
fi
- name: Create ZIP
run: |
# reformat .distignore: remove all empty lines, leading slashes and prefix with the folder
Expand All @@ -37,7 +45,7 @@ jobs:
# create zip file
zip -rq ${{ env.zip_file_name }} ${{ env.plugin_slug }} -x@.zipignore
- name: Add ZIP to release asseets
- name: Add ZIP to release assets
uses: meeDamian/github-release@2.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
118 changes: 111 additions & 7 deletions assets/css/settings-styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,15 @@ body.woocommerce_page_wpo_wcpdf_options_page {
margin-bottom: 4em;
}

#wpo-wcpdf-preview-wrapper input#due_date_days {
text-align: right;
}

#wpo-wcpdf-preview-wrapper input#due_date_days:disabled {
background-color: #eaeaea;
color: #999;
}

sup.wcpdf_beta {
background-color: #51266b;
color: white;
Expand Down Expand Up @@ -1120,7 +1129,8 @@ div.upgrade-table-description a,
font-size: 0.8em;
}

#upgrade-table .upgrade-links a.upgrade_button {
#upgrade-table .upgrade-links a.upgrade_button,
#plugin-recommendations a.upgrade_button {
display: inline-block;
background: white;
padding: 1em 3em 1em 2em;
Expand All @@ -1131,7 +1141,8 @@ div.upgrade-table-description a,
position: relative;
}

#upgrade-table .upgrade-links a.upgrade_button:after {
#upgrade-table .upgrade-links a.upgrade_button:after,
#plugin-recommendations a.upgrade_button:after {
content: ' \2192'; /* ASCII code for right arrow */
display: block;
position: absolute;
Expand All @@ -1140,18 +1151,92 @@ div.upgrade-table-description a,
transition: 0.5s;
}

#upgrade-table .upgrade-links a.upgrade_button:hover:after {
#upgrade-table .upgrade-links a.upgrade_button:hover:after,
#plugin-recommendations a.upgrade_button:hover:after {
right: 1.1em;
font-weight: bold;
}


#upgrade-table .upgrade-links a.upgrade_button:focus,
#upgrade-table .upgrade-links a.upgrade_button:hover {
#upgrade-table .upgrade-links a.upgrade_button:hover,
#plugin-recommendations a.upgrade_button:focus,
#plugin-recommendations a.upgrade_button:hover {
background: #6e1edc;
color: #fcfbf7;
}

#plugin-recommendations {
border-radius: 8px;
background-color: #f1e9fc;
padding: 4em 3em;
}

#plugin-recommendations .card-container {
max-width: 1100px;
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-gap: 3em;
padding: 2em 0;
}

#plugin-recommendations .recommendation-card {
margin-top: 0;
border-radius: 6px;
background-color: white;
box-shadow: 0 0 25px -10px rgba(0,0,0,0.2);
box-sizing: border-box;
font-size: 15px;
overflow: hidden;
transition: 0.2s;
}

#plugin-recommendations .recommendation-card:nth-child(n+4) {
display: none;
}

#plugin-recommendations .recommendation-card:hover {
scale: 1.02;
}

#plugin-recommendations .recommendation-card.currently-installed {
opacity: 0.5;
}

#plugin-recommendations .recommendation-card .card-content{
padding: 0 4em 3em 2em;
}

#plugin-recommendations .recommendation-card img {
width: 100%;
}

#plugin-recommendations .recommendation-card h5 {
text-align: left;
font-size: 1.4em;
line-height: 1.3em;
font-weight: bold;
margin: 1em 0;
}

#plugin-recommendations .recommendation-card p {
text-align: left;
padding-bottom: 10px;
}

#plugin-recommendations .recommendation-card a.upgrade_button {
margin: 0;
}

#plugin-recommendations .recommendation-card span.currently-installed {
font-size: 0.7em;
color: white;
background-color: #6e1edc;
padding: 1em 2em;
border-radius: 12px;
margin: 0;
display: inline-block;
}

@media screen and (max-width: 1100px) {
#upgrade-table {
font-size: 1em;
Expand All @@ -1173,21 +1258,36 @@ div.upgrade-table-description a,
#upgrade-table td.feature-label span.description {
padding-top: 6px;
}

#plugin-recommendations .card-container {
grid-gap: 2em;
}
}

@media screen and (max-width: 968px) {
#plugin-recommendations .card-container {
grid-template-columns: repeat(1, 1fr);
padding-right: 40%;
}
}

@media screen and (max-width: 767px) {
#upgrade-table td.feature-label span.description {
display: none;
}

#upgrade-table th:not(.last),
#upgrade-table td:not(.last) {
width: 20%;
}

#upgrade-table td.first {
width: 40%;
}

#plugin-recommendations .card-container {
padding-right: 0;
}
}

@media screen and (max-width: 649px) {
Expand Down Expand Up @@ -1223,4 +1323,8 @@ div.upgrade-table-description a,
#upgrade-table .upgrade-links a:after {
display: none;
}

#plugin-recommendations .card-container {
justify-content: center;
}
}
2 changes: 1 addition & 1 deletion assets/css/settings-styles.min.css

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions assets/images/generic_document.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 11 additions & 3 deletions assets/js/admin-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,17 @@ jQuery( function( $ ) {
'delay': 200
} );

$( '#wpo-wcpdf-preview-wrapper #due_date' ).on( 'change', function() {
const $due_date_checkbox = $( '#wpo-wcpdf-preview-wrapper #due_date' );
const $due_date_days_input = $( '#wpo-wcpdf-preview-wrapper #due_date_days' );

if ( $due_date_checkbox.is( ':checked' ) ) {
$due_date_days_input.prop( 'disabled', false );
} else {
$due_date_days_input.prop( 'disabled', true );
}
} ).trigger( 'change' );

//----------> Preview <----------//
// objects
let $previewWrapper = $( '#wpo-wcpdf-preview-wrapper' );
Expand Down Expand Up @@ -491,9 +502,6 @@ jQuery( function( $ ) {
// (See also https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding.)
pdfData = window.atob( pdfData );

// Loaded via <script> tag, create shortcut to access PDF.js exports.
let pdfjsLib = window['pdfjs-dist/build/pdf'];

// The workerSrc property shall be specified.
pdfjsLib.GlobalWorkerOptions.workerSrc = worker;

Expand Down
2 changes: 1 addition & 1 deletion assets/js/admin-script.min.js

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions assets/js/debug-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ jQuery( function( $ ) {
contentType: false,
success ( response ) {
process_form_response( tool, response, $form );
$form.closest( '.tool' ).unblock();
},
error ( xhr, error, status ) {
//console.log( error, status );
$form.closest( '.tool' ).unblock();
}
} );
}

$form.closest( '.tool' ).unblock();
} );

function process_form_response( tool, response, $form ) {
Expand Down Expand Up @@ -69,6 +69,7 @@ jQuery( function( $ ) {
default:
if ( response.success && response.data.message ) {
$notice.addClass( 'notice-success' );
$form.find( '> .notice-warning' ).remove();
} else if ( ! response.success && response.data.message ) {
$notice.addClass( 'notice-error' );
}
Expand Down
2 changes: 1 addition & 1 deletion assets/js/debug-script.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 2 additions & 22 deletions assets/js/pdf_js/pdf.min.js

Large diffs are not rendered by default.

24 changes: 2 additions & 22 deletions assets/js/pdf_js/pdf.worker.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit a1c0401

Please sign in to comment.