Confirmation before marking all posts as read August 01, 2015, 05:38:53 pm Is the second or third time that on mobile for mistake I press the button "mark all as read". There were 3 pages with unread topics What do you think about the idea to add a confirm first window? If I'm not wrong there was a mod for this on smf.
Re: Confirmation before marking all posts as read Reply #1 – August 01, 2015, 06:00:48 pm Liked, saw that I have it installed on my own forum, it works, posting the link: http://custom.simplemachines.org/mods/index.php?action=parse;mod=3786;attach=224880;smf_version=2.0.10 WTFPL license, code by margarett.Nuff said. P.S.: Cut off some fingers, your hands are too big, LOL.
Re: Confirmation before marking all posts as read Reply #2 – August 02, 2015, 05:15:51 am I thought it was there... O_oOh well, there is to add the confirmation string to a javascript variable and add some confirm all around the globe. BTW, while writing this I realized: why don't we add a wrapper around confirm? In the future it may be the place to store some nicer interface for the function. Opinions?
Re: Confirmation before marking all posts as read Reply #3 – August 02, 2015, 10:37:29 am It could either be browser-related or styled along with the forum. To be honest either way is fine, but I think that in 1.1 or something this might look "better" if it's styled So yeah, go with the wrapper.
Re: Confirmation before marking all posts as read Reply #4 – August 11, 2015, 05:40:20 pm Don't forget ♥
Re: Confirmation before marking all posts as read Reply #5 – August 11, 2015, 05:50:24 pm I tried, but I was not able to get it working... even on a simple textarea. LOL
Re: Confirmation before marking all posts as read Reply #6 – August 11, 2015, 05:54:17 pm Temporarily code it the easier way to push it in a release (maybe?), and retry after you get some sleep
Re: Confirmation before marking all posts as read Reply #7 – September 19, 2016, 06:01:36 pm Are there any news on this? Sorry if I insist, but from mobile it's very easy to press that button by mistake and mark all as read, just happened today and I had 3 pages of unread messages.
Re: Confirmation before marking all posts as read Reply #8 – September 20, 2016, 03:17:00 am I thought it was added a while ago... emanuele hidesIf you want a quick workaround for your site, open script_elk.js (themes/default/scripts) and replace the markboardreadButton function with:Code: [Select]function markboardreadButton(btn){ if (!confirm('Are you sure you want to mark all the messages in this board as read?')) return false; toggleButtonAJAX(btn); // Remove all the "new" icons next to the topics subjects $('.new_posts').remove(); return false;}ad the markallreadButton with:Code: [Select]function markallreadButton(btn){ if (!confirm('Are you sure you want to mark messages all as read?')) return false; toggleButtonAJAX(btn); // Remove all the "new" icons next to the topics subjects $('.new_posts').remove(); // Turn the board icon class to off $('.board_icon').each(function() { $(this).removeClass('on_board on2_board').addClass('off_board'); }); $('.board_new_posts').removeClass('board_new_posts'); return false;}Of course you can customize the message.
Re: Confirmation before marking all posts as read Reply #9 – September 20, 2016, 03:41:43 am I'll try this later, thank you Emanuele.
Re: Confirmation before marking all posts as read Reply #10 – September 21, 2016, 06:59:18 pm Thank you Emanuele, it works
Re: Confirmation before marking all posts as read Reply #11 – September 21, 2016, 07:25:25 pm I suggest we make it default in ElkArte core. It is always good to confirm.
Re: Confirmation before marking all posts as read Reply #12 – September 22, 2016, 06:32:39 pm Where I usually press the "Mark all as read" is in "New Posts" (index.php?action=unread)I suggest to also add the confirmation message for markunreadButton functionCode: [Select]function markunreadButton(btn){ if (!confirm('Are you sure .....?')) return false; toggleHeaderAJAX(btn, 'main_content_section'); return false;}Quote from: ahrasis – September 21, 2016, 07:25:25 pmI suggest we make it default in ElkArte core. It is always good to confirm.https://github.com/elkarte/Elkarte/issues/2690
Re: Confirmation before marking all posts as read Reply #13 – September 23, 2016, 07:30:48 am I lost track of all the "mark as read" we have! LOL
Re: Confirmation before marking all posts as read Reply #14 – September 23, 2016, 08:15:45 pm that a dev-ish way of saying "I forgot"?