X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=js%2Fscreen.js;h=95ee043d486123c4a8c1e55630a668ef25cf64b2;hb=e751af5e3d23d7757f363bf4e86f9d732d90be7f;hp=0ac558b9f6da97e52bcf479f8f2c9e937f1a7efb;hpb=e2fd35989e9765281523fd4ce05dcd0199bdbbad;p=Rakka.git diff --git a/js/screen.js b/js/screen.js index 0ac558b..95ee043 100644 --- a/js/screen.js +++ b/js/screen.js @@ -8,6 +8,8 @@ $("div.sideBar div.outline").hide(); + $("p.redirection").hide(); + $("div.body") .children() .hide() @@ -22,19 +24,30 @@ }; Rakka.restoreScreen = function () { - if (switchedArea == null) { - throw new Error("Rakka.restoreScreen(): not switched"); - } + if (switchedArea != null) { + $("div.sideBar div.outline").show(); - $("div.sideBar div.outline").show(); + $("p.redirection").show(); - $(switchedArea).remove(); - switchedArea = null; + $(switchedArea).remove(); + switchedArea = null; - $("div.body").children().show(); + $("div.body").children().show(); + } return null; }; + Rakka.getSwitchedScreen = function () { + return switchedArea; + }; + + Rakka.scrollToTopLeft = function () { + $("div.center").each(function () { + this.scrollTop = 0; + this.scrollLeft = 0; + }); + }; + var waitingMessageBoard = null; Rakka.displayWaitingMessage = function (msg) {