nicer spinner animation, some cleaning
[wl-mobile.git] / assets / www / js / menuinterface.js
index aa8df52..596f859 100644 (file)
@@ -1,3 +1,8 @@
+/*
+ * This file is part of WolneLektury-Mobile, licensed under GNU Affero GPLv3 or later.
+ * Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
+ */
+
 /**
  *  
  * @return Object literal singleton instance of MenuInterface
 /**
  *  
  * @return Object literal singleton instance of MenuInterface
@@ -21,5 +26,16 @@ var MenuInterface = {
                        [label, enabled]
                );
        },
                        [label, enabled]
                );
        },
+       setNightMode: function(enabled, win, fail) {
+               if (enabled == false) enabled = "false";
+               else enabled = "true";
+               return PhoneGap.exec(
+                       win, 
+                       fail, 
+                       "MenuInterface", 
+                       "setNightMode", 
+                       [enabled]
+               );
+       },
 };
 
 };