65104245a223b9511f77588063d1cbbb04d1042f
[wl-mobile.git] / assets / www / js / menuinterface.js
1 /*
2  * This file is part of WolneLektury-Mobile, licensed under GNU Affero GPLv3 or later.
3  * Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
4  */
5
6 /**
7  *  
8  * @return Object literal singleton instance of MenuInterface
9  */
10 var MenuInterface = { 
11         /**
12      * @param asset Path to the asset (relative to assets dir)
13      * @param target Path to DB file (relative to app db files dir)
14      * @param overwrite
15      * @param win Success callback
16      * @param fail Error callback
17      */
18         setInfoButton: function(label, enabled, win, fail) {
19                 if (enabled == false) enabled = "false";
20                 else enabled = "true";
21                 return PhoneGap.exec(
22                         win, 
23                         fail, 
24                         "MenuInterface", 
25                         "setInfoButton", 
26                         [label, enabled]
27                 );
28         },
29 };
30