From f57c292184441fa68acf609d0ba9bc938e1c5dd9 Mon Sep 17 00:00:00 2001 From: Ludovic Stephan Date: Wed, 5 Apr 2017 12:13:24 -0300 Subject: [PATCH] Rename history var --- kfet/templates/kfet/account_read.html | 9 +++------ kfet/templates/kfet/history.html | 7 +++---- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/kfet/templates/kfet/account_read.html b/kfet/templates/kfet/account_read.html index b11a2cb0..206b40ce 100644 --- a/kfet/templates/kfet/account_read.html +++ b/kfet/templates/kfet/account_read.html @@ -102,18 +102,15 @@ $(document).ready(function() { 'use strict'; - // Lock to avoid multiple requests - window.lock = 0; - - var history = new KHistory({'remove_props': ['trigramme']}); + var khistory = new KHistory({'remove_props': ['trigramme']}); // ----- // Synchronization // ----- - OperationWebSocket.add_handler((data) => history.update_data(data)); + OperationWebSocket.add_handler((data) => khistory.update_data(data)); - Config.reset(() => history.fetch({'accounts': [{{account.pk}}]})); + Config.reset(() => khistory.fetch({'accounts': [{{account.pk}}]})); }); diff --git a/kfet/templates/kfet/history.html b/kfet/templates/kfet/history.html index 1d0d8e06..864396eb 100644 --- a/kfet/templates/kfet/history.html +++ b/kfet/templates/kfet/history.html @@ -64,8 +64,7 @@ $(document).ready(function() { 'use strict'; - - var history = new KHistory(); + var khistory = new KHistory(); var $from_date = $('#from_date'); var $to_date = $('#to_date'); @@ -95,7 +94,7 @@ $(document).ready(function() { data['accounts'] = accounts; // Update history - history.fetch(data); + khistory.fetch(data); } $('#from_date').datetimepicker({ @@ -134,7 +133,7 @@ $(document).ready(function() { // Synchronization // ----- - OperationWebSocket.add_handler(data => history.update_data(data)); + OperationWebSocket.add_handler(data => khistory.update_data(data));