This patch adds a .module and .info file for a jQuery cookie module. A central place for other modules to call/add jquery.cookie.js to a page. It, also, contains a help page explaining the module usage.

CommentFileSizeAuthor
jstools-jquery_cookie.patch3.67 KBmfer

Comments

yched’s picture

Status: Active » Needs review

Isn't the jquery.cookie.js file missing ?
+ setting to 'patch needs review'

mfer’s picture

the jquery.cookie.js is already part of the module.

nedjo’s picture

Thanks for the post.

In general, I think there needs to be more than just adding a file to justify a separate module. That's why I've (so far) included the cookie straight in jstools rather than putting it in its own module. Unlike, e.g., tabs, where we do need additional PHP methods as well as custom js and css.

Documentation is great, but is needed for developers rather than site users. Could you redo this as a readme file?

Do you foresee a need for doing more than just adding the file?

mfer’s picture

I can redo as a readme.

I think there needs to be a function that calls the jquery.cookie.js. Something that is documented as being the common way to do that so other modules will commonly use it and so that it's only called once and from the same place. Kinda like the jquery interface module.

ray007’s picture

I don't think it makes sense to have a drupal module for each jquery-plugin.
Maybe we need a jquery-manager, where one can drop in plugin-files and offer an api for other modules to load selected plugins?
Maybe even versioned?
Maybe with a plugin-installer, if the plugin-directory is writeable for the webserver?

Hmm, just throwing out ideas ...

mfer’s picture

We need one place for the plugins. They are getting used more and more. The problem is already starting to creep in when more than one module uses a jquery plugin and the same plugin is loaded on the same page. This is happening.

The question is, how do we handle this?

If there is a jquery plugins directory that is writable it will only be in the /files directory.

Maybe the solution is to create a jquery plugin module that is a central place for all jquery plugins. Or, a separate module for each plugin.

nedjo’s picture

ray007’s picture

Unfortunately both discussions seems to be rather quite now ...
And I hope drupal moves to jquery 1.1 soon.

mfer’s picture

@nedjo - I agree with the path you are taking for the jquery module. We need to be more user friendly in that manner. If the time comes where that goes forward and you need a co-maintainer of that module sign me up. The more I write with jquery the more I see a need for this.

maybe it's time to bring this issue to light again...

ray007’s picture

Yes, I'm willing to help there too if you want.

nedjo’s picture

Status: Needs review » Closed (fixed)

Version no longer maintained.