WIP: Aureplop/kpsul js refactor #501
3 changed files with 4 additions and 2 deletions
|
@ -32,6 +32,9 @@ class KHistory {
|
||||||
if (!all_options.no_select)
|
if (!all_options.no_select)
|
||||||
this.selection = new KHistorySelection(this);
|
this.selection = new KHistorySelection(this);
|
||||||
|
|
||||||
|
if (!all_options.static)
|
||||||
|
OperationWebSocket.add_handler(data => this.update_data(data));
|
||||||
|
|
||||||
var templates = all_options.templates
|
var templates = all_options.templates
|
||||||
if (all_options.no_trigramme)
|
if (all_options.no_trigramme)
|
||||||
templates['opegroup'] =
|
templates['opegroup'] =
|
||||||
|
|
|
@ -438,6 +438,7 @@ class ArticleManager {
|
||||||
this.autocomplete = new ArticleAutocomplete(this, $container);
|
this.autocomplete = new ArticleAutocomplete(this, $container);
|
||||||
|
|
||||||
this._init_events();
|
this._init_events();
|
||||||
|
OperationWebSocket.add_handler(data => this.update_data(data));
|
||||||
}
|
}
|
||||||
|
|
||||||
get nb() {
|
get nb() {
|
||||||
|
|
|
@ -759,8 +759,6 @@ $(document).ready(function() {
|
||||||
// Synchronization
|
// 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) {
|
OperationWebSocket.add_handler(function(data) {
|
||||||
if (data['addcost']) {
|
if (data['addcost']) {
|
||||||
Config.set('addcost_for', data['addcost']['for']);
|
Config.set('addcost_for', data['addcost']['for']);
|
||||||
|
|
Loading…
Add table
Reference in a new issue