PDA

View Full Version : Resolved Glossy Accordion Menu conflict with mootools in joomla 1.5



xtnct
03-26-2009, 12:27 PM
1) Script Title: Glossy Accordion Menu for Joomla1.5

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ddaccordionmenu-glossy.htm

3) Describe problem: mootools conflict with Glossy Accordion Menu- joomla 1.5 extension written by dynamicdrive:

I just realized I initially posted in the wrong forum (js). Sorry !!::D

I installed the plugin, and the module, on joomla 1.5 and it works, but it disables the mootool's viewer( the one that comes up with a semi-transparent black background and a white border which you clickout of ...). Instead, the mootools viewer goes straight to the img in a new window so you have to click on the back browser button (no other option).

Is there a way to fix this problem in the js files? I'm not a programmer so i would appreciate it if you could post the code here- Thanks !
Edit/Delete Message

Nile
03-26-2009, 03:32 PM
I've responded to your other post. Next time, instead of making a new thread. Edit your post saying something like:


Hey, I by accidentally posted this in the wrong forum. Can a mod please move it to the correct forum, and remove this edit. Thanks!

xtnct
03-26-2009, 05:21 PM
Thanks Nile. I looked at those links but I prefer the glossy menu.


I found this.

http://www.dynamicdrive.com/forums/showthread.php?t=40973

Will it work? If so, can you tell me how to change the files?

Nile
03-26-2009, 09:04 PM
Give it a try, follow the threads instructions.

xtnct
03-26-2009, 11:01 PM
I tried but apparently something not done right. :confused:




<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml2/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

<head>

<script type="text/javascript">

jQuery.noConflict();

// Put all your code in your document ready area
jQuery(document).ready(function($){


//Accordion Content script: By Dynamic Drive, at http://www.dynamicdrive.com
//Created: Jan 7th, 08'
//Version 1.3: April 3rd, 08':
//**1) Script now no longer conflicts with other JS frameworks
//**2) Adds custom oninit() and onopenclose() event handlers that fire when Accordion Content instance has initialized, plus whenever a header is opened/closed
//**3) Adds support for expanding header(s) using the URL parameter (ie: http://mysite.com/accordion.htm?headerclass=0,1)

//April 9th, 08': Fixed "defaultexpanded" setting not working when page first loads

//Version 1.4: June 4th, 08':
//**1) Added option to activate a header "mouseover" instead of the default "click"
//**2) Bug persistence not working when used with jquery 1.2.6

//Version 1.5: June 20th, 08':
//**1) Adds new "onemustopen:true/false" parameter, which lets you set whether at least one header should be open at all times (so never all closed).
//**2) Changed cookie path to site wide for persistence feature
//**3) Fixed bug so "expandedindices" parameter in oninit(headers, expandedindices) returns empty array [] instead of [-1] when no expanded headers found

//Version 1.5.1: June 27th, 08': Fixed "defaultexpanded" setting not working properly when used with jquery 1.2.6

var ddaccordion={

contentclassname:{}, //object to store corresponding contentclass name based on headerclass

expandone:function(headerclass, selected){ //PUBLIC function to expand a particular header
this.toggleone(headerclass, selected, "expand")
},


rest of the code.....................
.....................

$('.'+config["contentclass"]+":visible").each(function(index){ //get indices of expanded headers
expandedindices.push($(this).attr('contentindex'))
})
if (config.persiststate==true){ //persist state?
expandedindices=(expandedindices.length==0)? '-1c' : expandedindices //No contents expanded, indicate that with dummy '-1c' value?
ddaccordion.setCookie(config.headerclass, expandedindices)
}
})
})
}
}
ddaccordion.init({
headerclass: "submenuheader", //Shared CSS class name of headers group
contentclass: "submenu", //Shared CSS class name of contents group
revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click", "clickgo", or "mouseover"
mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
collapseprev: true, //Collapse previous content (so only one open at any time)? true/false
defaultexpanded: [], //index of content(s) open by default [index1, index2, etc] [] denotes no content
onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)
animatedefault: false, //Should contents open by default be animated into view?
persiststate: true, //persist state of opened contents within browser session?
toggleclass: ["", ""], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
togglehtml: ["suffix", "<img src='plus.gif' class='statusicon' />", "<img src='minus.gif' class='statusicon' />"], //Additional HTML added to the header when it's collapsed and expanded, respectively ["position", "html1", "html2"] (see docs)
animatespeed: "fast", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"
oninit:function(headers, expandedindices){ //custom code to run when headers have initalized
//do nothing
},
onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
//do nothing
}
})

});

Nile
03-26-2009, 11:04 PM
Hmm, well you can edit the mootools ones above to turn into glossy. Otherwhise you'll have to wait for someone else to respond.

xtnct
03-27-2009, 12:05 AM
Probably better to wait to sum up and see what works best. Hey, thanks anyway. :)

byleox
04-17-2009, 05:31 AM
Hi, I had the same problem with the glossy accordion menu, to fix the problem just edit the file ddaccordion.js.,

add the function: " jQuery.noConflict(); "

before: var ddaccordion={ (is the first instruccion)

Very simple. With this the accordion menu should work fine with the mootools library.


Salu2...

xtnct
04-23-2009, 02:54 PM
it worked!:D

thanks