fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'img-playground' of ssh://git.nowoczesnapolska.org.pl:2223/~/repo/redakc...
[redakcja.git]
/
redakcja
/
static
/
js
/
wiki
/
loader.js
diff --git
a/redakcja/static/js/wiki/loader.js
b/redakcja/static/js/wiki/loader.js
index
7e03c39
..
da95172
100644
(file)
--- a/
redakcja/static/js/wiki/loader.js
+++ b/
redakcja/static/js/wiki/loader.js
@@
-5,7
+5,7
@@
if (!window.console) {
}
}
}
}
-var DEFAULT_PERSPECTIVE = "#
Summary
Perspective";
+var DEFAULT_PERSPECTIVE = "#
Visual
Perspective";
$(function()
{
$(function()
{
@@
-33,6
+33,7
@@
$(function()
* TABS
*/
$('.tabs li').live('click', function(event, callback) {
* TABS
*/
$('.tabs li').live('click', function(event, callback) {
+ event.preventDefault();
$.wiki.switchToTab(this);
});
$.wiki.switchToTab(this);
});
@@
-110,6
+111,14
@@
$(function()
console.log("Initial tab is:", active_tab)
$.wiki.switchToTab(active_tab);
console.log("Initial tab is:", active_tab)
$.wiki.switchToTab(active_tab);
+
+ /* every 5 minutes check for a newer version */
+ var revTimer = setInterval(function() {
+ CurrentDocument.checkRevision({outdated: function(){
+ $('#header').addClass('out-of-date');
+ clearInterval(revTimer);
+ }});
+ }, 300000);
},
failure: function() {
$('#loading-overlay').fadeOut();
},
failure: function() {
$('#loading-overlay').fadeOut();