Skip to content

Instantly share code, notes, and snippets.

@andymckay
Created December 7, 2011 01:20
Show Gist options
  • Save andymckay/1440958 to your computer and use it in GitHub Desktop.
Save andymckay/1440958 to your computer and use it in GitHub Desktop.
diff --git a/media/js/zamboni/buttons.js b/media/js/zamboni/buttons.js
index e8dd77b..4434d7b 100644
--- a/media/js/zamboni/buttons.js
+++ b/media/js/zamboni/buttons.js
@@ -33,7 +33,8 @@ var webappButton = function() {
.click(function(e) {
e.preventDefault();
purchases.record($this, function(receipt) {
- purchases.install_app(manifestURL, receipt);
+ console.log($this);
+ purchases.install_app(manifestURL, receipt, $this);
});
});
}
diff --git a/media/js/zamboni/apps.js b/media/js/zamboni/apps.js
index 00bfaf6..8b18137 100644
--- a/media/js/zamboni/apps.js
+++ b/media/js/zamboni/apps.js
...
+exports._showError = function(errSummary, errMessage, opt, element) {
+ if (element) {
+ var $popup = $('.apps-error-msg:first');
+ $popup.html(errMessage);
+ $popup.removeClass('modal');
+ $popup.removeClass('hidden');
+ $popup('p.install-button a', {pointTo: 'p.install-button a'});
+ $popup.trigger('click');
+ } else {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment