Closed (fixed)
Project:
Collapsiblock
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Aug 2010 at 19:30 UTC
Updated:
1 May 2011 at 23:31 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
nedjoI think it would be good to remove the dependency on Javascript Tools for D7. I don't want to post a D7 version of Javascript Tools, mainly because over 7,000 sites are running the module and I can only assume they're doing so in error, having upgraded from D5 where it was used and thinking, I guess I need the D6 version.
Comment #2
gagarine commentedI will remove the Javascript Tools dependency also on D6. So I can keep the same base code...
It's now only used for managing cookie.
Two possibilities:
* create my own code for cookie
* switch to http://drupal.org/project/jquery_plugin
EDIT apparently jquery.cookie is in the core for D7 http://drupal.org/node/507072 NICE!
Comment #3
avo_liao commentedsubscribing. I will be testing and will let you know of any issue
Comment #4
gagarine commentedThanks it's always nice to have tester.
I will try to find some hours to port this project asap (around the next 2 weeks).
Comment #5
Anonymous (not verified) commentedsubscribing and I could help u testing it as well
Comment #6
Anonymous (not verified) commentedI'm attaching an improved collapsiblock.js file. This one works.
Changes include:
In D7, all your js must be wrapped inside
And behaviors are set like this:
Then finally in collapsiblock.module we save on submit:
This doesn't work, because values can_be_like_this_with_underscores, while the CSS classes allways-have-hyphens. So the jQuery selectord fails to find its targets.
Solution in collapsiblock.module, do a str_replace:
(This is needed in more than one place!)
Then we need to add a check to remove an unwanted PHP notice error:
And finally, after it works 1x, there is an error in the javscript cookie, parseJson function does not exist.
It should be:
$.parseJSON instead of Drupal.parseJson.
Now it works again in D7. Full improved package attached. I dont know yet how to work with GIT; so couldnt make a patch.
There is one more error though, a conflict with Google Analytics code. Can'T figure that out.
Comment #7
Anonymous (not verified) commentedComment #8
Anonymous (not verified) commentedPatches attached.
Comment #9
jamsilver commentedI've rerolled the above work following the standard procedure for making patches in Git. See attached.
Comment #10
jamsilver commentedgetting rid of tags.
Comment #11
jamsilver commentedActually - I'll roll the patch getting rid of the debug javascript at the top of the file too.
Comment #12
jamsilver commentedAnd without prefixes for those using drush make
Comment #13
tonycpsu commentedSubscribing
Comment #14
hawaiihasse commentedSubscribing
Comment #15
gagarine commentedI just commit the patch #12 after some quick test. Big thanks to jamsilver and morningtime for them work. If you see any bug please open a new issue.
I think we can really soon release a stable version for D7.