From b0f33b02ce7532ab1bddf734d3e63c5597afb5a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Mon, 24 Apr 2017 17:49:02 +0200 Subject: [PATCH] phone: always use ajax to get list of phone calls (#15592) --- welco/sources/phone/views.py | 2 ++ welco/static/js/welco.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/welco/sources/phone/views.py b/welco/sources/phone/views.py index 056e5b1..955f8ef 100644 --- a/welco/sources/phone/views.py +++ b/welco/sources/phone/views.py @@ -41,6 +41,8 @@ class Home(object): zone.request = self.request context = RequestContext(self.request) context.update(zone.get_context_data()) + # always use ajax to get list of phone calls + del context['phonecalls'] tmpl = template.loader.get_template('welco/phone_home.html') return tmpl.render(context) diff --git a/welco/static/js/welco.js b/welco/static/js/welco.js index 549ef97..02c3229 100644 --- a/welco/static/js/welco.js +++ b/welco/static/js/welco.js @@ -572,7 +572,7 @@ $(function() { }); } } - window.setTimeout(check_calls, 1000); + check_calls(); } $('.qualif').delegate('a.create-formdata', 'click', function() {