Begining to code the Ajax action

This commit is contained in:
vdv committed 2025-03-27 16:35:50 +01:00
1 parent 7d8beefebf
commit 338b69d4f1
4 files changed
+125 -2

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
/*
* vim: set ai sw=4 smarttab expandtab: tabstop=8 softtabstop=0
*
*/
jQuery(document).ready( function($){
jQuery('.wpdfh_print_checkbox').on("change", function(){
$.ajax({
url: wpdfh_ajax_object.ajaxurl, // this is the object instantiated in wp_localize_script function
type: 'POST',
data:{
action: 'wpdfh_set_print_metadata', // this is the function in your functions.php that will be triggered
post_id: $(this).data('post_id'),
checked: $(this).prop('checked')
},
success: function( data ){
console.log( data );
}
});
})
});
+8
View File
@@ -0,0 +1,8 @@
/*
* vim: set ai sw=4 smarttab expandtab: tabstop=8 softtabstop=0
*
*/
.column-wp-pdf-helper {
width: 50px;
}
+73
View File
@@ -0,0 +1,73 @@
/*
* vim: set ai sw=4 smarttab expandtab: tabstop=8 softtabstop=0
*
*/
video,
.attached-videos,
header,
.plyr,
.leaflet-marker-photo,
.leaflet-top,
#wpgpxmaps_downloadfile,
div:empty,
nav,
.wp-block-comments,
.wp-block-query,
footer,
.other-posts,
.no-print,
#wpadminbar,
.skip-link.screen-reader-text
{
display: none !important;
}
html,
main,
#post-content {
padding: 0px !important;
margin: 0px !important;
}
.gallery,
.attached-gpx {
page-break-before: auto; /* 'always,' 'avoid,' 'left,' 'inherit,' or 'right' */
page-break-after: auto; /* 'always,' 'avoid,' 'left,' 'inherit,' or 'right' */
page-break-inside: avoid; /* or 'auto' */
}
#post-grid {
display: flex;
}
#post-grid-column2 {
flex: 70%;
padding-left: 10px;
}
.attached-gpxes {
flex: 30%;
}
.wpgpxmaps_summary {
font-size: var(--wp--preset--font-size--small);
}
.leaflet-control-attribution {
font-size: 8px;
}
.date-prefix {
text-transform: capitalize;
}
.author-line, .author-line > * {
margin-bottom: 0px !important;
margin-top: 5px !important;
font-size: var(--wp--preset--font-size--medium) !important;
}
.entry-content, wp-block-post-excerpt {
text-align: justify;