mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
issue #2164 Update Metadata Sync function
Yet to be implemented, tags and date_creation
This commit is contained in:
@@ -445,45 +445,44 @@ function pluginSaveLoop(activePlugins, pictureId) {
|
||||
|
||||
});
|
||||
}
|
||||
// UPDATE BLOCKS (Yet to be implemented)
|
||||
// function updateBlock(pictureId) {
|
||||
// $.ajax({
|
||||
// url: 'ws.php?format=json',
|
||||
// type: 'GET',
|
||||
// dataType: 'json',
|
||||
// data: {
|
||||
// method: 'pwg.images.getInfo',
|
||||
// image_id: pictureId,
|
||||
// format: 'json'
|
||||
// },
|
||||
// success: function(response) {
|
||||
// if (response.stat === 'ok') {
|
||||
// $("#picture-" + pictureId + " #name-" + pictureId).val(response.result.name);
|
||||
// $("#picture-" + pictureId + " #author-" + pictureId).val(response.result.author);
|
||||
// $("#picture-" + pictureId + " #date_creation-" + pictureId).val(response.result.date_creation);
|
||||
// $("#picture-" + pictureId + " #description-" + pictureId).val(response.result.comment);
|
||||
// $("#picture-" + pictureId + " #level-" + pictureId).val(response.result.level);
|
||||
// $("#picture-" + pictureId + " #filename-" + pictureId).text(response.result.file);
|
||||
// $("#picture-" + pictureId + " #filesize-" + pictureId).text(response.result.filesize);
|
||||
// $("#picture-" + pictureId + " #dimensions-" + pictureId).text(response.result.width + "x" + response.result.height);
|
||||
// updateTags(response.result.tags, pictureId); //Yet to be implemented
|
||||
// showMetasyncSuccesBadge(pictureId);
|
||||
// enableLocalButton(pictureId);
|
||||
// enableGlobalButton();
|
||||
// } else {
|
||||
// console.error("Error:", response.message);
|
||||
// showErrorLocalBadge(pictureId);
|
||||
// enableLocalButton(pictureId);
|
||||
// enableGlobalButton();
|
||||
// }
|
||||
// },
|
||||
// error: function(xhr, status, error) {
|
||||
// console.error("Error:", status, error);
|
||||
// showErrorLocalBadge(pictureId);
|
||||
// enableLocalButton(pictureId);
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// UPDATE BLOCKS
|
||||
function updateBlock(pictureId) {
|
||||
$.ajax({
|
||||
url: 'ws.php?format=json',
|
||||
type: 'GET',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
method: 'pwg.images.getInfo',
|
||||
image_id: pictureId
|
||||
},
|
||||
success: function(response) {
|
||||
if (response.stat === 'ok') {
|
||||
$("#picture-" + pictureId + " #name").val(response.result.name);
|
||||
$("#picture-" + pictureId + " #author").val(response.result.author);
|
||||
$("#picture-" + pictureId + " #date_creation").val(response.result.date_creation); //TODO
|
||||
$("#picture-" + pictureId + " #description").val(response.result.comment);
|
||||
$("#picture-" + pictureId + " #level").val(response.result.level);
|
||||
$("#picture-" + pictureId + " #filename").text(response.result.file);
|
||||
$("#picture-" + pictureId + " #filesize").text(response.result.filesize);
|
||||
$("#picture-" + pictureId + " #dimensions").text(response.result.width + "x" + response.result.height);
|
||||
// updateTags(response.result.tags, pictureId); //Yet to be implemented (TODO)
|
||||
showMetasyncSuccesBadge(pictureId);
|
||||
enableLocalButton(pictureId);
|
||||
enableGlobalButton();
|
||||
} else {
|
||||
console.error("Error:", response.message);
|
||||
showErrorLocalBadge(pictureId);
|
||||
enableLocalButton(pictureId);
|
||||
enableGlobalButton();
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error("Error:", status, error);
|
||||
showErrorLocalBadge(pictureId);
|
||||
enableLocalButton(pictureId);
|
||||
}
|
||||
});
|
||||
}
|
||||
// TAGS UPDATE Yet to be implemented
|
||||
// function updateTags(tagsData, pictureId) {
|
||||
// const $tagsUpdate = $('#tags-'+pictureId).selectize({
|
||||
|
||||
@@ -157,7 +157,7 @@ pluginValues = [];
|
||||
<a class="icon-signal tiptip" href="{$element.U_HISTORY}" title="Visit history"></a>
|
||||
<a target="_blank" class="icon-pencil tiptip" href="{$element.U_EDIT}" title="{'Edit photo'|@translate}"></a>
|
||||
{if !url_is_remote($element.PATH)}
|
||||
{* <a class="icon-arrows-cw tiptip action-sync-metadata" title="{'Synchronize metadata'|@translate}"></a> *}
|
||||
<a class="icon-arrows-cw tiptip action-sync-metadata" title="{'Synchronize metadata'|@translate}"></a>
|
||||
<a class="icon-trash tiptip action-delete-picture" title="{'delete photo'|@translate}"></a>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user