FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » FUDforum Suggestions » JQuery & Conflicts
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
JQuery & Conflicts [message #165374] Thu, 09 June 2011 14:08 Go to next message
Dayo is currently offline  Dayo   
Messages: 101
Registered: April 2011
Karma: 0
Senior Member
Noticed JQuery UI has been added to the svn version.

Just want to remind the devs to kindly try make sure all calls to JQuery use "jQuery" and not "$" to avoid conflict issues with other libraries.

Thanks

[Updated on: Fri, 10 June 2011 06:37]

Report message to a moderator

Re: JQuery & Conflicts [message #165381 is a reply to message #165374] Fri, 10 June 2011 03:13 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Can you maybe prepare a patch for us?

PS: Let me know if you need SVN commit access.
Re: JQuery & Conflicts [message #165382 is a reply to message #165374] Fri, 10 June 2011 03:31 Go to previous messageGo to next message
Dayo is currently offline  Dayo   
Messages: 101
Registered: April 2011
Karma: 0
Senior Member
Possibly. I just returned home from a series of long work trips and have quite a few things to catch up with first.

In any case, the main thrust of my post was a reminder on NEW js code being written not so much on changing existing ones.

So please, when you write NEW js stuff, consider interoperability issues:
- use "JQuery" instead of "$". Existing "$" code can be changed/patched in due course.
- Centralise and don't leave stuff scattered all over the place.

Thanks!

PS: Should have not used "don't leave stuff scattered all over the place". Meant more like "don't repeat code in separate files".

Cheers and keep up the work!

[Updated on: Fri, 10 June 2011 03:50]

Report message to a moderator

Re: JQuery & Conflicts [message #165383 is a reply to message #165382] Fri, 10 June 2011 03:52 Go to previous messageGo to next message
Dayo is currently offline  Dayo   
Messages: 101
Registered: April 2011
Karma: 0
Senior Member
On commit access, probably best to pass my suggestions to you for your review.
Re: JQuery & Conflicts [message #165384 is a reply to message #165383] Fri, 10 June 2011 06:35 Go to previous messageGo to next message
Dayo is currently offline  Dayo   
Messages: 101
Registered: April 2011
Karma: 0
Senior Member
I whizzed through the code and made the changes.

Diff file attached.
JQueryFix.diff

[Updated on: Fri, 10 June 2011 09:12]

Report message to a moderator

Re: JQuery & Conflicts [message #165385 is a reply to message #165384] Fri, 10 June 2011 06:50 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
This won't be necessary, and may even cause problems:
-<script type="text/javascript" src="js/jquery.js"></script>
+<script type="text/javascript" src="js/jQuery.js"></script>


Where does this come from?
- 163983ajax({
- // 164220SyntaxHighlighter.init();
Etc.

What is your SourceForge account (I need your account to grant you access)?
Re: JQuery & Conflicts [message #165386 is a reply to message #165385] Fri, 10 June 2011 06:53 Go to previous messageGo to next message
Dayo is currently offline  Dayo   
Messages: 101
Registered: April 2011
Karma: 0
Senior Member
Botched a find and replace earlier. Those should be "$."

[Updated on: Fri, 10 June 2011 06:53]

Report message to a moderator

Re: JQuery & Conflicts [message #165387 is a reply to message #165385] Fri, 10 June 2011 06:54 Go to previous messageGo to next message
Dayo is currently offline  Dayo   
Messages: 101
Registered: April 2011
Karma: 0
Senior Member
naudefj wrote on Fri, 10 June 2011 09:50
This won't be necessary, and may even cause problems:
-<script type="text/javascript" src="js/jquery.js"></script>
+<script type="text/javascript" src="js/jQuery.js"></script>



It would indeed.

That should have been skipped.
Re: JQuery & Conflicts [message #165388 is a reply to message #165387] Fri, 10 June 2011 06:59 Go to previous messageGo to next message
Dayo is currently offline  Dayo   
Messages: 101
Registered: April 2011
Karma: 0
Senior Member
Please review this instead

JQueryFix-2

[Updated on: Fri, 10 June 2011 09:12]

Report message to a moderator

Re: JQuery & Conflicts [message #165389 is a reply to message #165387] Fri, 10 June 2011 07:00 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
You have SVN commit access.
Please fix the patch and commit.
Re: JQuery & Conflicts [message #165390 is a reply to message #165389] Fri, 10 June 2011 09:11 Go to previous messageGo to next message
Dayo is currently offline  Dayo   
Messages: 101
Registered: April 2011
Karma: 0
Senior Member
Can't authenticate with my user name and password.

Attached the fixed patch as v3.


Re: JQuery & Conflicts [message #165391 is a reply to message #165390] Sat, 11 June 2011 05:32 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Are you https://sourceforge.net/users/dayo ?
Can't you reset your password on sourceforge.net?

Let me know if I need to commit it for your.
Re: JQuery & Conflicts [message #165395 is a reply to message #165391] Sat, 11 June 2011 07:01 Go to previous messageGo to next message
Dayo is currently offline  Dayo   
Messages: 101
Registered: April 2011
Karma: 0
Senior Member
naudefj wrote on Sat, 11 June 2011 08:32
Are you https://sourceforge.net/users/dayo ?


That'll explain it. That's not me. My SF Id.

I was wondering how you would have know my Id but thought I might have mentioned it before.

Anyway, please do the commit and we can look at me committing stuff later.

[Updated on: Sat, 11 June 2011 07:02]

Report message to a moderator

Re: JQuery & Conflicts [message #165396 is a reply to message #165395] Sat, 11 June 2011 07:18 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Problem fixed! Too many assumptions on my part Smile

I'll commit it later today.

Regards.

Frank
Re: JQuery & Conflicts [message #165397 is a reply to message #165396] Sat, 11 June 2011 08:27 Go to previous messageGo to next message
Dayo is currently offline  Dayo   
Messages: 101
Registered: April 2011
Karma: 0
Senior Member
Did the commit. Missed out some files each time so had to have three bites to complete it.
Re: JQuery & Conflicts [message #165399 is a reply to message #165397] Sat, 11 June 2011 09:47 Go to previous message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Great, thanks!

Feel free to also update FUDforum 3.0.3 and/or the CREDITS file.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Allow anonymous voting in [some] polls
Next Topic: Rank Manager exclusions
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat May 18 07:06:45 GMT 2024

Total time taken to generate the page: 0.02136 seconds