summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alexis Degrugillier <github@ainw.org> 2014-09-27 08:20:13 -0400
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-10-09 15:54:07 +0200
commite7c36d515286079491c5dd6d6db7cc87d47dd043 (patch)
tree8c64d6c0318730b35d8bc347df042137b5276210
parent2fc3068d1b796152f374cfba3528f4273ad37bce (diff)
Fix read all shortcut
Before, the read all shortcut raised a javascript exception when we use the confirmation option. The confirmation was not even displayed. The code was failling since there was a missing variable. Now, the shortcut ask for confirmation when the option is selected in the reading configuration page. The definition of the shortcut was buggy since the confirmation was handled properly in an other location. I simplified the code by removing the confirmation code in the shortcut.
-rw-r--r--p/scripts/main.js9
1 files changed, 1 insertions, 8 deletions
diff --git a/p/scripts/main.js b/p/scripts/main.js
index 9e39010bd..00cd96fbe 100644
--- a/p/scripts/main.js
+++ b/p/scripts/main.js
@@ -538,14 +538,7 @@ function init_shortcuts() {
});
shortcut.add("shift+" + shortcuts.mark_read, function () {
// on marque tout comme lu
- var btn = $(".nav_menu .read_all");
- if (btn.hasClass('confirm')) {
- if (confirm(str_confirmation)) {
- btn.click();
- }
- } else {
- btn.click();
- }
+ $(".nav_menu .read_all").click();
}, {
'disable_in_input': true
});