For D7 I wrote a script that handles fixed positioned elements: misc/displace.js. Now I tried to use this script for other toolbars then the one in core, in this case the admin_menu.

I found out that admin_menu allows configuring the positioning of its toolbar (fixed or absolute). Therefor I added support for both absolute and fixed positioned elements to displace.js #787940: Generic approach for position:fixed elements like Toolbar, tableHeader. Note that displace.js makes it possible to use multiple toolbars and other displaced elements at once.

Latest patch in #787940: Generic approach for position:fixed elements like Toolbar, tableHeader also takes anchors and keyboard-navigation into account (also see #800270: Anchor/focus hidden beneath toolbar/tableheader (CKEditor full screen menu)).

Only thing left (or at least what I can come up with) is displacing background-images, like is being discussed in an admin_menu issue: #428844: Use JS to adjust layout (a fix for all margin/absolute/background problems). I'd like to include that into displace.js also (not part of this issue though).

Note that current displace.js isn't totally sufficient for attached patch. To test it fully also apply latest patch from #787940: Generic approach for position:fixed elements like Toolbar, tableHeader.

CommentFileSizeAuthor
admin_menu-displace.patch9.55 KBcasey
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

klonos’s picture

Looking for a solution to having admin_menu and also being able to view 'sticky' table headers without them 'being hidden' behind the admin menu...

I've manually applied the patch here + the patch in post #88 from #787940: Generic approach for position:fixed elements like Toolbar, tableHeader and tested in Bartik with overlay and core toolbar disabled (I did apply the patch portions concerning both of these though). Here is what I have to report the following:

- The admin menu shows on top of the page while 'Keep menu at top of page' setting is disabled and doesn't have the default 'sticky' behavior.

- Scrolling down in pages with tables that have sticky headers (I've tested modules page, permissions page + a few others from contrib modules) does generate a second set of headers that stay on top of the page, but they are displaced a few pixels down. This is actually a good thing because they are displaced enough to fit the admin_menu toolbar - if it actually stayed 'sticky'.

- In every page with another 'sticky' element I see what Mike reports in post #90 over at #787940: Generic approach for position:fixed elements like Toolbar, tableHeader, but may I add/emphasize that it only happens in pages that have other displaced elements.

- Enabling the 'Keep menu at top of page' setting makes all pages have that gap on top - no matter if there are other 'sticky' elements in the page or not.

Like I said: no tests were performed with the admin overlay enabled and/or the core admin toolbar, so I cannot say how it works with these.

JSCSJSCS’s picture

I am using Omega Theme (tried Several) and 7.x-3.x-RC1. At first I thought the "Adjust top margin" had not effect. Then I shut down and restarted the browser (clwearing cache alone did nto seem to fix it).

I di find that the setting moved all content and images in the tag. I use backgrounds in the tag too, but those are not adjusted by this setting, which makes the pages look a bit odd indeed.

pillarsdotnet’s picture

Status: Needs review » Needs work

The last submitted patch, admin_menu-displace.patch, failed testing.

klonos’s picture

...bumping.

Elijah Lynn’s picture

I am also having this issue with Omega and Toolbar Style. 7.x-3.0-rc3

truls1502’s picture

Issue summary: View changes
Status: Needs work » Postponed (maintainer needs more info)
Issue tags: +postponed2w

I am sorry for no reply until now.

There are many issues regarding this module admin_menu which is a bit difficult for us to follow up since some of the issues might be already outdated, or is already fixed by the module or any other modules or itself core which means that the problem might no longer need to be fixed.

We can see that the issue has been created for a few years ago, I hope it is okay for you that I am postponing the issue, and give you around two weeks. If you still face the problem, could you tell us the step by step when until you get the error message or what is frustrated you, and a list of modules you are using related to admin_menu and a screenshot that might help us? So it makes us easier to reproduce your issue.

However, after two weeks with no feedback - we will close this issue. So in case, you noticed it after the issue is closed, do not hesitate to reopen it like and fill information which is mentioned above.

So before giving us a feedback, do you mind to test it again with our latest 7.x-3.x-dev?

Thank you for understanding! :)

truls1502’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)
Issue tags: -postponed2w

This issue has been automatically marked as closed because it has not had recent activity after the last post.

However, if you or someone is still facing the same issue as described to the issue, could you please to re-open the issue by changing the status of the issue, and add an explanation with more details which can help us to reproduce your situation.

Again, thank you for your contributions! :)