X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/df341bdd09208d2b0f84060454cc0000df19deba..9437f74bdc87107e38ca37f21d7d74579ad6f2aa:/src/redakcja/static/js/wiki/base.js?ds=inline diff --git a/src/redakcja/static/js/wiki/base.js b/src/redakcja/static/js/wiki/base.js index e69e3e1a..5262ab72 100644 --- a/src/redakcja/static/js/wiki/base.js +++ b/src/redakcja/static/js/wiki/base.js @@ -273,9 +273,11 @@ $.blockUI({ message: this.$elem, css: { - 'top': '25%', - 'left': '25%', - 'width': '50%' + 'top': '25%', + 'left': '25%', + 'width': '50%', + 'max-height': '75%', + 'overflow-y': 'scroll' } }); }, @@ -337,4 +339,28 @@ } }; + + window.addEventListener("message", (event) => { + event.source.close() + + $.ajax("/editor/editor-user-area/", { + success: function(d) { + $("#user-area")[0].innerHTML = d; + } + }); + }, false); + + $("#login").click(function (e) { + e.preventDefault(); + let h = 600; + let w = 500; + let x = window.screenX + (window.innerWidth - w) / 2; + let y = window.screenY + (window.innerHeight - h) / 2; + window.open( + "/accounts/login/?next=/editor/back", + "login-window", + "width=" + w + " height=" + h + " top=" + y + " left=" + x + ); + }); + })(jQuery);