partkeepr

fork of partkeepr
git clone https://git.e1e0.net/partkeepr.git
Log | Files | Refs | Submodules | README | LICENSE

commit 8e4c919130f71b9955ab78e7bbfc59587fc81423
parent e7cf065bc667f83772cf2097b8283ca472acb48d
Author: Felicia Hummel <felicia@partkeepr.com>
Date:   Tue, 24 Jan 2017 13:58:53 +0100

Give user feedback for the batch job execution, fixes #796

Diffstat:
Msrc/PartKeepr/FrontendBundle/Resources/public/js/Components/BatchJob/BatchJobExecutionWindow.js | 16+++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/Components/BatchJob/BatchJobExecutionWindow.js b/src/PartKeepr/FrontendBundle/Resources/public/js/Components/BatchJob/BatchJobExecutionWindow.js @@ -156,6 +156,8 @@ Ext.define("PartKeepr.Components.BatchJob.BatchJobExecutionWindow", { }, onExecuteBatchJob: function () { + this.down("#executeBatchJob").setDisabled(); + var i, queryFieldConfig = [], updateFieldConfig = []; for (i = 0; i < this.batchJob.batchJobQueryFields().getCount(); i++) { @@ -175,7 +177,19 @@ Ext.define("PartKeepr.Components.BatchJob.BatchJobExecutionWindow", { this.batchJob.callPutAction("execute", { queryFields: Ext.encode(queryFieldConfig), updateFields: Ext.encode(updateFieldConfig) - }); + }, Ext.bind(this.onBatchJobExecuted, this)); + }, + /** + * Displays a message as soon as the batch job is completed successfully. + */ + onBatchJobExecuted: function (options, success) + { + if (success) { + Ext.MessageBox.alert(i18n("Batch Job Completed Successfully"), + i18n("The batch job has been executed successfully")); + } + + this.down("#executeBatchJob").setEnabled(); }, validateExecuteBatchJobButton: function () {