set timeout for checkTask() function

This commit is contained in:
Uwe Steinmann 2015-07-10 08:28:19 +02:00
parent a6541296a1
commit 4f2392e492

View File

@ -698,7 +698,11 @@ $(document).ready(function() {
var approval_count, review_count, receipt_count, revision_count;
var checkTasks = function() {
$.get('../op/op.Ajax.php', { command: 'mytasks' }, function(data) {
$.ajax({url: '../op/op.Ajax.php',
type: 'GET',
dataType: "json",
data: {command: 'mytasks'},
success: function(data) {
if(approval_count != data.data.approval.length ||
review_count != data.data.review.length ||
receipt_count != data.data.receipt.length ||
@ -709,7 +713,9 @@ $(document).ready(function() {
receipt_count = data.data.receipt.length;
revision_count = data.data.revision.length;
}
}, 'json');
},
timeout: 200
});
timeOutId = setTimeout(checkTasks, 10000);
}
//checkTasks();