projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix javascript function declaration.
[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
591afa0
..
2b19c36
100644
(file)
--- a/
src/main/resources/static/javascript/sone.js
+++ b/
src/main/resources/static/javascript/sone.js
@@
-1091,7
+1091,7
@@
function ajaxifyNotification(notification) {
* Returns the notification hash. This hash is used in {@link #getStatus()} to
* determine whether the notifications changed and need to be reloaded.
*/
* Returns the notification hash. This hash is used in {@link #getStatus()} to
* determine whether the notifications changed and need to be reloaded.
*/
-
public
getNotificationHash() {
+
function
getNotificationHash() {
return $("#sone #notification-area #notification-hash").text();
}
return $("#sone #notification-area #notification-hash").text();
}
@@
-1101,7
+1101,7
@@
public getNotificationHash() {
* @param notificationHash
* The new notification hash
*/
* @param notificationHash
* The new notification hash
*/
-
public
setNotificationHash(notificationHash) {
+
function
setNotificationHash(notificationHash) {
$("#sone #notification-area #notification-hash").text(notificationHash);
}
$("#sone #notification-area #notification-hash").text(notificationHash);
}
@@
-1200,6
+1200,10
@@
function getStatus() {
if (!notLoggedIn) {
showOfflineMarker(!online);
}
if (!notLoggedIn) {
showOfflineMarker(!online);
}
+ if (data.notificationHash != getNotificationHash()) {
+ console.log("Old hash: ", getNotificationHash(), ", new hash: ", data.notificationHash);
+ setNotificationHash(data.notificationHash);
+ }
/* search for removed notifications. */
$("#sone #notification-area .notification").each(function() {
notificationId = $(this).attr("id");
/* search for removed notifications. */
$("#sone #notification-area .notification").each(function() {
notificationId = $(this).attr("id");