Revision a370d3dd templates/pollerdash.js
b/templates/pollerdash.js | ||
---|---|---|
28 | 28 |
var message = form.formToDict(); |
29 | 29 |
var disabled = form.find("input[type=submit]"); |
30 | 30 |
disabled.disable(); |
31 |
$.postJSON("{% url fetch-new %}", message, function(response) { |
|
31 |
var date = new Date(); |
|
32 |
var timestamp = date.getTime(); |
|
33 |
$.postJSON("{% url fetch-new %}?="+timestamp, message, function(response) { |
|
32 | 34 |
updater.showMessage(response); |
33 | 35 |
if (message.id) { |
34 | 36 |
form.parent().remove(); |
... | ... | |
45 | 47 |
} |
46 | 48 |
|
47 | 49 |
jQuery.postJSON = function(url, args, callback) { |
48 |
$.ajax({url: url, dataType: "json", type: "POST", |
|
50 |
$.ajax({url: url, dataType: "json", type: "POST", cache: false,
|
|
49 | 51 |
success: function(response) { |
50 | 52 |
if (callback) callback(response); |
51 | 53 |
}, error: function(response) { |
... | ... | |
81 | 83 |
errorSleepTime: 500, |
82 | 84 |
cursor: null, |
83 | 85 |
start: function() { |
84 |
$.ajax({url: "{% url fetch-existing %}", type: "POST", dataType: "json", |
|
86 |
var date = new Date(); |
|
87 |
var timestamp = date.getTime(); |
|
88 |
$.ajax({url: "{% url fetch-existing %}?="+timestamp, type: "POST", dataType: "json", cache: false, |
|
85 | 89 |
success: updater.onFetchExisting, |
86 | 90 |
error: updater.onError}); |
87 | 91 |
}, |
... | ... | |
92 | 96 |
window.setTimeout('location.reload()', 500); |
93 | 97 |
} |
94 | 98 |
timeout = {{timeout}}; |
95 |
$.ajax({url: "{% url fetch-updates %}", type: "POST", dataType: "json", |
|
99 |
var date = new Date(); |
|
100 |
var timestamp = date.getTime(); |
|
101 |
|
|
102 |
$.ajax({url: "{% url fetch-updates %}?="+timestamp, type: "POST", dataType: "json", cache: false, |
|
96 | 103 |
success: updater.onSuccess, |
97 | 104 |
timeout: timeout, |
98 | 105 |
error: updater.onError}); |
Also available in: Unified diff