Add errDialog function
This commit is contained in:
parent
f8fcc0d2d7
commit
152e46ab15
3 changed files with 26 additions and 1 deletions
|
|
@ -1716,3 +1716,24 @@ function unhidePlayer() {
|
|||
$("#ytapiplayer").attr("width", PLAYER.size.width)
|
||||
.attr("height", PLAYER.size.height);
|
||||
}
|
||||
|
||||
function errDialog(err) {
|
||||
var div = $("<div/>").addClass("profile-box")
|
||||
.css("padding", "10px")
|
||||
.text(err)
|
||||
.appendTo($("body"));
|
||||
|
||||
$("<br/>").appendTo(div);
|
||||
$("<button/>").addClass("btn btn-mini")
|
||||
.css("width", "100%")
|
||||
.text("OK")
|
||||
.click(function () { div.remove(); })
|
||||
.appendTo(div);
|
||||
var cw = $("#chatwrap").width();
|
||||
var ch = $("#chatwrap").height();
|
||||
var cp = $("#chatwrap").offset();
|
||||
var x = cp.left + cw/2 - div.width()/2;
|
||||
var y = cp.top + ch/2 - div.height()/2;
|
||||
div.css("left", x + "px");
|
||||
div.css("top", y + "px");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue