Commit d80ad68f authored by Tristan Cavelier's avatar Tristan Cavelier

Fix bug: show activity application now works on Chrome

parent 5aebc8b2
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<h2>Activities</h2>
<div id="workinprogress"></div>
<script type="text/javascript">
<!--
<h2>Activities</h2>
<div id="activities"></div>
<script type="text/javascript">
<!--
(function() {
var id;
if (!window.workinprogress) {
if (typeof work_in_progress !== 'object') {
id = null;
window.workinprogress = {
work_in_progress = {
start:function(){
if (id === null) {
var update = function () {
......@@ -20,9 +15,9 @@
str += act[i] + '<br />';
}
if (str === '') {
str = 'There is no on going tasks.';
str = 'There is no on going tasks.<br />';
}
document.querySelector('#workinprogress').innerHTML=str;
document.getElementById('activities').innerHTML = str;
};
update();
id = setInterval (update, 200);
......@@ -38,6 +33,4 @@
}
}());
//-->
</script>
</body>
</html>
</script>
......@@ -183,15 +183,15 @@
onload: function () {
var i = null, wait = function() {
// wait for workinprogress initialization end.
if (window.workinprogress) {
window.workinprogress.start();
if (window.work_in_progress) {
window.work_in_progress.start();
clearInterval(i);
}
}
i = setInterval (wait,100);
},
onunload: function () {
window.workinprogress.stop();
window.work_in_progress.stop();
return true;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment