projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Store whether we are focussed in a flag.
[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
f195d59
..
472df5a
100644
(file)
--- a/
src/main/resources/static/javascript/sone.js
+++ b/
src/main/resources/static/javascript/sone.js
@@
-722,6
+722,8
@@
function createNotification(id, text, dismissable) {
// EVERYTHING BELOW HERE IS EXECUTED AFTER LOADING THE PAGE
//
// EVERYTHING BELOW HERE IS EXECUTED AFTER LOADING THE PAGE
//
+var focus = true;
+
$(document).ready(function() {
/* this initializes the status update input field. */
$(document).ready(function() {
/* this initializes the status update input field. */
@@
-824,7
+826,10
@@
$(document).ready(function() {
/* reset activity counter when the page has focus. */
$(window).focus(function() {
/* reset activity counter when the page has focus. */
$(window).focus(function() {
+ focus = true;
resetActivity();
resetActivity();
- });
+ }).blur(function() {
+ focus = false;
+ })
});
});