Don’t cache AJAX requests.
[Sone.git] / src / main / resources / static / javascript / sone.js
index 3339d18..598c408 100644 (file)
@@ -2,7 +2,7 @@
 
 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);
@@ -872,7 +872,7 @@ function ajaxifyPost(postElement) {
                        }).fadeIn();
                }, 1000);
        }).mouseleave(function() {
-               if (currentSoneMenuId = getPostId(this)) {
+               if (currentSoneMenuId == getPostId(this)) {
                        clearTimeout(currentSoneMenuTimeoutHandler);
                }
        });
@@ -1011,7 +1011,7 @@ function ajaxifyReply(replyElement) {
                        }).fadeIn();
                }, 1000);
        }).mouseleave(function() {
-               if (currentSoneMenuId = getPostId(this) + "-" + getReplyId(this)) {
+               if (currentSoneMenuId == getPostId(this) + "-" + getReplyId(this)) {
                        clearTimeout(currentSoneMenuTimeoutHandler);
                }
        });