fix close buttons
This commit is contained in:
parent
6ef9ac2df1
commit
10a7cf9301
@ -20,8 +20,7 @@ class Finder{
|
|||||||
let fileView = new FileView("/kek", newWindow.querySelector(".FileTileView"), Finder.Click)
|
let fileView = new FileView("/kek", newWindow.querySelector(".FileTileView"), Finder.Click)
|
||||||
if (!WebDesktopEnvironment.isMobile){
|
if (!WebDesktopEnvironment.isMobile){
|
||||||
let scrollBar = new WdeScrollBar(newWindow.children[1].children[1], newWindow.children[1].children[0])// TODO to querry selector
|
let scrollBar = new WdeScrollBar(newWindow.children[1].children[1], newWindow.children[1].children[0])// TODO to querry selector
|
||||||
let closeButton = newWindow.querySelector("#closeWindowButton")
|
newWindow.querySelector("#closeWindowButton").addEventListener('click', function (params) {
|
||||||
closeButton.addEventListener('click', function (params) {
|
|
||||||
WebDesktopEnvironment.CloseWindow(newWindow)
|
WebDesktopEnvironment.CloseWindow(newWindow)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -10,14 +10,13 @@ class ImgViewer{
|
|||||||
.then((response) => response.text())
|
.then((response) => response.text())
|
||||||
.then((html) => {
|
.then((html) => {
|
||||||
let newWindow = WebDesktopEnvironment.CreateNewWindow(this.appId, 450,400 )
|
let newWindow = WebDesktopEnvironment.CreateNewWindow(this.appId, 450,400 )
|
||||||
|
|
||||||
newWindow.innerHTML = html
|
newWindow.innerHTML = html
|
||||||
|
|
||||||
let closeButton = newWindow.children[0].children[0]
|
if (!WebDesktopEnvironment.isMobile){
|
||||||
|
newWindow.querySelector("#closeWindowButton").addEventListener('click', function (params) {
|
||||||
closeButton.addEventListener('click', function (params) {
|
WebDesktopEnvironment.CloseWindow(newWindow)
|
||||||
WebDesktopEnvironment.CloseWindow(newWindow)
|
})
|
||||||
})
|
}
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
WebDesktopEnvironment.Alert(error);
|
WebDesktopEnvironment.Alert(error);
|
||||||
|
Loading…
Reference in New Issue
Block a user