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

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') {