webgui: fixed menu-display

This commit is contained in:
zeners 2016-01-31 13:37:55 +01:00
parent 67475b30e7
commit 9e1fc59c6e

View File

@ -23,7 +23,8 @@ function Page(menu){
this.path = menu.path != undefined ? menu.path : ("/" + menu.name); this.path = menu.path != undefined ? menu.path : ("/" + menu.name);
var runst = menu.runstate; var runst = menu.runstate;
var content = require(module); var content = require(this.module);
var mm = require("menu");
this.view = function(){ this.view = function(){
var runstate = rs("control/runstate"); var runstate = rs("control/runstate");
@ -62,7 +63,7 @@ function Page(menu){
} else if("waiting_account_select|running_ok.*".match(runstate.runstate)) { } else if("waiting_account_select|running_ok.*".match(runstate.runstate)) {
if (runst === undefined || runst.match(runstate.runstate)) { if (runst === undefined || runst.match(runstate.runstate)) {
return m("div", [ return m("div", [
m("div", menu.view()), m("div", mm.view()),
m("hr"), m("hr"),
m("div", content) m("div", content)
]); ]);
@ -70,7 +71,7 @@ function Page(menu){
// funktion currently not available // funktion currently not available
m.route("/"); m.route("/");
return m("div", [ return m("div", [
m("div", menu.view()), m("div", mm.view()),
m("hr"), m("hr"),
m("div", require("home").view()) m("div", require("home").view())
]); ]);