Closed (outdated)
Project:
BeautyTips
Version:
7.x-2.0-beta1
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
16 Apr 2012 at 10:38 UTC
Updated:
11 Feb 2018 at 16:48 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Wolfgang Reszel commentedSorry, I don't know what I've done, but now it's working. ;-)
Comment #2
bobslee commentedFollowing I added also (duplicate) on drupal 6 issue
This works for me in Drupal 7...
Attached patch ensures the Drupal behaviors are registered for the BeautyTip.
Before using this version, be sure that you minify this to beautytips.min.js (e.g. via jscompress.com).
Be sure the behaviour's Javscript(file) is loaded, otherwise it won't work.
For example for the autocomplete JS:
In hook preprocess_page:
drupal_add_js('/misc/autocomplete.js');Comment #3
bobslee commentedAttached is a cumulative patch on files: beautytips.js, beautytips.min.js.
I stumbled on a related (2nd) problem.
With the previous patch:
After the page is loaded, then the behviours in the 1st shown BeautyTip (BT) work properly.
However when you close the 1st BT, then in the next shown BT's, the behviors aren't attached anymore.
The Attached patch deals with this.
It's a workaround.. so don't expect reliability!
The patch disables the ajaxCache (option).
Also, this patch is cumulative and contains the former patch as well.
Problem explanation:
The option ajaxCache is enabled by default.
So data won't be loaded again from the given Ajax path.
In this case:
- When BT gets hidden by btOff(), then BT DOM-object is stored in cache and removed.
- When BT gets shown, the DOM-object is added from the cache by btOn().
Then some Drupal behaviors, like autocomplete, won't get attached.
Maybe this could be an issue in (some) Drupal JS/behaviors modules, like autocomplete?
Or is it just how the DOM works?
Comment #4
bobslee commentedComment #5
pifagor commented