Hi,
i think this module is a great idea but it would be nice to not have to make another module to use it.
I had to use the tooltip plugin and created a custom input filter to trigger this. I didn't want to create a specific module just to do that, just needed to load the tooltip plugin once.
I also needed to integrate it in views fields, but didn't want to generate repetitive script code, so i thought it would be nice to add configuration for each plugins.
For the moment i just added :
- a "trigger class" for tooltip. This parameter allows several elements sharing a same class to be "tooltiped" (i.e. applied the tooltip() function). This actually adds a script at the end of the page with something like " jQuery('.mytriggerclass').tooltip()

- a default delay option to apply to the tooltip() function.

I'll try to post an upgrade of this patch with a form to create default options.
I also added a .test file, couldn't add it through the patch.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ben kuper’s picture

FileSize
2.27 KB

Oups, forgot the .test file

There is currently no .test file in the project, so patches won't be test by the drupal server.
I tested it on my dev site and it passed.

ben kuper’s picture

Ok, this now looks a bit more interesting...
I added an automation to be able to set as many options as we want for each enabled plugin. This is only used internally for the moment, by the Tooltip Auto Trigger for example.
I have to take a look at the other plugins to see what settings they need.

The jpg attachment show what the config page looks like. If you want the fields to display in columns, you'll have to enable the Multi-column checkboxes radios module. Otherwise, it'll be shown as a regular checkboxes form element (one item per row).

To see the use the tooltip plugin for example, you just have to create a page with content :

<div class="tooltip-link">My tooltip link</div>
<div style="display:none">My tooltip content</div>

Then in the JQ Plugin settings page, activate the tooltip plugin, then enter 'tooltip-link' in the tooltip trigger textfield. (The classname is at your convenience). the 'style="display:none"' is used to hide the field at the beginning, because the tooltip plugin won't take care of this before the link has been triggered once.
What's interesting now is you can add as many tooltip blocks like the above one as you want and don't need additionnal script inside your pages or views, or whatever.
Finally, you can add a bit of styling to your tooltips and you're good !

elgandoz’s picture

Est!
Est!!
Est !!!

MANY MANY THANKS FOR THIS, indeed!

jaxpax’s picture

You guys rocks! Javascript to the people! =)
A lot of the non-coders/administrators in the drupal community have asked for something like this, a simple but effective GUI for adding javascript to our divs, without the hustle of having to hack template files and what not. Plus, the patches making it posible to have a decent chans of having control over what's cooking and what's not.

Thank you, thank you, thank you!
-Patrik

joemoraca’s picture

I would like a UI to allow me to setup a horizontal accordion like this http://flowplayer.org/tools/demos/tabs/accordion-horizontal.html with the included tabs plugin. I have tried tabs and http://nicolahibbert.com/demo/liteAccordion/ plugin ... but alas I have weak JS skills... I need to read my Drupal 6 JavaScript and jQuery book.

EDIT .... OK RTFM and I am getting it to work (using D7) really love these JQuery plugins as well as all of the Drupal modules!!! Always a learning opportunity - but great functionality!!

Thanks everyone.

jaxpax’s picture

I have enabled tabs through the UI but it doesn't get loaded during page load. I also have tooltip enabled and everything works fine with that one. Any suggestions about what could be wrong?

RobLoach’s picture

Would Context module integration be a good idea? Add plugins based on certain contexts.

jaxpax’s picture

+1 @Rob Loach, and the genius proposition.

drupaljohngo’s picture

so, I am new to patching. Hate to be a bother. this is the error I received when trying at command line to patch the .info file
patch <1045402-jquery_ui.patch
patching file jquery_plugin.info
Hunk #1 FAILED at 3.
1 out of 1 hunk FAILED -- saving rejects to file jquery_plugin.info.rej
patching file jquery_plugin.module

I opened up the info.rej file in the file manager on my shared host and it looks the same as the patch.

Can I simply paste certain code into the .info file? If so, what code?
Actually, I didn't add the .test file.

Entire site crashed with out of memory errors after patching and updating the media beta5 module. Doing a restore and will try again.

drupaljohngo’s picture

So, what is the encoding for the .patch file ANSI?

Also do I need to edit .patch file if I apply the patch in the jQueryplugins folder?

I got rid of the + signs with notepad++ on the side of the document and the diff error is happening.

Do the paths need editing in the .patch file? I noticed yours is to /attic.

noob patchatron

maybe set the mimetype on my browser to download a .patch file and open it in notepad++
for windows?

ah must be wrong version two. I'll install the dev version of the plug-in