X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tpl%2Fdefault%2Fjs%2Fshaarli.js;h=cf628e87fc4f15e0b9d1c71a42b5e14994e613f1;hb=286757ab29660916f6b66d1fc0ad3b53aef337c8;hp=55656f80ea39032dd62b321cf6e707aa3e786868;hpb=c8d96b4729a96ff2321862ca13a727658860e7a5;p=github%2Fshaarli%2FShaarli.git diff --git a/tpl/default/js/shaarli.js b/tpl/default/js/shaarli.js index 55656f80..cf628e87 100644 --- a/tpl/default/js/shaarli.js +++ b/tpl/default/js/shaarli.js @@ -138,6 +138,9 @@ window.onload = function () { }); foldAllButton.firstElementChild.classList.toggle('fa-chevron-down'); foldAllButton.firstElementChild.classList.toggle('fa-chevron-up'); + foldAllButton.title = state === 'down' + ? document.getElementById('translation-fold-all').innerHTML + : document.getElementById('translation-expand-all').innerHTML }); }); } @@ -146,7 +149,7 @@ window.onload = function () { { // Switch fold/expand - up = fold if (button.classList.contains('fa-chevron-up')) { - button.title = 'Expand'; + button.title = document.getElementById('translation-expand').innerHTML; if (description != null) { description.style.display = 'none'; } @@ -155,7 +158,7 @@ window.onload = function () { } } else { - button.title = 'Fold'; + button.title = document.getElementById('translation-fold').innerHTML; if (description != null) { description.style.display = 'block'; } @@ -173,7 +176,7 @@ window.onload = function () { var deleteLinks = document.querySelectorAll('.confirm-delete'); [].forEach.call(deleteLinks, function(deleteLink) { deleteLink.addEventListener('click', function(event) { - if(! confirm('Are you sure you want to delete this link ?')) { + if(! confirm(document.getElementById('translation-delete-link').innerHTML)) { event.preventDefault(); } }); @@ -375,7 +378,7 @@ window.onload = function () { var linkCheckboxes = document.querySelectorAll('.delete-checkbox'); var bar = document.getElementById('actions'); [].forEach.call(linkCheckboxes, function(checkbox) { - checkbox.style.display = 'block'; + checkbox.style.display = 'inline-block'; checkbox.addEventListener('click', function(event) { var count = 0; var linkCheckedCheckboxes = document.querySelectorAll('.delete-checkbox:checked'); @@ -618,7 +621,7 @@ function activateFirefoxSocial(node) { // Keeping the data separated (ie. not in the DOM) so that it's maintainable and diffable. var data = { name: title, - description: "The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community.", + description: document.getElementById('translation-delete-link').innerHTML, author: "Shaarli", version: "1.0.0",