From e2e8001ba8dec95742e6c121c7252b4fd5634b7d Mon Sep 17 00:00:00 2001 From: Devaev Maxim Date: Wed, 25 Jul 2018 19:15:04 +0300 Subject: windows stack --- kvmd/web/css/main.css | 4 ++-- kvmd/web/js/ui.js | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/kvmd/web/css/main.css b/kvmd/web/css/main.css index 3089a6d1..e3b16b2f 100644 --- a/kvmd/web/css/main.css +++ b/kvmd/web/css/main.css @@ -25,7 +25,7 @@ ul#ctl { position: fixed; top: 0; width: 100%; - z-index: 10; + z-index: 2147483647; } ul#ctl li.ctl-logo { float: left; @@ -64,7 +64,7 @@ div.ctl-dropdown-content { background-color: var(--bg-color-ctl); min-width: 180px; box-shadow: var(--big-shadow); - z-index: 9; + z-index: 2147483646; } div.ctl-dropdown-content div.buttons-row { margin: 0; diff --git a/kvmd/web/js/ui.js b/kvmd/web/js/ui.js index dd7d7a4d..59968956 100644 --- a/kvmd/web/js/ui.js +++ b/kvmd/web/js/ui.js @@ -1,4 +1,6 @@ var ui = new function() { + var __top_z_index = 1; + this.init = function() { Array.prototype.forEach.call(document.getElementsByClassName("ctl-item"), function(el_item) { el_item.onclick = function() { __toggleMenu(el_item); }; @@ -44,6 +46,7 @@ var ui = new function() { var prev_y = 0; function startMoving(event) { + __raiseWindow(el_body); event = (event || window.event); event.preventDefault(); prev_x = event.clientX; @@ -69,5 +72,11 @@ var ui = new function() { } el_header.onmousedown = startMoving; + el_body.onclick = function () { __raiseWindow(el_body) }; + }; + + var __raiseWindow = function(el_body) { + __top_z_index += 1; + el_body.style.zIndex = __top_z_index; }; }; -- cgit v1.2.3