diff options
| author | 2014-07-12 09:00:26 -0400 | |
|---|---|---|
| committer | 2014-07-12 09:00:26 -0400 | |
| commit | 32fca7c4e11a57d23df08f17363b28f8b552d34c (patch) | |
| tree | 476b5db961627de08d31dc27ec2b383b59c3be79 /p/scripts | |
| parent | 85bae5436c8cd2b3ff1b08c6ea031e6e99f0a0d6 (diff) | |
Add a confirmation when using shortcuts
Before, it was possible to mark everything as read with no confirmation using shortcut even if the configuration introduced in a previous commit asked for a confirmation.
Now, depending of the configuration, a confirm dialog box is displayed when requested in the configuration.
Diffstat (limited to 'p/scripts')
| -rw-r--r-- | p/scripts/main.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/p/scripts/main.js b/p/scripts/main.js index 243159ca5..9fdc67047 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -499,7 +499,13 @@ function init_shortcuts() { shortcut.add("shift+" + shortcuts.mark_read, function () { // on marque tout comme lu var url = $(".nav_menu a.read_all").attr("href"); - redirect(url, false); + if ($(".nav_menu a.read_all").hasClass('confirm')) { + if (confirm(str_confirmation)) { + redirect(url, false); + } + } else { + redirect(url, false); + } }, { 'disable_in_input': true }); |
