X-Git-Url: https://git.mdrn.pl/wl-mobile.git/blobdiff_plain/d947c00d92691df552a793f8d9c2991c931ad244..ece057f255f997085854b36d6f858b97dad44546:/assets/www/js/menuinterface.js diff --git a/assets/www/js/menuinterface.js b/assets/www/js/menuinterface.js new file mode 100644 index 0000000..6510424 --- /dev/null +++ b/assets/www/js/menuinterface.js @@ -0,0 +1,30 @@ +/* + * 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 + */ +var MenuInterface = { + /** + * @param asset Path to the asset (relative to assets dir) + * @param target Path to DB file (relative to app db files dir) + * @param overwrite + * @param win Success callback + * @param fail Error callback + */ + setInfoButton: function(label, enabled, win, fail) { + if (enabled == false) enabled = "false"; + else enabled = "true"; + return PhoneGap.exec( + win, + fail, + "MenuInterface", + "setInfoButton", + [label, enabled] + ); + }, +}; +