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() {
'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}}]}));
});
</script>

View file

@ -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));