Author: bleny Date: 2013-08-29 10:35:10 +0200 (Thu, 29 Aug 2013) New Revision: 389 Url: http://forge.codelutin.com/projects/franciaflex-magalie/repository/revisions... Log: don't ask to cancel 0 movements Modified: trunk/magalie-web/src/main/webapp/js/receive-article-input.js Modified: trunk/magalie-web/src/main/webapp/js/receive-article-input.js =================================================================== --- trunk/magalie-web/src/main/webapp/js/receive-article-input.js 2013-08-29 08:34:26 UTC (rev 388) +++ trunk/magalie-web/src/main/webapp/js/receive-article-input.js 2013-08-29 08:35:10 UTC (rev 389) @@ -307,9 +307,11 @@ var confirmation = model.getConfirmation(); - var confirmMessage = 'Annuler ' + Object.keys(confirmation.locationIdToStoredQuantities).length + ' mouvements ?'; + var storageMovementCount = Object.keys(confirmation.locationIdToStoredQuantities).length; - var redirect = confirmation.locationIdToStoredQuantities.length == 0 + var confirmMessage = 'Annuler ' + storageMovementCount + ' mouvements ?'; + + var redirect = storageMovementCount == 0 || confirm(confirmMessage); if (redirect) {