Commit d80ad68f authored by Tristan Cavelier's avatar Tristan Cavelier

Fix bug: show activity application now works on Chrome

parent 5aebc8b2
<!DOCTYPE html> <h2>Activities</h2>
<html> <div id="activities"></div>
<head> <script type="text/javascript">
</head> <!--
<body>
<h2>Activities</h2>
<div id="workinprogress"></div>
<script type="text/javascript">
<!--
(function() { (function() {
var id; var id;
if (!window.workinprogress) { if (typeof work_in_progress !== 'object') {
id = null; id = null;
window.workinprogress = { work_in_progress = {
start:function(){ start:function(){
if (id === null) { if (id === null) {
var update = function () { var update = function () {
...@@ -20,9 +15,9 @@ ...@@ -20,9 +15,9 @@
str += act[i] + '<br />'; str += act[i] + '<br />';
} }
if (str === '') { 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(); update();
id = setInterval (update, 200); id = setInterval (update, 200);
...@@ -38,6 +33,4 @@ ...@@ -38,6 +33,4 @@
} }
}()); }());
//--> //-->
</script> </script>
</body>
</html>
...@@ -183,15 +183,15 @@ ...@@ -183,15 +183,15 @@
onload: function () { onload: function () {
var i = null, wait = function() { var i = null, wait = function() {
// wait for workinprogress initialization end. // wait for workinprogress initialization end.
if (window.workinprogress) { if (window.work_in_progress) {
window.workinprogress.start(); window.work_in_progress.start();
clearInterval(i); clearInterval(i);
} }
} }
i = setInterval (wait,100); i = setInterval (wait,100);
}, },
onunload: function () { onunload: function () {
window.workinprogress.stop(); window.work_in_progress.stop();
return true; 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