Skip to content

Commit

Permalink
EXIF settings message changed
Browse files Browse the repository at this point in the history
  • Loading branch information
UksusoFF committed Dec 23, 2019
1 parent 52bdfe4 commit ebce9f4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
17 changes: 12 additions & 5 deletions resources/scripts/admin/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,16 @@ $(document).ready(function() {

var WARNING_MESSAGE = 'Are you sure?\nThis operation can\'t be undone.';

function facesShowMessage(message) {
function facesShowMessage(response) {
var readmore = response.hasOwnProperty('link')
? ' <a href="' + response.link + '" target="_blank">Read more...</a>'
: '';
$page.find('.alert').remove();
$page.prepend('<div class="alert alert-info alert-dismissible">' + message + '<span class="close" data-dismiss="alert">&times;</span></div>');
$page.prepend(
'<div class="alert alert-info alert-dismissible">' +
response.message + readmore +
'<span class="close" data-dismiss="alert">&times;</span></div>'
);
}

$table.dataTable({
Expand Down Expand Up @@ -40,7 +47,7 @@ $(document).ready(function() {
$.ajax({
url: $(this).data('url')
}).done(function(response) {
facesShowMessage(response.message);
facesShowMessage(response);
$table.DataTable().ajax.reload();
});
}
Expand All @@ -52,7 +59,7 @@ $(document).ready(function() {
$.ajax({
url: $(this).data('url')
}).done(function(response) {
facesShowMessage(response.message);
facesShowMessage(response);
});
});

Expand All @@ -65,7 +72,7 @@ $(document).ready(function() {
$.ajax({
url: $(this).data('url')
}).done(function(response) {
facesShowMessage(response.message);
facesShowMessage(response);
$table.DataTable().ajax.reload();
});
}
Expand Down
3 changes: 2 additions & 1 deletion src/Http/Controllers/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ private function settingExif(): Response

return response([
'success' => true,
'message' => "Read data from exif was {$state}.",
'message' => "Read data from EXIF tag was {$state}.",
'link' => 'https://github.com/UksusoFF/webtrees-faces#google-picasa',
]);
}

Expand Down

0 comments on commit ebce9f4

Please sign in to comment.