// const simpleScrollbar = require("../wde/simple-scrollbar"); class PersonalProperties{ appId = "personal-properties" /** * @param {HTMLElement} appElem */ constructor(appElem){ this.appElem = appElem } Init(){ console.log("Init") fetch("http://localhost:8080/application/personal-properties/render") //TODO Move to wde func .then((response) => response.text()) .then((html) => { //TODO Get ~70% of user screen height let newWindow = WebDesktopEnvironment.CreateNewWindow(this.appId, "Personal Properties", 300, 500) newWindow.innerHTML = html let closeButton = newWindow.children[0].children[0] let scrollDiv = newWindow.children[1] // console.log(scrollDiv) let scrollBar = new WdeScrollBar(scrollDiv.children[1].children[0]) console.log(scrollBar) // scrollBar.BindHandler(scrollDiv.children[1].children[0]) // scrollBar.BindHandler(scrollDiv.children[1].children[0]) // SimpleScrollbar.initEl(scrollDiv) // console.log("SimpleBar" + SimpleScrollbar) // SimpleScrollbar.initAll(); closeButton.addEventListener('click', function (params) { WebDesktopEnvironment.CloseWindow(newWindow) }) }) .catch((error) => { WebDesktopEnvironment.Alert(error); }); } CloseWindow(id){ console.log(id+"Close") } } function reply_click(){ console.log("QQQQQQQQQQQQQQQQQQQ") }