var qikoo = window.qikoo || {}; qikoo.dialog = function () { var e, t, n = {}, r = function () { var n = ['
', '"].join(""), r = $(n).hide().appendTo("body"); e = r.filter(".mod-dialog-bg"), t = r.filter(".mod-dialog"), t.find(".dialog-close").click(function () { u() }) }, i = function () { t.css("width", n.width || ""), t.find(".dialog-title").html(n.title), t.find(".dialog-main").html(n.html), t.show(), e.show(), s() }, s = function () { var e = ($(window).width() - t.width()) / 2, n = ($(window).height() - t.height()) / 2; n = n > 0 ? n + $(window).scrollTop() : 0, t.css({ left: e, top: n }) }, o = function (e) { return typeof e != "object" && (e = { html: e || "" }), n = $.extend({ title: "", html: "", closeFn: null }, e), t || r(), i(), t }, u = function () { e && e.hide(), t && t.hide(), n.closeFn && n.closeFn.call(this) }; return { show: o, hide: u } }(), qikoo.dialog.confirm = function (e, t, n) { var r = ['" + e + "
", '"].join(""); return qikoo.pop({ title: "", html: t }) }, n = function (t) { var n = $(t).offset(); n.left = n.left + $(t).width() - e.width(), n.top = n.top + $(t).height(), n.left < 0 && (n.left = 0), n.top < 0 && (n.top = 0), e.css(n) }, r = function (t) { e.find(".pop-btn-gray").click(function () { i() }), e.find(".pop-btn-green").click(function () { t && t.call(this), i() }) }, i = function () { e && e.remove(), e = null }; return function (s, o, u) { i(), e = t(o), n(s), r(u), e.show() } function del() { $(".console-btn-confirm").click(function () { $("tr").hide(); }) } }();