diff --git a/kfet/templates/kfet/history.html b/kfet/templates/kfet/history.html index 5bcb960b..6d1b7497 100644 --- a/kfet/templates/kfet/history.html +++ b/kfet/templates/kfet/history.html @@ -135,7 +135,7 @@ $(document).ready(function() { // Synchronization // ----- - OperationWebSocket.add_handler(history.update_data); + OperationWebSocket.add_handler(data => history.update_data(data)); diff --git a/kfet/templates/kfet/kpsul.html b/kfet/templates/kfet/kpsul.html index a15546bb..e8bc3c39 100644 --- a/kfet/templates/kfet/kpsul.html +++ b/kfet/templates/kfet/kpsul.html @@ -667,19 +667,6 @@ $(document).ready(function() { } - // ----- - // Synchronization - // ----- - - OperationWebSocket.add_handler(kpsul.history.update_data); - OperationWebSocket.add_handler(kpsul.article_manager.update_data); - OperationWebSocket.add_handler(function(data) { - if (data['addcost']) { - Config.set('addcost_for', data['addcost']['for']); - Config.set('addcost_amount', data['addcost']['amount']); - displayAddcost(); - } - }); // ----- // General @@ -789,6 +776,20 @@ $(document).ready(function() { window.kpsul = new KPsulManager(env); + // ----- + // 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']); + Config.set('addcost_amount', data['addcost']['amount']); + displayAddcost(); + } + }); + hardReset(); }); diff --git a/kfet/templates/kfet/transfers.html b/kfet/templates/kfet/transfers.html index 2c878f3c..15a546a9 100644 --- a/kfet/templates/kfet/transfers.html +++ b/kfet/templates/kfet/transfers.html @@ -11,7 +11,6 @@ - {% endblock %}