diff --git a/public/admin/js/cacheimages.js b/public/admin/js/cacheimages.js index 203f685bea53c259332ce2ace86f1ec7c01114ee..616884f57203dee18b7c88b2f7ef2255f3375a6c 100644 --- a/public/admin/js/cacheimages.js +++ b/public/admin/js/cacheimages.js @@ -1,10 +1,18 @@ -//////////////////////////////////////////////////////////////////////////////////// -// Constitution du cache des images -/////////////////////////////////////////////////////////////////////////////////// -function makeCacheImages(sUrl) -{ - if(!sUrl) sUrl=baseUrl+'/admin/systeme/makecacheimages'; - else sUrl=baseUrl+sUrl; - $('#bloc_restantes').show(); - $('#restantes').load(sUrl); -} \ No newline at end of file +// See module/admin/controllers/SystemeController.php makecacheimagesAction() +function makeCacheImages(sUrl) { + if (!sUrl) + sUrl = baseUrl+'/admin/systeme/makecacheimages'; + else + sUrl = baseUrl+sUrl; + + $('#bloc_restantes').show(); + $('#restantes').load(sUrl, + function(response, status, xhr) { + if (status == "error") { + $('#restantes').append('.'); + setTimeout(function() { makeCacheImages(); }, + 1); + + } + }); +}