From 6039f6c42a5ec0109fb9cd484ebd000438552f4d Mon Sep 17 00:00:00 2001 From: colymba Date: Thu, 17 Jan 2013 23:35:44 +0200 Subject: [PATCH] FIX #9 check for other url parameters on delete --- javascript/GridFieldBulkImageUpload.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/javascript/GridFieldBulkImageUpload.js b/javascript/GridFieldBulkImageUpload.js index 40e5edb..3543efc 100644 --- a/javascript/GridFieldBulkImageUpload.js +++ b/javascript/GridFieldBulkImageUpload.js @@ -151,12 +151,14 @@ var url = $(this).data('url'); var cacheBuster = new Date().getTime(); + if ( url.indexOf('?') !== -1 ) cacheBuster = '&cacheBuster=' + cacheBuster; + else cacheBuster = '?cacheBuster=' + cacheBuster; $('form.bulkImageUploadUpdateForm').each(function(){ var data = $(this).serialize(); $.ajax({ - url: url + '?cacheBuster=' + cacheBuster, + url: url + cacheBuster, data: data, type: "POST", context: $(this)