]> gitweb @ CieloNegro.org - Rakka.git/blobdiff - js/screen.js
misc changes
[Rakka.git] / js / screen.js
index 95ee043d486123c4a8c1e55630a668ef25cf64b2..a850104252716f3832bb072401f75996f7c49d97 100644 (file)
@@ -1,11 +1,11 @@
 (function () {
-    
+
     var switchedArea = null;
 
     Rakka.switchScreen = function () {
         if (switchedArea == null) {
             switchedArea = $.DIV({});
-            
+
             $("div.sideBar div.outline").hide();
 
             $("p.redirection").hide();
                     .hide()
                 .end()
                 .append(switchedArea);
+
+            $("body").append(
+                $.DIV({className: "left sideBarMask"}));
+
+            var btnClose
+                = $.INPUT({type     : "button",
+                           className: "closeButton",
+                           value    : "Close"});
+            $("body").append(
+                $.DIV({className: "right sideBarMask"},
+                      $.DIV({className: "content"},
+                            btnClose)));
+
+            $(btnClose).click(function () {
+                Rakka.restoreScreen();
+            });
         }
         else {
             $(switchedArea).empty();
         }
-        
+
         return $(switchedArea);
     };
 
@@ -32,6 +48,8 @@
             $(switchedArea).remove();
             switchedArea = null;
 
+            $("div.sideBarMask").remove();
+
             $("div.body").children().show();
         }
         return null;
@@ -56,7 +74,7 @@
         waitingMessageBoard
             = $.P({className: "waitingMessageBoard"},
                   $.P({}, msg));
-        
+
         $("body").append(waitingMessageBoard);
     };
 
@@ -66,5 +84,5 @@
             waitingMessageBoard = null;
         }
     };
-    
+
 })();