Fix error window
This commit is contained in:
parent
4426d30342
commit
7f2c7f065c
@ -255,22 +255,22 @@ class WebDesktopEnvironment{
|
||||
let newWindow = document.createElement("div")
|
||||
newWindow.setAttribute("class", "WindowFrameless")
|
||||
newWindow.setAttribute("windowId", "SuperUniqUUID") //TODO:
|
||||
newWindow.style.cssText = "position:absolute;width:450px;height:116px; margin-left: 225px; margin-top:58px; left: 50%;top: 50%;background-color:#FFFFFF;border: 1px solid #000000;box-shadow: 2px 2px 0px #000000;"
|
||||
newWindow.style.cssText = "position:absolute;width:450px;height:116px; left: 50%;top: 50%;background-color:#FFFFFF;border: 1px solid #000000;box-shadow: 2px 2px 0px #000000;"
|
||||
|
||||
let alertImage = document.createElement("img")
|
||||
alertImage.setAttribute("src", "http://localhost:8080/res/sys/wde/icons/ohno.png")
|
||||
alertImage.style.cssText = "position:relative;width:64px;height:64px;top:15px;left:15px"
|
||||
alertImage.setAttribute("src", "/res/sys/wde/icons/ohno.png")
|
||||
alertImage.style.cssText = "position:absolute; width:64px;height:64px;top:15px;left:25px"
|
||||
newWindow.appendChild(alertImage)
|
||||
|
||||
let errorText = document.createElement("div")
|
||||
errorText.style.cssText = "position:relative; left:128px; top:-30px;font-family: 'Virtue';"
|
||||
errorText.style.cssText = "position:absolute; width: 300px; left:128px; top:30px;font-family: 'Virtue';"
|
||||
errorText.innerHTML = alertText
|
||||
newWindow.appendChild(errorText)
|
||||
|
||||
let closeButton = document.createElement("button")
|
||||
closeButton.style.cssText = "position:relative; left: 382px; bottom: -5px; background-color:#FFFFFF; width: 55px; height:18px; font-family: 'Virtue'; border-radius:4px;border: 1px solid #000000;"
|
||||
closeButton.style.cssText = "position:absolute; left: 382px; bottom: 10px; background-color:#FFFFFF; width: 55px; height:18px; font-family: 'Virtue'; border-radius:4px;border: 1px solid #000000;"
|
||||
closeButton.innerHTML = "Close"
|
||||
closeButton.addEventListener('click', console.log('aaaaa'))
|
||||
closeButton.addEventListener('click', () => { newWindow.remove()})
|
||||
newWindow.appendChild(closeButton)
|
||||
|
||||
document.body.querySelector('#windows-layer').appendChild(newWindow)
|
||||
@ -332,6 +332,9 @@ class WindowsCompositor{
|
||||
* @param {HTMLElement} window
|
||||
*/
|
||||
static bringWindowToFront(window){ //FIXME
|
||||
if (window == null | window == undefined){
|
||||
return
|
||||
}
|
||||
let previousWindow = WindowsCompositor.windowsLayer.lastChild
|
||||
if (window != previousWindow){
|
||||
WindowsCompositor.windowsLayer.insertBefore(previousWindow, window)
|
||||
|
Loading…
Reference in New Issue
Block a user