From 073b52ce961de12be7c9b621da0394bc03d1dce2 Mon Sep 17 00:00:00 2001 From: rugk Date: Tue, 11 Apr 2017 22:36:25 +0200 Subject: [PATCH] Pass on event Thus the receiving function also had to be adjusted, so the right data is passed on. --- js/privatebin.js | 11 ++++++----- tpl/bootstrap.php | 2 +- tpl/page.php | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/js/privatebin.js b/js/privatebin.js index feebec3f..394ebb37 100644 --- a/js/privatebin.js +++ b/js/privatebin.js @@ -2690,7 +2690,7 @@ jQuery.PrivateBin = function($, sjcl, Base64, RawDeflate) { */ function clickRetryButton(event) { - retryButtonCallback(); + retryButtonCallback(event); } /** @@ -3862,9 +3862,6 @@ jQuery.PrivateBin = function($, sjcl, Base64, RawDeflate) { */ me.run = function(paste) { - // in case the button has been there previously - TopNav.hideRetryButton(); - Alert.hideMessages(); Alert.showLoading('Decrypting pasteā€¦', 0, 'cloud-download'); // @TODO icon maybe rotation-lock, but needs full Glyphicons @@ -3917,7 +3914,11 @@ jQuery.PrivateBin = function($, sjcl, Base64, RawDeflate) { Alert.showError('Could not decrypt data. Did you enter a wrong password? Retry with the button at the top.'); // reset password, so it can be re-entered and sow retry button Prompt.reset(); - TopNav.setRetryCallback(me.run); + TopNav.setRetryCallback(function () { + TopNav.hideRetryButton(); + + me.run(paste); + }); TopNav.showRetryButton(); } } diff --git a/tpl/bootstrap.php b/tpl/bootstrap.php index 2655d0d4..166207c1 100644 --- a/tpl/bootstrap.php +++ b/tpl/bootstrap.php @@ -69,7 +69,7 @@ if ($MARKDOWN): - + diff --git a/tpl/page.php b/tpl/page.php index 1522d488..a4b9e54e 100644 --- a/tpl/page.php +++ b/tpl/page.php @@ -47,7 +47,7 @@ if ($MARKDOWN): - +