Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hass’s picture

Title: Sticky header overlayed by navbar / unreadable » tableHeaderOffset not set / Sticky header overlayed by navbar
hass’s picture

Version: 7.x-1.0-alpha4 » 7.x-1.x-dev
Priority: Normal » Major
FileSize
990 bytes

Patch attached.

hass’s picture

Status: Active » Needs review
hass’s picture

hass’s picture

hass’s picture

Something with this patch is not fully correct or overlay module has a bug. If overlay is loaded it overlayed by the navbar. If navbar is larger your are not able to hit the X to close overlay.

Overlays Drupal.overlayChild.behaviors.alterTableHeaderOffset() is often not executed (or I have no clue when) and Drupal.settings.tableHeaderOffset is undefined. I have no clue what's going wrong here. I guess overlay module has a bug.

hass’s picture

Seen the same bug with new admin_menu on modules page, but the offset admin menu needs is less than navbar and the impact therefore not sooo heavy as it's still possible to reach the X to close the overlay, what is not possible with navbar.

jessebeach’s picture

Status: Needs review » Postponed
hass’s picture

This case was filed with Horizontal bar... and this bug is not visible in D8.

hass’s picture

Two sreenshots with the problem:

2013-03-11_200948.png

2013-03-11_201028.png

jessebeach’s picture

Status: Postponed » Needs review

This should be fixed in the 7.x-1.x branch.

Anonymous’s picture

I'm still seeing the issue in the 27 June 7.x-1.x-dev version.

hass’s picture

Status: Needs review » Fixed

Fixed in latest DEV.

Status: Fixed » Closed (fixed)

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

saltednut’s picture

Issue summary: View changes
Status: Closed (fixed) » Needs work
FileSize
11.59 KB

I am reopening this as it still needs work. See screenshot using latest Navbar.

jessebeach’s picture

Issue tags: +rc-blocker
jessebeach’s picture

Status: Needs work » Needs review

hass gets credit here for noting the Drupa.settings.tableHeaderOffset method in his patches. I extended this approach with the Drupal.displace method that Navbar includes. And I'm only adding the library that implements this method and setting if the tableheader script is being loaded on the page.

committed in b9ba113aa794fd8082dcddbee222cb3843ce0316, I'm leaving as needs review for verification of the fix.

jessebeach’s picture

Issue tags: -rc-blocker

Removing the rc-blocker tag.

hass’s picture

artemln’s picture

drupal_add_library do not work on js alter when use ajax_delivery. See ajax_render. It is added only settings without file navbar-tableheader.js
This patch fix it

JonMcL’s picture

Hi. Patch at #20 worked well for me.

I was seeing problems with Views UI when there were AJAX commands coming back. Instead of them being processed correctly, exception was being thrown in Javascript (TypeError: 'undefined' is not a function (evaluating 'Drupal.navbar.height()') ) and then the JSON data was being displayed in browser (Safari).

Patch at #20 solves it for me. I suggest

jdanthinne’s picture

Status: Needs review » Reviewed & tested by the community

Patch #20 solves my Views + Ajax problems as well.

hefox’s picture

#20 fixed my issues also

griz’s picture

#20 fixes the excruciating clash between this module and views_ui.

lelizondo’s picture

#20 fixes my issue with Panels and Panopoly when adding a new table field using IPE.

smd_ksu’s picture

Patch #20 breaks the tabs in the Media module WYSIWYG browser. Not the initial tabs but after clicking next in the media browser when uploading an image.

Attached are screenshots of the issue and comparison with the correct state.

sylus’s picture

I needed to make a slight modification to hook_js_alter to only add Drupal.navbar is the navbar.js itself is added first. This let me use the admin_select module with admin_menu for users who wishes to use that combo instead.

Attaching patch.

sylus’s picture

FileSize
1.61 KB

Whoops wrong patch.

grom358’s picture

This was also causing javascript errors in Drupal.tableHeader.eventhandlerRecalculateStickyHeader in Views UI. The patch resolved it.

Can I suggest the title of this issue be changed to reflect its todo with AJAX. It is only by chance that I found that this patch resolved the issue I was having.

saltednut’s picture

Status: Reviewed & tested by the community » Needs review

re: #31 - I will review...

saltednut’s picture

Title: tableHeaderOffset not set / Sticky header overlayed by navbar » tableHeaderOffset not set / Sticky header overlayed by navbar, causes AJAX errors (ex: Views UI)
gmclelland’s picture

+++ b/navbar.module
@@ -901,9 +898,9 @@ function navbar_library_alter(&$libraries, $module) {
-  // is loaded.

On #34, I don't think this comment should be removed with the patch.

saltednut’s picture

+++ b/navbar.module
@@ -901,9 +898,9 @@ function navbar_library_alter(&$libraries, $module) {
   // Only load the tableheader offset script if the core tableheader script
-  // is loaded.
-  if (isset($javascript['misc/tableheader.js'])) {
-    drupal_add_library('navbar', 'navbar.tableheader');
+  // and the navbar js itself is loaded.

That seems correct to me, actually.

"Only load the tableheader offset script if the core tableheader script and the navbar js itself is loaded"

Though for correct grammar one might say say, "Only load the tableheader offset script if the core tableheader script and the navbar js are loaded"

I feel like I am nitpicking there though.

gmclelland’s picture

oops, sorry I misread the patch file in #31. Ignore my previous comment.

saltednut’s picture

Status: Needs review » Reviewed & tested by the community

#34 tested and works.

@gmclelland if you wish to mark needs work with an updated comment, that's fine by me.

Trying to avoid patching this myself so I can still RTBC it :)

Elijah Lynn’s picture

Can confirm #31 applies and works and gets rid of the error in the console. We are using 7.x-1.4+9-dev for what it is worth.

Please consider this a 2nd RTBC although I am not sure why there are two comments referencing #34, #34 does not have a patch attached.

  • eshta committed 2075217 on 7.x-1.x authored by sylus
    Issue #1937754 by hass, smd_ksu, sylus, brantwynn, artemln: Fix...
eshta’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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