]> gitweb @ CieloNegro.org - Rakka.git/blob - js/screen.js
Wrote more...
[Rakka.git] / js / screen.js
1 (function () {
2     
3     var switchedArea = null;
4
5     Rakka.switchScreen = function () {
6         if (switchedArea == null) {
7             switchedArea = $.DIV({});
8             
9             $("div.sideBar div.outline").hide();
10
11             $("div.body")
12                 .children()
13                     .hide()
14                 .end()
15                 .append(switchedArea);
16         }
17         else {
18             $(switchedArea).empty();
19         }
20         
21         return $(switchedArea);
22     };
23
24     Rakka.restoreScreen = function () {
25         if (switchedArea == null) {
26             throw new Error("Rakka.restoreScreen(): not switched");
27         }
28
29         $("div.sideBar div.outline").show();
30
31         $(switchedArea).remove();
32         switchedArea = null;
33
34         $("div.body").children().show();
35         return null;
36     };
37     
38 })();