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.. :-)

CommentFileSizeAuthor
beauty_tips_dialog_api_patch.patch507 bytesayalon

Comments

krlucas’s picture

I 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();

kleinmp’s picture

Version: 6.x-2.0 » 7.x-2.x-dev
kleinmp’s picture

Version: 7.x-2.x-dev » 6.x-2.x-dev

I added the patch into the d7 dev version.

kleinmp’s picture

Status: Active » Fixed

Committed fix to the 6.x-2.x-dev version

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.