solved Error messages

alt=
DannyA
@dannya
10 years ago
584 posts
Is there a way to have messages pop up (alerts) instead of appearing at the top of the page?
updated by @dannya: 12/01/14 11:41:52PM
brian
@brian
10 years ago
10,148 posts
andersda:
Is there a way to have messages pop up (alerts) instead of appearing at the top of the page?

You would have to customize the core Javascript (as well as probably the individual module Javascript files) and customize the jrCoreFormSubmit() JS function - found in the modules/jrCore/js/jrCore.js.

The long term goal is actually the opposite - ensure there are NO alerts any where in the code, so just an FYI that long term we'll be moving away from alerts.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
alt=
DannyA
@dannya
10 years ago
584 posts
What is the reasoning for that? What is the alternative if there is a problem submitting a form?
brian
@brian
10 years ago
10,148 posts
andersda:
What is the reasoning for that? What is the alternative if there is a problem submitting a form?

I'm not sure what you mean - if there is a problem submitting the form (i.e. one of the values is incorrect) then a nice error message is shown. If the server is actually down for some reason, then right now it is an alert message, but long term any alerts will be transition to in-page error messages that look the same as any other error message.

This is done for UI consistency and user experience.

Let me know that helps.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
alt=
DannyA
@dannya
10 years ago
584 posts
I thought we wanted to avoid modifying core files? Won't this break every time we update jamroom core? Is there a way to modify core files without breaking update?
brian
@brian
10 years ago
10,148 posts
DannyA:
I thought we wanted to avoid modifying core files? Won't this break every time we update jamroom core? Is there a way to modify core files without breaking update?

Copy the modules/jrCore/js/jrCore.js to skins/yourskin/js/jrCore_jrCore.js and modify it - that way it is not overwritten when you upgrade.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
nate
@nate
10 years ago
917 posts
This is not overriding the jrCore.js in the jrCore module. It's doing nothing. I follow the above instructions by adding the new file and modifying it, but nothing happened.
brian
@brian
10 years ago
10,148 posts
Natedogg265:
This is not overriding the jrCore.js in the jrCore module. It's doing nothing. I follow the above instructions by adding the new file and modifying it, but nothing happened.

What version of the jrCore are you running?


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
nate
@nate
10 years ago
917 posts
I was able to just override the function by adding new js file and copying and rewriting the jrFormMessages(msg_id,_msg) function.

It's working perfectly.
brian
@brian
10 years ago
10,148 posts
Natedogg265:
I was able to just override the function by adding new js file and copying and rewriting the jrFormMessages(msg_id,_msg) function.

It's working perfectly.

Glad to hear it - thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

Tags