Admin header links

Open to all! Ask other shopowners for help.
Post Reply
User avatar
Pierre_P
Contributor
Posts: 144
Joined: Fri Mar 12, 2021 5:06 am
Phoenix Version: v1.1.0.6
Has thanked: 21 times
Been thanked: 11 times

Admin header links

Post by Pierre_P »

How to change the behavior when hovering mouse over hmenu navigation icons and dropdown box appears, moving mouse too slow the dropdown box disappears?
Is driving me nuts

I know that you can click the icon and the drop down box will stay there

Tags:


Join The Code Co-op to get access to your library in the Code Co-op Forum
User avatar
burt
Core Team
Posts: 4551
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: Admin header links

Post by burt »

Pierre_P wrote: Sat Jul 30, 2022 9:05 am I know that you can click the icon and the drop down box will stay there
This. Just click the icon.

If you want to remove the feature that auto opens these menus, simply delete the file:
/includes/hooks/admin/siteWide/stylesheetDropdown.php

If you want to amend that feature (eg if you found a nicer way to have auto opening menus), amend the same file as above. Or make a new file.
I am not here to build for you.
I am here to build with you. Let's help each other.
Denzel
Member
Posts: 87
Joined: Sat Oct 31, 2020 7:22 pm
Phoenix Version:
Has thanked: 9 times
Been thanked: 15 times

Re: Admin header links

Post by Denzel »

Maybe a delayed closing of the menus on leaving the menuicon does the trick ?
Last edited by Denzel on Tue Aug 02, 2022 6:14 pm, edited 1 time in total.
Denzel
Member
Posts: 87
Joined: Sat Oct 31, 2020 7:22 pm
Phoenix Version:
Has thanked: 9 times
Been thanked: 15 times

Re: Admin header links

Post by Denzel »

Code: Select all

<?php
/*
  $Id$

  CE Phoenix, E-Commerce made Easy
  https://phoenixcart.org

  Copyright (c) 2021 Phoenix Cart

  Released under the GNU General Public License
*/

class hook_admin_siteWide_styleSheetDropdown {

  function listen_injectSiteStart() {
    $admin_css = '<style>@media (min-width: 768px) { #navbarAdmin > ul.navbar-nav > li.dropdown > div.dropdown-menu { display: block; visibility: hidden; opacity: 0; transition: visibility 0.3s, opacity 0.3s linear;} #navbarAdmin > ul.navbar-nav > li.dropdown:hover > div.dropdown-menu { visibility: visible; opacity: 1; transition: visibility 0s, opacity 0.1s linear;} }</style>' . PHP_EOL;

    return $admin_css;
  }

}
/includes/hooks/admin/siteWide/stylesheetDropdown.php

You may change the transition timings for your needs (first both for fading out, second both for fading in ;) )
User avatar
Pierre_P
Contributor
Posts: 144
Joined: Fri Mar 12, 2021 5:06 am
Phoenix Version: v1.1.0.6
Has thanked: 21 times
Been thanked: 11 times

Re: Admin header links

Post by Pierre_P »

Thanks @Denzel
That did it perfectly


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply