MyAlerts alteration

  • Welcome to "The New" Wrestling Smarks Forum!

    I see that you are not currently registered on our forum. It only takes a second, and you can even login with your Facebook! If you would like to register now, pease click here: Register

    Once registered please introduce yourself in our introduction thread which can be found here: Introduction Board


euantor

Jobber
Joined
Sep 10, 2012
Messages
151
Reaction score
16
Points
0
Age
31
Location
England
First of all, IDK if you're using the latest version of MyAlerts here or not. Second, I'll likely be adding this code snippet to the next version but I'd love to see it manually added here in the meantime. I can't believe I overlooked it.

https://github.com/euantor/MyAlerts/wiki/Closing-the-alerts-popup-when-clicking-outside
 

Crayo

The Boss
Joined
Dec 16, 2011
Messages
63,815
Reaction score
6,080
Points
1
Location
United Kingdom of Ambrose
Website
wweforums.net
CTRL + F5'd and it still doesn't close when I click off it. Though I believe I went to edit that file the same time Solidus did, so inb4 I've ruined something.
 

euantor

Jobber
Joined
Sep 10, 2012
Messages
151
Reaction score
16
Points
0
Age
31
Location
England
Nah. I posted the code ages back in the release thread but completely forgot about it till I got an alert here earlier.
 

Solidus1

eXit
Joined
Dec 25, 2011
Messages
15,712
Reaction score
4,672
Points
0
It is the latest version I think, only PluginLibrary is outdated.
Btw Crayo, I renamed all instances of 'alert' and 'alerts' to 'notification' and 'notifications'. I think you forgot that.
 

Crayo

The Boss
Joined
Dec 16, 2011
Messages
63,815
Reaction score
6,080
Points
1
Location
United Kingdom of Ambrose
Website
wweforums.net
Yeah we got all lazy. Thanks lol.

Btw, it's a little annoying if you mis-click on the down-down and it still closes. I think it should only click off if you click outside the drop-down, not if you click in it as well. Make sense or not?
 

euantor

Jobber
Joined
Sep 10, 2012
Messages
151
Reaction score
16
Points
0
Age
31
Location
England
It's probably up to date with the mods site. I pushed a few changes to GitHub to fix the issues you were experiencing here where when alerts were disabled people still received them though.

__________

Crayo said:
Yeah we got all lazy. Thanks lol.

Btw, it's a little annoying if you mis-click on the down-down and it still closes. I think it should only click off if you click outside the drop-down, not if you click in it as well. Make sense or not?

Ah, didn't think of that. Try adding this:

PHP:
$('.myalerts_popup > *').on('click', function(event) {
    event.stopPropagation();
});
 

Solidus1

eXit
Joined
Dec 25, 2011
Messages
15,712
Reaction score
4,672
Points
0
^ that works.
Also Crayo, I added settings next to 'View Notification', I read somewhere you wanted that.
 

euantor

Jobber
Joined
Sep 10, 2012
Messages
151
Reaction score
16
Points
0
Age
31
Location
England
Yeah, it isn't opening for me either. I may have bodged that code lol