mirror of https://github.com/calzoneman/sync.git
Fix channel password prompt
Add zin param to allow explicit z-index in JS generated dialog boxes. Give needpass dialog explicit z-index
This commit is contained in:
parent
47bb3e47a2
commit
a53f65a1d5
|
@ -139,7 +139,7 @@ Callbacks = {
|
|||
.css("margin-top", "5px")
|
||||
.text("Submit")
|
||||
.appendTo(div);
|
||||
var parent = chatDialog(div);
|
||||
var parent = chatDialog(div, '9999');
|
||||
parent.attr("id", "needpw");
|
||||
var sendpw = function () {
|
||||
socket.emit("channelPassword", pwbox.val());
|
||||
|
|
|
@ -2097,11 +2097,20 @@ function waitUntilDefined(obj, key, fn) {
|
|||
fn();
|
||||
}
|
||||
|
||||
function chatDialog(div) {
|
||||
/*
|
||||
God I hate supporting IE11
|
||||
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Default_parameters
|
||||
https://caniuse.com/#search=default%20function
|
||||
|
||||
This would be the ideal:
|
||||
function chatDialog(div, zin = "auto") {
|
||||
*/
|
||||
function chatDialog(div, zin) {
|
||||
if(!zin){ zin = 'auto'; }
|
||||
var parent = $("<div/>").addClass("profile-box")
|
||||
.css({
|
||||
padding: "10px",
|
||||
"z-index": "auto",
|
||||
"z-index": zin,
|
||||
position: "absolute"
|
||||
})
|
||||
.appendTo($("#chatwrap"));
|
||||
|
|
Loading…
Reference in New Issue