Closed (fixed)
Project:
Admin
Version:
6.x-2.0-beta2
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
4 Mar 2010 at 04:06 UTC
Updated:
22 Apr 2010 at 17:20 UTC
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
Comment #1
yhahn commentedPlease 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.Comment #2
irakli commentedThanks a lot, Young!
I will open an issue in their queue and ask them to do that, then.
Comment #3
irakli commentedComment #4
irakli commentedAnd here's the issue, for tracking: http://drupal.org/node/732820
It's opened in Modalframe, the popup API that Node Relationships use.
Comment #5
irakli commentedFixed with the commit to CVS in modalframe http://drupal.org/cvs?commit=338220 (and available in the dev release of ModalFrame).