projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don’t cache AJAX requests.
[Sone.git]
/
src
/
main
/
resources
/
static
/
javascript
/
sone.js
diff --git
a/src/main/resources/static/javascript/sone.js
b/src/main/resources/static/javascript/sone.js
index
49f372f
..
598c408
100644
(file)
--- a/
src/main/resources/static/javascript/sone.js
+++ b/
src/main/resources/static/javascript/sone.js
@@
-2,7
+2,7
@@
function ajaxGet(url, data, successCallback, errorCallback) {
(function(url, data, successCallback, errorCallback) {
function ajaxGet(url, data, successCallback, errorCallback) {
(function(url, data, successCallback, errorCallback) {
- $.ajax({"type": "GET", "url": url, "data": data, "dataType": "json", "success": function(data, textStatus, xmlHttpRequest) {
+ $.ajax({"
cache": false, "
type": "GET", "url": url, "data": data, "dataType": "json", "success": function(data, textStatus, xmlHttpRequest) {
ajaxSuccess();
if (typeof successCallback != "undefined") {
successCallback(data, textStatus);
ajaxSuccess();
if (typeof successCallback != "undefined") {
successCallback(data, textStatus);
@@
-872,7
+872,7
@@
function ajaxifyPost(postElement) {
}).fadeIn();
}, 1000);
}).mouseleave(function() {
}).fadeIn();
}, 1000);
}).mouseleave(function() {
- if (currentSoneMenuId = getPostId(this)) {
+ if (currentSoneMenuId =
=
getPostId(this)) {
clearTimeout(currentSoneMenuTimeoutHandler);
}
});
clearTimeout(currentSoneMenuTimeoutHandler);
}
});
@@
-1011,7
+1011,7
@@
function ajaxifyReply(replyElement) {
}).fadeIn();
}, 1000);
}).mouseleave(function() {
}).fadeIn();
}, 1000);
}).mouseleave(function() {
- if (currentSoneMenuId = getPostId(this) + "-" + getReplyId(this)) {
+ if (currentSoneMenuId =
=
getPostId(this) + "-" + getReplyId(this)) {
clearTimeout(currentSoneMenuTimeoutHandler);
}
});
clearTimeout(currentSoneMenuTimeoutHandler);
}
});
@@
-1529,7
+1529,7
@@
function loadNewReply(replyId, soneId, postId, postSoneId) {
* request
*/
function markSoneAsKnown(soneElement, skipRequest) {
* request
*/
function markSoneAsKnown(soneElement, skipRequest) {
- if ($(soneElement).
is(".
new")) {
+ if ($(soneElement).
hasClass("
new")) {
$(soneElement).removeClass("new");
if ((typeof skipRequest == "undefined") || !skipRequest) {
ajaxGet("markAsKnown.ajax", {"formPassword": getFormPassword(), "type": "sone", "id": getSoneId(soneElement)});
$(soneElement).removeClass("new");
if ((typeof skipRequest == "undefined") || !skipRequest) {
ajaxGet("markAsKnown.ajax", {"formPassword": getFormPassword(), "type": "sone", "id": getSoneId(soneElement)});