PHRAS-46 #fix

PHRAS-16 #time 40h
This commit is contained in:
Jean-Yves Gaulier
2014-05-06 12:08:04 +02:00
committed by Nicolas Le Goff
parent 5563c34b8c
commit 192c2fbb55
17 changed files with 253 additions and 49 deletions

View File

@@ -1017,24 +1017,25 @@
</script>
<script type="text/javascript" src="{{ path('minifier', { 'g' : 'prod' }) }}"></script>
<script type="text/javascript">
$(document).ready(function(){
$(document).ready(function() {
p4.reg_delete="{% if app['authentication'].getUser().getPrefs("warning_on_delete_story") %}true{% else %}false{% endif %}";
});
function sessionactive(){
function pollNotifications(){
$.ajax({
type: "POST",
url: "{{ path('update_session') }}",
url: "{{ path('get_notifications') }}",
dataType: "json",
data: {
module : 1,
usr : {{app['authentication'].getUser().get_id()}}
},
error: function(){
window.setTimeout("sessionactive();", 10000);
window.setTimeout("pollNotifications();", 10000);
},
timeout: function(){
window.setTimeout("sessionactive();", 10000);
window.setTimeout("pollNotifications();", 10000);
},
success: function(data){
if(data)
@@ -1042,7 +1043,7 @@
var t = 120000;
if(data.apps && parseInt(data.apps)>1)
t = Math.round((Math.sqrt(parseInt(data.apps)-1) * 1.3 * 60000));
window.setTimeout("sessionactive();", t);
window.setTimeout("pollNotifications();", t);
return;
}