Advanced search  

News:

cpg1.5.46 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter recently discovered vulnerabilities. It is important that all users who run version cpg1.5.44 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Jquery no-conflict mode  (Read 17565 times)

0 Members and 1 Guest are viewing this topic.

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4456
    • Windsurf.me
Jquery no-conflict mode
« on: January 24, 2011, 11:34:24 pm »

I have tried with minimal success to fondle all the files in the js directory to enable the jquery no-conflict mode (http://api.jquery.com/jQuery.noConflict/) but I have struggled to get it right. As a stop gap I ended up doing loads of work replacing $ with jQuery just to get things working for a couple of users who had problems with bridged coppermine installs. These installs had problems as they were also using moo and in one instance a different version of Jquery. So all you js wizzards out there, how do we go about this because I am at a dead end?
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15369
Re: Jquery no-conflict mode
« Reply #1 on: January 25, 2011, 02:58:16 pm »

Unfortunately my JS skills are far away from being perfect, so I cannot help you very much with that issue.

And even more unfortunately this board cannot be accessed by guests (I currently haven't checked if 'regular' registered members can), so maybe we should move this thread? If almost nobody can read this thread, you probably won't get any response.
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4456
    • Windsurf.me
Re: Jquery no-conflict mode
« Reply #2 on: January 25, 2011, 06:50:16 pm »

Yeah, I was hoping some of our talented devs would pick up on it. I'll move this to the General Discussion area.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Joe Carver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1498
  • aka 'i-imagine'
    • Home Page
Re: Jquery no-conflict mode
« Reply #3 on: January 27, 2011, 12:50:34 am »

@ Phil,

You had a test site with the problem that now returns a 404...any chance you can put it back up?

I would be happy to take a look, although I am not very confidant in my .js skills....

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4456
    • Windsurf.me
Re: Jquery no-conflict mode
« Reply #4 on: January 27, 2011, 04:28:19 pm »

I'll get it up tonight and pm you ftp details.

Looking at it it doesn't have to be in the .js files, you can activate the no-conflict mode from the head of the document but I just cannot get it right. If you do it wrong it seems to disable all the js in coppermine. Something that should be simple seems to be a bit of a mare.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

David Stone

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Jquery no-conflict mode
« Reply #5 on: March 18, 2011, 04:35:24 pm »

I'm having the same problem. Can anyone help to solve it??
Logged
 *Link Removed*
 *Link Removed*

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4456
    • Windsurf.me
Re: Jquery no-conflict mode
« Reply #6 on: March 25, 2011, 05:27:03 pm »

I've had limited success. As previously said, my site is running but the .js files are heavilly modded to do so.

Using out of the box JS directory I have found that if I put the following code right after the {JAVASCRIPT} token in template.html then everything works excep the upload page. That is where I am currently stuck

Code: [Select]
<script type="text/javascript">
jQuery.noConflict();
</script>
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Felicitacon

  • Coppermine newbie
  • Country: 00
  • Offline Offline
  • Posts: 1
Re: Jquery no-conflict mode
« Reply #7 on: April 06, 2013, 09:17:16 pm »

The jQuery no conflict mode work like this :
When jQuery script is loaded, jQuery keeps a reference to the window.$ variable so it can restore this back when you call jQuery.noConflict().
To make it works, you must include jQuery after every other javascript framework like mootools.
Pages: [1]   Go Up
 

Page created in 0.04 seconds with 20 queries.