Closed (fixed)
Project:
BeautyTips
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Feb 2011 at 08:42 UTC
Updated:
12 Jan 2012 at 23:10 UTC
I'm using the dialog box module to display the comment form in a jquery dialog.
If javascript aggregation is on, the save buttons are not displayed in the dialog form.
If found out, that BeatuyTips generates a javascript error because ChaosTools loads the aggregated Javascript via AJAX for displaying the dialog form.
In the this function
Drupal.behaviors.beautytips = function() {}
there is the error jQuery.bt is not defined, because it's only a AJAX page load and not the whole page. The jquery plugin is missing and also not necessary.
I added a check in the function and the dialog box works now as expected:
Drupal.behaviors.beautytips = function() {
//Fix Dialog Box
if(typeof(jQuery.bt) == 'undefined' && jQuery.bt == null){
return;
}
jQuery.bt.options.closeWhenOthersOpen = true;
beautytips = Drupal.settings.beautytips;
Maybe someone can save some debugging hours.. :-)
| Comment | File | Size | Author |
|---|---|---|---|
| beauty_tips_dialog_api_patch.patch | 507 bytes | ayalon |
Comments
Comment #1
krlucas commentedI can confirm that this is an issue as well. I don't think this module can always assume that the BeautyTips plug-in will be attached to the jQuery object whenever any other module calles Drupal.attachBehaviors();
Comment #2
kleinmp commentedComment #3
kleinmp commentedI added the patch into the d7 dev version.
Comment #4
kleinmp commentedCommitted fix to the 6.x-2.x-dev version