Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The admin overlay is very pretty but on a heavy site with many modules it can slow things down. This module simply disables it but keeps the functionality of the close button of the overlay which brings you back to the page you were before visiting an admin page.
Link to project: http://drupal.org/sandbox/georgemastro/1842116
Git link: git clone --branch 7.x-1.x http://git.drupal.org/sandbox/georgemastro/1842116.git overlay_light
Drupal version: 7.x
Comment | File | Size | Author |
---|---|---|---|
#16 | break-views-displays.png | 5.89 KB | denisz |
#15 | duplicate-icons.png | 9.16 KB | denisz |
Comments
Comment #1
klausiWelcome,
please get a review bonus first. Then try to fix issues raised by automated review tools: http://ventral.org/pareview/httpgitdrupalorgsandboxgeorgemastro1842116git
Comment #2
georgemastro CreditAttribution: georgemastro commentedOuups...You are right. I didn't know that. It is my first module. Will do that asap.
Comment #3
dasRicardo CreditAttribution: dasRicardo commentedHello,
i think it's better when you use the drupal.behavior functionality. Your JS can look like this:
You can read about it here: http://drupal.org/node/304258
Comment #4
2phaI agree with the above in that you should be using drupal behaviors (though watch out for the typo in the above code)
installing the module:
installing the module seemed to work fine and disabled the overlay module and took me back to the modules page. This page now had a 'close' tab, selecting this then took me to 'http://localhost/d7/js/admin_menu/cache/7175c7148b3e6c07541b488a6c32d279'. I am not exactly sure what's going on here.
Going back to the front page, then the modules page again, the 'close' tab now pointed to the front page as expected.
Turning off the module did not re enable the overlay module. Maybe your module could re enable the overlay when you module is disabled. Maybe save the overlay module status when you module is enabled, then read this when you module is disabled to determine if the overlay should be re enabled or not. Just a thought and maybe not necessary.
When I enabled you module for the second time, I was redirected to the front page rather than the modules page.
Using the module
I find that in some cases the 'close' button does not work as expected.
eg. I go to the content page '/content' and then click and edit link on a node 'node/1/edit', clicking the 'close' link on this edit page takes me back to the front page. It seems you module is not reading the destination get parameter in the url. Maybe incorporate the drupal_get_destination function in there somewhere.
Code
The small amount of code in this module all looks fine to me (except for the behaviors issue outlined above)
The Project application checklist has a section titled 'Ensure your project contains a minimum of handwritten code.', you may want to review this.
Comment #5
udaksh CreditAttribution: udaksh commentedHi georgemastro,
There is no need to write $message = t() inside drupal_set_message() at line 37 in file disable_overlay.module and line 12 in file disable_overlay.install(). You can use as drupal_set_message(t("Your message")). For more information visit http://api.drupal.org/api/drupal/includes%21bootstrap.inc/function/drupa... and look at the usage of drupal_set_message().
Thanks,
Udaksh
Comment #6
Pere OrgaHi,
Isn't still better to just disable the Overlay core module?
Comment #7
klausiProject 1: http://drupal.org/node/1929998
Project 2: http://drupal.org/node/1856530
As successful completion of the project application process results in the applicant being granted the 'Create Full Projects' permission, there is no need to take multiple applications through the process. Once the first application has been successfully approved, then the applicant can promote other projects without review. Because of this, posting multiple applications is not necessary, and results in additional workload for reviewers ... which in turn results in longer wait times for everyone in the queue. With this in mind, your secondary applications have been marked as 'closed(duplicate)', with only one application left open (chosen at random).
If you prefer that we proceed through this review process with a different application than the one which was left open, then feel free to close the 'open' application as a duplicate, and re-open one of the project applications which had been closed.
Comment #8
georgemastro CreditAttribution: georgemastro commentedOups, I didn't know that.
OK I'm keeping only only this open.
Comment #9
georgemastro CreditAttribution: georgemastro commentedI kept only this module and fixed all the issues. The other one was a duplicate.
Sending the same reviews links because the other post was duplicate:
http://drupal.org/node/1871392#comment-6865140
http://drupal.org/node/1871326#comment-6865156
http://drupal.org/node/1870738#comment-6865206
Comment #10
klausiRemoving review bonus tag, you have not done any manual review, you just posted the output of an automated review tool. Make sure to read through the source code of the other projects.
And please add all your manual reviews to the issue summary as indicated in #1410826: [META] Review bonus.
Comment #11
mikespence CreditAttribution: mikespence commentedManual Review:
disable_overlay_enable
You don't need to output the enabled message, this is done by Drupal when it's enabled. (line 12)
exit - produces an error when enabling in Drush. Remove this line.
disable_overlay_disable
You don't need to output the enabled message, this is done by Drupal when it's disabled. (line 21)
Comment #12
mikespence CreditAttribution: mikespence commentedComment #13
georgemastro CreditAttribution: georgemastro commentedFixed the above issues. Thanks.
Comment #14
denisz CreditAttribution: denisz commentedJust after I enable module, I got an error:
Fatal error: Call to undefined function drush_verify_cli() in E:\test_site\sites\all\modules\disable_overlay\disable_overlay.install on line 13
Comment #15
denisz CreditAttribution: denisz commentedAlso if your have some AJAX on your admin page, overlay icon duplicates on each AJAX reload. See attached screenshot.
Comment #16
denisz CreditAttribution: denisz commentedAnd another issue: it break views interface when moduel enabled. See attached screenshot.
Comment #17
chris.smith CreditAttribution: chris.smith commentedComment #18
georgemastro CreditAttribution: georgemastro commentedAll the above problems were fixed.
Comment #19
musicalvegan0 CreditAttribution: musicalvegan0 commentedI believe we need an answer to this comment:
To me, this seems like a far easier solution. What makes your module better than just disabling the Overlay module?
Comment #20
georgemastro CreditAttribution: georgemastro commentedThe functionality of this module isn't just disabling the overlay module. It keeps the close button of the overlay that redirects the user to where he came from in the front-end.
Let's say you edit a node, then instead of going to the save button you start traveling to the admin pages. When you have the overlay whenever you tap the "x" button you return to the node. If you had disabled the overlay then you lose the ability to go to the node you were before. This is what exactly this module does.
Comment #21
georgemastro CreditAttribution: georgemastro commentedComment #22
seworthi CreditAttribution: seworthi commentedThe issues in #11 need to be fixed before this can be RTBC. These will generate error on enable without drush installed.
In function disable_overlay_init(), only set modules_exists return to a variable if you plan on using it more than once.
Comment #23
georgemastro CreditAttribution: georgemastro commentedProblems from #11 fixed with drupal_is_cli() and function_exists('drush_main'), also text 'overlay' used with variable.
Comment #24
kscheirerHmm, this module is a little confusing. I would describe it more as "Instead of using overlay, this module adds the close/navigation functionality without a complete (heavy) overlay." If you want to be sure overlay.module is not enabled use a hook_requirements() to let the admin know there's an issue. Possibly you could fake it with dependencies[] = overlay (<1.0) which should always fail. That should make hook_init() simpler, and I think you can remove
disable_overlay.install
entirely.Maybe a better name for the module would be "Overlay Light" or Simple?
----
Top Shelf Modules - Enterprise modules from the community for the community.
Comment #24.0
kscheirerUpdated description.
Comment #25
georgemastro CreditAttribution: georgemastro commentedYou actually gave me a wonderful idea. I changed the name of the project to Overlay Light. Now it actually mimics the design of the core overlay module and it looks like nothing happened, but the overlay is disabled, and of course it runs faster.
As for the dependencies it actually can confuse someone because he has to manually disable the core module, but with my code this happens automatically. I think it's better.
Comment #26
gauravjeet CreditAttribution: gauravjeet commentedHi,
Please fix ventral.org issues :
Thanks
Comment #27
gauravjeet CreditAttribution: gauravjeet commented..
Changing status to needs work
Comment #28
klausiThat minor issues reported by automated review tools are not application blockers, please do a manual review.
Comment #29
georgemastro CreditAttribution: georgemastro commentedFixed #26 issues.
Comment #30
kscheirerThanks for your feedback, I guess that's a reasonable implementation. I reviewed the current codebase again, everything looks good except
----
Top Shelf Modules - Enterprise modules from the community for the community.
Comment #31
georgemastro CreditAttribution: georgemastro commentedOK. Thanks!
Comment #32
gauravjeet CreditAttribution: gauravjeet commentedHi,
Overlay_light is a very nice module and yes, responds much faster than Overlay. However, I found something that needs some explanation :
> If initially Overlay is disabled and i enable Overlay_light, everything seems to be working fine and perfect. Ok. Now if i enable Overlay module, i cannot use it. Shouldn't Overlay_light get disabled when Overlay gets enabled and vice versa..... In short, if i could just switch between them automatically.
.install file
line 22
> Suggestion : You can write less code here :
instead of :
.module file
line 30
You can write less code here too, as discussed above.
> Whenever i enable or disable Overlay_light, i never see any message : neither 'The overlay module was enabled.' nor 'The overlay module was disabled.' when Overlay was already enabled.
Comment #33
georgemastro CreditAttribution: georgemastro commentedThanks for the code hints. I have committed them.
Also I have corrected the functionality when someone enables the overlay core module and the overlay_light is still enabled.
So now we have:
As for the last part of your comment, unfortunately this happens because of a bug to overlay as seen here
https://drupal.org/node/1788888 and I suppose it will be back-ported to 7.
Comment #34
gauravjeet CreditAttribution: gauravjeet commentedokay, so with this all seems well then, changing status to RTBC
- good luck
Comment #35
georgemastro CreditAttribution: georgemastro commentedAs someone mentioned I may not be able to get a full project access because this module has few lines of code. I have completed another module which can be found here.
https://drupal.org/sandbox/georgemastro/2051193
Should I put it for review so I can get full access? Or should I just wait to see what happens with this review?
Comment #36
lolandese CreditAttribution: lolandese commentedThis one is already RTBC. As you should not have more than one application, it is wise to stick to Overlay Light for now and meanwhile get a Review bonus again.
The Commerce Viva Payments sandbox module looks well commented in the code. It looks that it went through an automatic review process already (PaReview, Coder?). Have no opportunity to test, as I don't use the gateway.
Comment #37
kscheirerThat's good enough for me that other module looks decent.
Thanks for your contribution, georgemastro!
I updated your account to let you promote this to a full project and also create new projects as either a sandbox or a "full" project.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and get involved!
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Thanks to the dedicated reviewer(s) as well.
----
Top Shelf Modules - Enterprise modules from the community for the community.
Comment #38
georgemastro CreditAttribution: georgemastro commentedMany thanks kscheirer and to all the reviewers!
Comment #39.0
(not verified) CreditAttribution: commentedChanged git link