issue #2164 Update Metadata Sync function

Yet to be implemented, tags and date_creation
This commit is contained in:
marsooooo
2024-09-13 16:53:18 +02:00
parent 74e2c33bea
commit e66de5a513
2 changed files with 39 additions and 40 deletions
+38 -39
View File
@@ -445,45 +445,44 @@ function pluginSaveLoop(activePlugins, pictureId) {
}); });
} }
// UPDATE BLOCKS (Yet to be implemented) // UPDATE BLOCKS
// function updateBlock(pictureId) { function updateBlock(pictureId) {
// $.ajax({ $.ajax({
// url: 'ws.php?format=json', url: 'ws.php?format=json',
// type: 'GET', type: 'GET',
// dataType: 'json', dataType: 'json',
// data: { data: {
// method: 'pwg.images.getInfo', method: 'pwg.images.getInfo',
// image_id: pictureId, image_id: pictureId
// format: 'json' },
// }, success: function(response) {
// success: function(response) { if (response.stat === 'ok') {
// if (response.stat === 'ok') { $("#picture-" + pictureId + " #name").val(response.result.name);
// $("#picture-" + pictureId + " #name-" + pictureId).val(response.result.name); $("#picture-" + pictureId + " #author").val(response.result.author);
// $("#picture-" + pictureId + " #author-" + pictureId).val(response.result.author); $("#picture-" + pictureId + " #date_creation").val(response.result.date_creation); //TODO
// $("#picture-" + pictureId + " #date_creation-" + pictureId).val(response.result.date_creation); $("#picture-" + pictureId + " #description").val(response.result.comment);
// $("#picture-" + pictureId + " #description-" + pictureId).val(response.result.comment); $("#picture-" + pictureId + " #level").val(response.result.level);
// $("#picture-" + pictureId + " #level-" + pictureId).val(response.result.level); $("#picture-" + pictureId + " #filename").text(response.result.file);
// $("#picture-" + pictureId + " #filename-" + pictureId).text(response.result.file); $("#picture-" + pictureId + " #filesize").text(response.result.filesize);
// $("#picture-" + pictureId + " #filesize-" + pictureId).text(response.result.filesize); $("#picture-" + pictureId + " #dimensions").text(response.result.width + "x" + response.result.height);
// $("#picture-" + pictureId + " #dimensions-" + pictureId).text(response.result.width + "x" + response.result.height); // updateTags(response.result.tags, pictureId); //Yet to be implemented (TODO)
// updateTags(response.result.tags, pictureId); //Yet to be implemented showMetasyncSuccesBadge(pictureId);
// showMetasyncSuccesBadge(pictureId); enableLocalButton(pictureId);
// enableLocalButton(pictureId); enableGlobalButton();
// enableGlobalButton(); } else {
// } else { console.error("Error:", response.message);
// console.error("Error:", response.message); showErrorLocalBadge(pictureId);
// showErrorLocalBadge(pictureId); enableLocalButton(pictureId);
// enableLocalButton(pictureId); enableGlobalButton();
// enableGlobalButton(); }
// } },
// }, error: function(xhr, status, error) {
// error: function(xhr, status, error) { console.error("Error:", status, error);
// console.error("Error:", status, error); showErrorLocalBadge(pictureId);
// showErrorLocalBadge(pictureId); enableLocalButton(pictureId);
// enableLocalButton(pictureId); }
// } });
// }); }
// }
// TAGS UPDATE Yet to be implemented // TAGS UPDATE Yet to be implemented
// function updateTags(tagsData, pictureId) { // function updateTags(tagsData, pictureId) {
// const $tagsUpdate = $('#tags-'+pictureId).selectize({ // const $tagsUpdate = $('#tags-'+pictureId).selectize({
@@ -157,7 +157,7 @@ pluginValues = [];
<a class="icon-signal tiptip" href="{$element.U_HISTORY}" title="Visit history"></a> <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> <a target="_blank" class="icon-pencil tiptip" href="{$element.U_EDIT}" title="{'Edit photo'|@translate}"></a>
{if !url_is_remote($element.PATH)} {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> <a class="icon-trash tiptip action-delete-picture" title="{'delete photo'|@translate}"></a>
{/if} {/if}
</div> </div>