forked from DGNum/gestioCOF
Move ws update to respective classes
This commit is contained in:
parent
8b8a3f8a25
commit
31b742fdb7
3 changed files with 4 additions and 2 deletions
|
@ -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'] =
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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']);
|
||||
|
|
Loading…
Reference in a new issue