ActionSheet.js 816 B

123456789101112131415161718192021222324252627282930
  1. function ActionSheet() {
  2. }
  3. ActionSheet.prototype.show = function (options, successCallback, errorCallback) {
  4. cordova.exec(successCallback, errorCallback, "ActionSheet", "show", [options]);
  5. };
  6. ActionSheet.prototype.hide = function (options, successCallback, errorCallback) {
  7. cordova.exec(successCallback, errorCallback, "ActionSheet", "hide", [options]);
  8. };
  9. ActionSheet.prototype.ANDROID_THEMES = {
  10. THEME_TRADITIONAL : 1, // default
  11. THEME_HOLO_DARK : 2,
  12. THEME_HOLO_LIGHT : 3,
  13. THEME_DEVICE_DEFAULT_DARK : 4,
  14. THEME_DEVICE_DEFAULT_LIGHT : 5
  15. };
  16. ActionSheet.install = function () {
  17. if (!window.plugins) {
  18. window.plugins = {};
  19. }
  20. window.plugins.actionsheet = new ActionSheet();
  21. return window.plugins.actionsheet;
  22. };
  23. cordova.addConstructor(ActionSheet.install);