aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2020-11-05 16:58:24 +0100
committerGitHub <noreply@github.com>2020-11-05 16:58:24 +0100
commita5a4fb17930d82827d833ddf54b972581ec140ff (patch)
tree355f1b7591c272d88f3a7b86c8a4d3d001aebba9
parent8bbf57a2d0dfe8d8d6416a26f9ff1177c77e806b (diff)
parent5f987a64d88e0c1bb0da8bde9050e3409879cbda (diff)
downloadShaarli-a5a4fb17930d82827d833ddf54b972581ec140ff.tar.gz
Shaarli-a5a4fb17930d82827d833ddf54b972581ec140ff.tar.zst
Shaarli-a5a4fb17930d82827d833ddf54b972581ec140ff.zip
Merge pull request #1625 from ArthurHoaro/fix/delete-confirm-popup
Fix confirm popup before bookmark deletion
-rw-r--r--assets/default/js/base.js3
-rw-r--r--inc/languages/fr/LC_MESSAGES/shaarli.po21
-rw-r--r--tpl/default/changetag.html3
-rw-r--r--tpl/default/page.footer.html5
4 files changed, 20 insertions, 12 deletions
diff --git a/assets/default/js/base.js b/assets/default/js/base.js
index 4163577d..66badfb2 100644
--- a/assets/default/js/base.js
+++ b/assets/default/js/base.js
@@ -294,7 +294,8 @@ function init(description) {
294 const deleteLinks = document.querySelectorAll('.confirm-delete'); 294 const deleteLinks = document.querySelectorAll('.confirm-delete');
295 [...deleteLinks].forEach((deleteLink) => { 295 [...deleteLinks].forEach((deleteLink) => {
296 deleteLink.addEventListener('click', (event) => { 296 deleteLink.addEventListener('click', (event) => {
297 if (!confirm(document.getElementById('translation-delete-tag').innerHTML)) { 297 const type = event.currentTarget.getAttribute('data-type') || 'link';
298 if (!confirm(document.getElementById(`translation-delete-${type}`).innerHTML)) {
298 event.preventDefault(); 299 event.preventDefault();
299 } 300 }
300 }); 301 });
diff --git a/inc/languages/fr/LC_MESSAGES/shaarli.po b/inc/languages/fr/LC_MESSAGES/shaarli.po
index d5b01227..4c363fa8 100644
--- a/inc/languages/fr/LC_MESSAGES/shaarli.po
+++ b/inc/languages/fr/LC_MESSAGES/shaarli.po
@@ -1,8 +1,8 @@
1msgid "" 1msgid ""
2msgstr "" 2msgstr ""
3"Project-Id-Version: Shaarli\n" 3"Project-Id-Version: Shaarli\n"
4"POT-Creation-Date: 2020-11-03 11:51+0100\n" 4"POT-Creation-Date: 2020-11-05 16:47+0100\n"
5"PO-Revision-Date: 2020-11-03 11:55+0100\n" 5"PO-Revision-Date: 2020-11-05 16:48+0100\n"
6"Last-Translator: \n" 6"Last-Translator: \n"
7"Language-Team: Shaarli\n" 7"Language-Team: Shaarli\n"
8"Language: fr_FR\n" 8"Language: fr_FR\n"
@@ -189,9 +189,9 @@ msgstr ""
189#: application/bookmark/BookmarkInitializer.php:91 189#: application/bookmark/BookmarkInitializer.php:91
190#: application/legacy/LegacyLinkDB.php:246 190#: application/legacy/LegacyLinkDB.php:246
191#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:15 191#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:15
192#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:49 192#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:50
193#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:15 193#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:15
194#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:49 194#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:50
195msgid "" 195msgid ""
196"The personal, minimalist, super-fast, database free, bookmarking service" 196"The personal, minimalist, super-fast, database free, bookmarking service"
197msgstr "" 197msgstr ""
@@ -1017,11 +1017,11 @@ msgstr "Renommer le tag"
1017msgid "Delete tag" 1017msgid "Delete tag"
1018msgstr "Supprimer le tag" 1018msgstr "Supprimer le tag"
1019 1019
1020#: tmp/changetag.b91ef64efc3688266305ea9b42e5017e.rtpl.php:39 1020#: tmp/changetag.b91ef64efc3688266305ea9b42e5017e.rtpl.php:40
1021msgid "You can also edit tags in the" 1021msgid "You can also edit tags in the"
1022msgstr "Vous pouvez aussi modifier les tags dans la" 1022msgstr "Vous pouvez aussi modifier les tags dans la"
1023 1023
1024#: tmp/changetag.b91ef64efc3688266305ea9b42e5017e.rtpl.php:39 1024#: tmp/changetag.b91ef64efc3688266305ea9b42e5017e.rtpl.php:40
1025msgid "tag list" 1025msgid "tag list"
1026msgstr "liste des tags" 1026msgstr "liste des tags"
1027 1027
@@ -1502,9 +1502,9 @@ msgid "Remember me"
1502msgstr "Rester connecté" 1502msgstr "Rester connecté"
1503 1503
1504#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:15 1504#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:15
1505#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:49 1505#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:50
1506#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:15 1506#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:15
1507#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:49 1507#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:50
1508msgid "by the Shaarli community" 1508msgid "by the Shaarli community"
1509msgstr "par la communauté Shaarli" 1509msgstr "par la communauté Shaarli"
1510 1510
@@ -1525,6 +1525,11 @@ msgstr "Déplier tout"
1525 1525
1526#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:47 1526#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:47
1527#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:47 1527#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:47
1528msgid "Are you sure you want to delete this link?"
1529msgstr "Êtes-vous sûr de vouloir supprimer ce lien ?"
1530
1531#: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:48
1532#: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:48
1528msgid "Are you sure you want to delete this tag?" 1533msgid "Are you sure you want to delete this tag?"
1529msgstr "Êtes-vous sûr de vouloir supprimer ce tag ?" 1534msgstr "Êtes-vous sûr de vouloir supprimer ce tag ?"
1530 1535
diff --git a/tpl/default/changetag.html b/tpl/default/changetag.html
index 89d08e2c..a5fbd31e 100644
--- a/tpl/default/changetag.html
+++ b/tpl/default/changetag.html
@@ -28,7 +28,8 @@
28 <input type="hidden" name="token" value="{$token}"> 28 <input type="hidden" name="token" value="{$token}">
29 <div> 29 <div>
30 <input type="submit" value="{'Rename tag'|t}" name="renametag"> 30 <input type="submit" value="{'Rename tag'|t}" name="renametag">
31 <input type="submit" value="{'Delete tag'|t}" name="deletetag" class="button button-red confirm-delete"> 31 <input type="submit" value="{'Delete tag'|t}" name="deletetag"
32 class="button button-red confirm-delete" data-type="tag">
32 </div> 33 </div>
33 </form> 34 </form>
34 35
diff --git a/tpl/default/page.footer.html b/tpl/default/page.footer.html
index c153def0..964ffff1 100644
--- a/tpl/default/page.footer.html
+++ b/tpl/default/page.footer.html
@@ -28,12 +28,13 @@
28 <script src="{$root_path}/{$value}#"></script> 28 <script src="{$root_path}/{$value}#"></script>
29{/loop} 29{/loop}
30 30
31<div id="js-translations" class="hidden"> 31<div id="js-translations" class="hidden" aria-hidden="true">
32 <span id="translation-fold">{'Fold'|t}</span> 32 <span id="translation-fold">{'Fold'|t}</span>
33 <span id="translation-fold-all">{'Fold all'|t}</span> 33 <span id="translation-fold-all">{'Fold all'|t}</span>
34 <span id="translation-expand">{'Expand'|t}</span> 34 <span id="translation-expand">{'Expand'|t}</span>
35 <span id="translation-expand-all">{'Expand all'|t}</span> 35 <span id="translation-expand-all">{'Expand all'|t}</span>
36 <span id="translation-delete-link">{'Are you sure you want to delete this tag?'|t}</span> 36 <span id="translation-delete-link">{'Are you sure you want to delete this link?'|t}</span>
37 <span id="translation-delete-tag">{'Are you sure you want to delete this tag?'|t}</span>
37 <span id="translation-shaarli-desc"> 38 <span id="translation-shaarli-desc">
38 {'The personal, minimalist, super-fast, database free, bookmarking service'|t} {'by the Shaarli community'|t} 39 {'The personal, minimalist, super-fast, database free, bookmarking service'|t} {'by the Shaarli community'|t}
39 </span> 40 </span>