mescon / Muximux

A lightweight way to manage your HTPC
GNU General Public License v2.0
1.14k stars 82 forks source link

[Feature Request] In Mobile View - Hide Dropdown After Item Selection #90

Closed d8ahazard closed 7 years ago

d8ahazard commented 7 years ago

I actually tried doing this myself, but can't quite work out how the hamburger is detecting the onclick.

Basically, in the Mobile UI version, when you click on a section from the dropdown menu, the menu stays present after a click. In my mind, it should close after you select something.

I was able to get proper detection of clicking on the menu only when in mobile view by adding this below the call for "muximuxMobileResize();" in main.js

muximuxMobileResize();
    if($( window ).width() < 800) {
        var isMobile = true;
    } else {
        var isMobile = false;     
    }

And then around line 69, after this:

$('.drop-nav').on('mouseout', function () {
        $('.main-nav a span:first').removeClass('dd-active');
    });

Add something like this:

$('.drop-nav').on('click', function () {
        if (isMobile == true) {
            console.log("DropNav clicked.");

        }
    });

Like I said, I'd make the change and submit a pull request myself, but I'm still trying to figure out where the onclick detection is happening in the hamburger, and how to manually fire that.

d8ahazard commented 7 years ago

Sorry. Didn't pay enough attention to see this listed as a bug already.

Looked all over for a way to contact you privately, but none were found. I really, really, REALLY love this. I set up my Synology with this as the landing page, and dumped all the other apps into this behind some reverse-proxies, and it's just wonderful.

If you are interested in any help with my requests, this bug, or the other stuff mentioned, I'd be happy to take a crack at it, it'd just be nice to be able to ping you with questions. LMK if interested, we can swap info.

mescon commented 7 years ago

Hey - yeah sure, I'm on Gitter so come on over; real life has been very busy lately so any help you could provide is much appreciated. Come to https://gitter.im/mescon/Muximux