Merge pull request #416 from xwiki-labs/dontClickMoreThanOnceOnTheStorePadInDriveButton

Dont click more than once on the store pad in drive button
This commit is contained in:
ansuz 2019-08-08 17:22:11 +02:00 committed by GitHub
commit 20815eb725
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -2769,8 +2769,12 @@ define([
UIElements.displayCrowdfunding(common);
modal.delete();
});
var waitingForStoringCb = false;
$(store).click(function () {
if (waitingForStoringCb) { return; }
waitingForStoringCb = true;
common.getSframeChannel().query("Q_AUTOSTORE_STORE", null, function (err, obj) {
waitingForStoringCb = false;
var error = err || (obj && obj.error);
if (error) {
if (error === 'E_OVER_LIMIT') {