mirror of
https://github.com/colymba/GridFieldBulkEditingTools.git
synced 2024-10-22 11:05:57 +02:00
FIX: cachebuster var was not unique
since we go through each form and send individual requests, cachebuster var needs to be regenerated for each form
This commit is contained in:
parent
0d1f0af03a
commit
2f778a4214
@ -73,16 +73,18 @@
|
|||||||
onunmatch: function(){
|
onunmatch: function(){
|
||||||
},
|
},
|
||||||
onclick: function(e){
|
onclick: function(e){
|
||||||
|
var formsWithUpadtes, url, data, cacheBuster;
|
||||||
|
|
||||||
var formsWithUpadtes = $('form.bulkImageUploadUpdateForm.hasUpdate');
|
formsWithUpadtes = $('form.bulkImageUploadUpdateForm.hasUpdate');
|
||||||
$(this).data('formsToUpdate', $(formsWithUpadtes).length);
|
$(this).data('formsToUpdate', $(formsWithUpadtes).length);
|
||||||
var url = $(this).data('url');
|
url = $(this).data('url');
|
||||||
var cacheBuster = new Date().getTime();
|
|
||||||
|
|
||||||
if ( $(formsWithUpadtes).length > 0 ) $(this).addClass('loading');
|
if ( $(formsWithUpadtes).length > 0 ) $(this).addClass('loading');
|
||||||
|
|
||||||
|
//@TODO execute 'doFinish' even when no form have been changed
|
||||||
$(formsWithUpadtes).each(function(){
|
$(formsWithUpadtes).each(function(){
|
||||||
var data = $(this).serialize();
|
cacheBuster = new Date().getTime() + '_' + $(this).attr('name');
|
||||||
|
data = $(this).serialize();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: url + '?cacheBuster=' + cacheBuster,
|
url: url + '?cacheBuster=' + cacheBuster,
|
||||||
data: data,
|
data: data,
|
||||||
|
Loading…
Reference in New Issue
Block a user