diff --git a/kfet/static/kfet/js/history.js b/kfet/static/kfet/js/history.js index a5f0bccc..fbae1226 100644 --- a/kfet/static/kfet/js/history.js +++ b/kfet/static/kfet/js/history.js @@ -32,6 +32,9 @@ class KHistory { if (!all_options.no_select) this.selection = new KHistorySelection(this); + if (!all_options.static) + OperationWebSocket.add_handler(data => this.update_data(data)); + var templates = all_options.templates if (all_options.no_trigramme) templates['opegroup'] = diff --git a/kfet/static/kfet/js/kpsul.js b/kfet/static/kfet/js/kpsul.js index 37246522..9b235972 100644 --- a/kfet/static/kfet/js/kpsul.js +++ b/kfet/static/kfet/js/kpsul.js @@ -438,6 +438,7 @@ class ArticleManager { this.autocomplete = new ArticleAutocomplete(this, $container); this._init_events(); + OperationWebSocket.add_handler(data => this.update_data(data)); } get nb() { diff --git a/kfet/templates/kfet/kpsul.html b/kfet/templates/kfet/kpsul.html index 36d4c3af..16119bce 100644 --- a/kfet/templates/kfet/kpsul.html +++ b/kfet/templates/kfet/kpsul.html @@ -759,8 +759,6 @@ $(document).ready(function() { // Synchronization // ----- - OperationWebSocket.add_handler(data => kpsul.history.update_data(data)); - OperationWebSocket.add_handler(data => kpsul.article_manager.update_data(data)); OperationWebSocket.add_handler(function(data) { if (data['addcost']) { Config.set('addcost_for', data['addcost']['for']);