using js modules

This commit is contained in:
Devaev Maxim
2019-07-13 06:38:55 +03:00
parent ad97aecaf4
commit 98468bfa30
20 changed files with 104 additions and 70 deletions

View File

@@ -20,9 +20,14 @@
*****************************************************************************/
var wm;
import {tools, $} from "../tools.js";
import {checkBrowser} from "../bb.js";
import {wm, initWindowManager} from "../wm.js";
function main() {
import {Session} from "./session.js";
export function main() {
if (checkBrowser()) {
window.onbeforeunload = function(event) {
let text = "Are you sure you want to close Pi-KVM session?";
@@ -30,7 +35,7 @@ function main() {
return text;
};
wm = new WindowManager();
initWindowManager();
tools.setOnClick($("show-about-button"), () => wm.showWindow($("about-window")));
tools.setOnClick($("show-keyboard-button"), () => wm.showWindow($("keyboard-window")));