Rename history var

This commit is contained in:
Ludovic Stephan 2017-04-05 12:13:24 -03:00
parent 88f7ea941d
commit f57c292184
2 changed files with 6 additions and 10 deletions

View file

@ -102,18 +102,15 @@
$(document).ready(function() { $(document).ready(function() {
'use strict'; 'use strict';
// Lock to avoid multiple requests var khistory = new KHistory({'remove_props': ['trigramme']});
window.lock = 0;
var history = new KHistory({'remove_props': ['trigramme']});
// ----- // -----
// Synchronization // 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}}]}));
}); });
</script> </script>

View file

@ -64,8 +64,7 @@
$(document).ready(function() { $(document).ready(function() {
'use strict'; 'use strict';
var khistory = new KHistory();
var history = new KHistory();
var $from_date = $('#from_date'); var $from_date = $('#from_date');
var $to_date = $('#to_date'); var $to_date = $('#to_date');
@ -95,7 +94,7 @@ $(document).ready(function() {
data['accounts'] = accounts; data['accounts'] = accounts;
// Update history // Update history
history.fetch(data); khistory.fetch(data);
} }
$('#from_date').datetimepicker({ $('#from_date').datetimepicker({
@ -134,7 +133,7 @@ $(document).ready(function() {
// Synchronization // Synchronization
// ----- // -----
OperationWebSocket.add_handler(data => history.update_data(data)); OperationWebSocket.add_handler(data => khistory.update_data(data));