Skip to content

Commit

Permalink
description edit fix
Browse files Browse the repository at this point in the history
  • Loading branch information
victorandeloci committed Feb 17, 2022
1 parent a27c77d commit db391de
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ function loader(elementId, action = 'start') {
}
}

function getAttachmentDetails(fileUrl, fileName, attachmentKey = null, attachmentCoverImage = null) {
function getAttachmentDetails(fileUrl, fileName, description = null, attachmentKey = null, attachmentCoverImage = null) {

let dialog = document.getElementById('attachmentDialog');

dialog.querySelector('#wppa_attachmentTitle').value = fileName;
dialog.querySelector('#wppa_attachmentDescription').value = fileName;
dialog.querySelector('#wppa_attachmentDescription').value = description;
dialog.querySelector('#wppa_attachmentTitleShow').innerHTML = fileName;

dialog.querySelector('#wppa_attachmentFileUrl').value = fileUrl;
Expand Down Expand Up @@ -181,7 +181,7 @@ docReady(function() {
} else if (target.matches('.edit-btn')) {

let attachment = wppaAtachments[target.getAttribute('data-key')];
getAttachmentDetails(attachment.url, attachment.name, target.getAttribute('data-key'), attachment.cover_image);
getAttachmentDetails(attachment.url, attachment.name, attachment.description, target.getAttribute('data-key'), attachment.cover_image);

}
});
Expand Down
2 changes: 1 addition & 1 deletion js/main.min.js

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

6 changes: 3 additions & 3 deletions wordpress-post-pdf-files.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Plugin Name: PDF Attachments for WordPress Posts & Pages
* Plugin URI: https://github.com/ValkyriaTech/wordpress-post-pdf-files/
* Description:
* Version: 2.1.1
* Version: 2.1.2
* Author: ValkyriaTech
* Author URI: https://github.com/ValkyriaTech
* License: GPLv3
Expand All @@ -24,7 +24,7 @@ function loadPdfFilesBox() {
'main',
plugin_dir_url(__FILE__) . 'js/main.min.js',
null,
true
'2.1.2'
);

wp_enqueue_style(
Expand All @@ -47,7 +47,7 @@ function loadPdfFilesBox() {
'style',
plugin_dir_url(__FILE__) . 'css/style.min.css',
null,
'2.1.1',
'2.1.2',
'screen'
);

Expand Down

0 comments on commit db391de

Please sign in to comment.