tryton-sao 7.6.12 → 7.6.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG +5 -0
- package/dist/tryton-sao.js +12 -5
- package/package.json +1 -1
- package/src/chat.js +2 -1
- package/src/tab.js +10 -4
package/CHANGELOG
CHANGED
package/dist/tryton-sao.js
CHANGED
|
@@ -12210,9 +12210,11 @@ var Sao = {
|
|
|
12210
12210
|
if (chat.length) {
|
|
12211
12211
|
chat.remove();
|
|
12212
12212
|
} else {
|
|
12213
|
-
|
|
12214
|
-
|
|
12215
|
-
|
|
12213
|
+
if (this.screen.current_reference) {
|
|
12214
|
+
this._chat = new Sao.Chat(this.screen.current_reference);
|
|
12215
|
+
this._chat.refresh();
|
|
12216
|
+
this.sidebar_content.append(this._chat.el);
|
|
12217
|
+
}
|
|
12216
12218
|
}
|
|
12217
12219
|
this.update_sidebar();
|
|
12218
12220
|
},
|
|
@@ -12347,6 +12349,9 @@ var Sao = {
|
|
|
12347
12349
|
const view_type = this.screen.current_view.view_type;
|
|
12348
12350
|
var next_view_type = this.screen.next_view_type;
|
|
12349
12351
|
const has_views = this.screen.number_of_views > 1;
|
|
12352
|
+
let sensitive = (
|
|
12353
|
+
record_id >= 0 ? record_id !== null && record_id !== undefined :
|
|
12354
|
+
false);
|
|
12350
12355
|
var buttons = ['print', 'relate', 'email', 'attach', 'chat'];
|
|
12351
12356
|
for (const button_id of buttons) {
|
|
12352
12357
|
const button = this.buttons[button_id];
|
|
@@ -12366,7 +12371,7 @@ var Sao = {
|
|
|
12366
12371
|
return keyword == button_id;
|
|
12367
12372
|
});
|
|
12368
12373
|
}
|
|
12369
|
-
set_sensitive(button_id,
|
|
12374
|
+
set_sensitive(button_id, sensitive && can_be_sensitive);
|
|
12370
12375
|
}
|
|
12371
12376
|
set_sensitive(
|
|
12372
12377
|
'switch_',
|
|
@@ -12402,6 +12407,7 @@ var Sao = {
|
|
|
12402
12407
|
this._chat.refresh();
|
|
12403
12408
|
this.sidebar_content.append(this._chat.el);
|
|
12404
12409
|
}
|
|
12410
|
+
this.update_sidebar();
|
|
12405
12411
|
}
|
|
12406
12412
|
},
|
|
12407
12413
|
record_modified: function() {
|
|
@@ -29352,8 +29358,9 @@ function eval_pyson(value){
|
|
|
29352
29358
|
|
|
29353
29359
|
class _Chat {
|
|
29354
29360
|
constructor(record) {
|
|
29361
|
+
this.notify = this.notify.bind(this);
|
|
29355
29362
|
this.record = record;
|
|
29356
|
-
Sao.Bus.register(`chat:${this.record}`, this.notify
|
|
29363
|
+
Sao.Bus.register(`chat:${this.record}`, this.notify);
|
|
29357
29364
|
this.el = this.__build();
|
|
29358
29365
|
}
|
|
29359
29366
|
|
package/package.json
CHANGED
package/src/chat.js
CHANGED
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
class _Chat {
|
|
7
7
|
constructor(record) {
|
|
8
|
+
this.notify = this.notify.bind(this);
|
|
8
9
|
this.record = record;
|
|
9
|
-
Sao.Bus.register(`chat:${this.record}`, this.notify
|
|
10
|
+
Sao.Bus.register(`chat:${this.record}`, this.notify);
|
|
10
11
|
this.el = this.__build();
|
|
11
12
|
}
|
|
12
13
|
|
package/src/tab.js
CHANGED
|
@@ -1406,9 +1406,11 @@
|
|
|
1406
1406
|
if (chat.length) {
|
|
1407
1407
|
chat.remove();
|
|
1408
1408
|
} else {
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1409
|
+
if (this.screen.current_reference) {
|
|
1410
|
+
this._chat = new Sao.Chat(this.screen.current_reference);
|
|
1411
|
+
this._chat.refresh();
|
|
1412
|
+
this.sidebar_content.append(this._chat.el);
|
|
1413
|
+
}
|
|
1412
1414
|
}
|
|
1413
1415
|
this.update_sidebar();
|
|
1414
1416
|
},
|
|
@@ -1543,6 +1545,9 @@
|
|
|
1543
1545
|
const view_type = this.screen.current_view.view_type;
|
|
1544
1546
|
var next_view_type = this.screen.next_view_type;
|
|
1545
1547
|
const has_views = this.screen.number_of_views > 1;
|
|
1548
|
+
let sensitive = (
|
|
1549
|
+
record_id >= 0 ? record_id !== null && record_id !== undefined :
|
|
1550
|
+
false);
|
|
1546
1551
|
var buttons = ['print', 'relate', 'email', 'attach', 'chat'];
|
|
1547
1552
|
for (const button_id of buttons) {
|
|
1548
1553
|
const button = this.buttons[button_id];
|
|
@@ -1562,7 +1567,7 @@
|
|
|
1562
1567
|
return keyword == button_id;
|
|
1563
1568
|
});
|
|
1564
1569
|
}
|
|
1565
|
-
set_sensitive(button_id,
|
|
1570
|
+
set_sensitive(button_id, sensitive && can_be_sensitive);
|
|
1566
1571
|
}
|
|
1567
1572
|
set_sensitive(
|
|
1568
1573
|
'switch_',
|
|
@@ -1598,6 +1603,7 @@
|
|
|
1598
1603
|
this._chat.refresh();
|
|
1599
1604
|
this.sidebar_content.append(this._chat.el);
|
|
1600
1605
|
}
|
|
1606
|
+
this.update_sidebar();
|
|
1601
1607
|
}
|
|
1602
1608
|
},
|
|
1603
1609
|
record_modified: function() {
|