Admin 2.x seems to try to embed itself in modalframe popups of the Node Relationship module (a very important module if you use Node Relationships).

Admin bar has nothing to do in a popup and should not enable itself.

I tried to create a patch, but honestly could not figure-out how to best disable admin. However I do have Javascript logic (tested - works) for detecting when code is executed in a Modalframe, so hopefully this helps as well:

  if ($(".modalframe-page-wrapper").length > 0) {
     $(document.body).removeClass('admin-expanded');
     $(document.body).removeClass('admin-nw');
     $(document.body).removeClass('admin-vertical');
     $('#admin-toolbar').css('display', 'none');
  }

Obviously, this is not the best way to address the problem, but that's all I could master in a short time.

Thanks.

Comments

yhahn’s picture

Category: bug » task

Please take a look at hook_suppress() that is implemented by admin and admin_menu. sun encourages the use of this hook (and I think it is a good idea as well) in modules that generate things like popup output.

Here is the commit where it was added to admin:

http://drupalcode.org/viewvc/drupal/contributions/modules/admin/admin.mo...

Having node relationships simply call module_invoke_all('suppress') in its popup callback should do the trick.

irakli’s picture

Thanks a lot, Young!

I will open an issue in their queue and ask them to do that, then.

irakli’s picture

Status: Active » Fixed
irakli’s picture

Status: Fixed » Active

And here's the issue, for tracking: http://drupal.org/node/732820

It's opened in Modalframe, the popup API that Node Relationships use.

irakli’s picture

Status: Active » Fixed

Fixed with the commit to CVS in modalframe http://drupal.org/cvs?commit=338220 (and available in the dev release of ModalFrame).

Status: Fixed » Closed (fixed)

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