[IMP] website: improve "new content" text & add block ui

We don't want the user to click on the page while an installation is in progress.
This commit is contained in:
Sébastien Theys
2018-09-25 18:29:16 +02:00
parent fa4c650b01
commit 96f7bda09e
@@ -23,10 +23,10 @@ var NewContentMenu = websiteNavbarData.WebsiteNavbarActionWidget.extend({
}),
// allow text to be customized with inheritance
newContentText: {
failed: _t('"%s" failed to install.'),
failed: _t('Failed to install "%s"'),
installInProgress: _t("The installation of an App is already in progress."),
installNeeded: _t('You need to install the "%s" App in order to execute this action.'),
installPleaseWait: _t('Please wait while "%s" is being installed...'),
installNeeded: _t('Do you want to install the "%s" App?'),
installPleaseWait: _t('Installing "%s"'),
},
/**
@@ -135,10 +135,13 @@ var NewContentMenu = websiteNavbarData.WebsiteNavbarActionWidget.extend({
*/
_install: function (moduleId) {
this.pendingInstall = true;
$('body').css('pointer-events', 'none');
return this._rpc({
model: 'ir.module.module',
method: 'button_immediate_install',
args: [[moduleId]],
}).fail(function () {
$('body').css('pointer-events', '');
});
},
/**