mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 09:53:15 +00:00
PHRAS-46 #fix
PHRAS-16 #time 40h
This commit is contained in:

committed by
Nicolas Le Goff

parent
5563c34b8c
commit
192c2fbb55
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user