mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-07-28 07:47:18 -04:00
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.
This commit is contained in:
@@ -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
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user