Comments

nishant_k’s picture

Please let me know if i can enable that from somewhere within the code or using hooks

lucian.ilea’s picture

Hi!

I have this problem also. The mobile works fine on all pages, except the "create node" ones. I have a few of these exposed for the anonymous user.

I am using the dev version (also tried the other one).

Thank you!

jphelan’s picture

This patch includes:

  • Adds a checkbox to the menu settings page to enable the menu on admin pages.
  • Bug when hammer is enabled, responsive_menu.config.js throws error on admin pages.
  • Also it looks like the responsive_menu_element variable was not getting saved.
nitrocad’s picture

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

It is still not working on admin pages, and the written patch is for the verison 7.x.1.x

tanc’s picture

StatusFileSize
new444 bytes

@nitrocad this module was designed to provide a responsive menu on the front end of a site. But I've uploaded a basic patch which will allow it to work on admin pages. I'm not sure I'll commit it though, unless there is a compelling user story for it.

tanc’s picture

Status: Active » Closed (won't fix)
nitrocad’s picture

Many thanks for the adaptation. :)

kthull’s picture

+1 for the patch in #5. I also maintain a site that needs this on the node add forms.

rroose’s picture

Can this also be patched (brought into) the Drupal 8 version of this module?

keshavv’s picture

Status: Closed (won't fix) » Needs work

I have problem, when user edit their Profile responsive menu not shown.
How to fix this

keshavv’s picture

Status: Needs work » Needs review
StatusFileSize
new418 bytes

I have added patch that restrict menu from admin pages using Role .

keshavv’s picture

Status: Needs review » Needs work
keshavv’s picture

Status: Needs work » Needs review
StatusFileSize
new426 bytes

Revised Patch

tanc’s picture

Version: 7.x-2.x-dev » 8.x-2.x-dev
Status: Needs review » Needs work

I'm considering a solution as follows:

  • Add an option on the module's settings page which allows the admin to toggle whether they want to show or disable the module on admin pages/routes (disabled by default to not break existing sites)
  • When toggled to allow on admin pages the code in responsive_menu_page_bottom() that checks the current route would be skipped thereby allowing it on any page

Allowing the code to run on admin pages means that the javascript libraries and the page wrapping elements will be added to all admin pages which may have undesirable effects on the theme. But this would then be the site builders choice rather than having no choice.

Will look at implementing this on 8.x-2.x first and then backport if successful.

rajeevgole’s picture

Thanks for the solution, Tanc!
I am working on making the patch.

rajeevgole’s picture

StatusFileSize
new2.57 KB
rajeevgole’s picture

Status: Needs work » Needs review
tanc’s picture

Assigned: Unassigned » tanc
Status: Needs review » Needs work

Thanks for the patch rajeevgole! Unfortunately the issue is slightly more complex and I'm working on something at the moment that should solve both this issue and the issue of page wrapper divs on themes like Bootstrap as well as the Seven theme. Currently if the mmenu javascript is enabled on admin pages the layout breaks due to the lack of a wrapping div.

So we don't double up on work I'll take this from here, but thank you for your efforts, I'll be sure to credit you.

tanc’s picture

Status: Needs work » Needs review
StatusFileSize
new8.79 KB

Ok, this turned out to be a bit more epic than anticipated. The complexity is around Drupal considering node/add and node/edit pages to admin pages. So rather than using the solution offered in #2854137: When admin routes are displayed as normal pages: script does not kick in. I thought it might be best to check whether the current page is using the admin theme or not. This way its connected to the theme rather than is_admin which allows more flexibility out of the box. I've then added a checkbox to allow a site administrator to choose whether they also want mmenu on their admin theme (default is disabled).

I also decided to add optional theme wrappers for the default theme and the admin theme. This is to get around some trouble with themes that don't have a wrapping div around all their regions (like Bootstrap, Seven etc). These are disabled by default.

Finally I discovered and fixed rendering issue introduced in version 2.5 when viewing the admin theme. This is related to preprocessing the toolbar without properly checking whether this theme should be modified.

So hopefully with these changes we have the most flexibility and the best freshly installed defaults. It would be great if someone can test the various options and let me know if this is ok to commit?

  • tanc committed b4332f2 on 8.x-2.x
    Issue #2455683 by tanc, keshav.k, rajeevgole: Responsive menu not...
tanc’s picture

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

I decided to commit this patch and push the update. Now needs backport to 7.

tanc’s picture

Status: Needs review » Needs work
Hitby’s picture

Hi tanc,
has there been any progress for 7.x-2.x-dev to fix this issue. I've only just come across it on the node/add pages some users have access to on a site I'm working on.

Thanks,

tanc’s picture

I'm afraid not. Its unlikely I'll have time and Drupal 7 sites are a low priority for me. Feel free to submit a patch if you're able to.

tanc’s picture

Status: Needs work » Closed (outdated)

No new features for D7 version so closing as outdated

miguelbraga’s picture

Number #5 solved my issue if someone is looking for an answer.
My problem was with node edit, the menu just went wild (looked like it lost CSS) and no errors on console.

My use case is with some nodes that need "editor" review - I created a role that gives edit permissions to a content type that requires regular input. The fact that the main menu wasn't visible and funcional in the edit page confused a lot of users and looked terrible.