Read the statement by Michael Teeuw here.
MM-Navbar - Navigation Bar for Touchscreens to hide/show modules
-
@chrisyy All I have is the weather, calendar and news buttons, how can I get more of them?
I’m using: Mail, Hello World, Alarm, News, Calendar and Music player.
For hiding/showing all I’m using this module: https://github.com/masters1222/mm-hide-all -
@chrisyy first of all I want to say that your module looks really nice, unfortunate that my mirror won’t have touch ;(. This module could be used in conjunction with my ProfileSwitcher module. This way you won’t have to bother with showing/hiding certain modules and others won’t have to modify your code. :)
-
@AlessandroRa for now, u have to copy a button and Change the code to another module.
@tosti007 Thanks for the tip. i’ll have a look at the module.
-
@in_a_days the code for Show/hide alle of the modules is
MM.getModules().exceptModule(this).exceptWithClass(‘clock’).enumerate(function(module){
module.hide(1000, function(){
});
});but there is not a button implemented until now.
-
I gave your code a look an notived that you imported jquery. First of all, you could also direct to a external file, see module documentation, this way you only have to change that line when you want to update the jquery. However if you would replace the on with addEventListener then you wouldn’t have to import jquery at all. Your code wouldn’t have to change much at all since that method takes the same parameters.
-
@in_a_days hi, how can i change code to show more modules apart from clock, i need weather and calendar to show as default
-
So right now it hides all modules by default. If you want everything to show by default I think you just need to comment out a section from MM-navbar.js. These are lines 12 - 19 right now:
notificationReceived: function(notification, payload, sender){ if (notification === 'DOM_OBJECTS_CREATED'){ MM.getModules().exceptModule(this).exceptWithClass('clock').enumerate(function(module){ module.hide(1000, function(){ }); }); } },
Just open and close a comment around this section so it looks like this:
/*notificationReceived: function(notification, payload, sender){ if (notification === 'DOM_OBJECTS_CREATED'){ MM.getModules().exceptModule(this).exceptWithClass('clock').enumerate(function(module){ module.hide(1000, function(){ }); }); } },*/
And I think it should display all your normal modules on startup.
-
@chrisyy thank you man, so let me get this straight: I find a button that I like on internet, I copy its code and I put it into the module?
I’m sorry, but I’m kinda new to this :) -
@AlessandroRa No you will have to take a look at Font Awsome which is being used throughout the magic mirror. In the link you can find all the icons you can use. (someone correct me if i’m wrong)
-
@in_a_days Hi, My requirement is i need to show clock, weather and Calendar by default and all other modules should be hide.