tryton-sao 7.8.0 → 7.8.2
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 +10 -0
- package/dist/tryton-sao.js +39 -25
- package/package.json +1 -1
- package/src/chat.js +2 -1
- package/src/common.js +15 -14
- package/src/notification.js +4 -1
- package/src/sao.js +7 -4
- package/src/tab.js +11 -5
- package/dist/tryton-sao.min.css +0 -10525
package/CHANGELOG
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
|
|
2
|
+
Version 7.8.2 - 2026-01-02
|
|
3
|
+
--------------------------
|
|
4
|
+
* Bug fixes (see mercurial logs for details)
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Version 7.8.1 - 2025-12-20
|
|
8
|
+
--------------------------
|
|
9
|
+
* Bug fixes (see mercurial logs for details)
|
|
10
|
+
|
|
11
|
+
|
|
2
12
|
Version 7.8.0 - 2025-12-15
|
|
3
13
|
--------------------------
|
|
4
14
|
* Bug fixes (see mercurial logs for details)
|
package/dist/tryton-sao.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
/* eslint-disable no-redeclare */
|
|
5
5
|
var Sao = {
|
|
6
|
-
__version__: '7.8.
|
|
6
|
+
__version__: '7.8.2',
|
|
7
7
|
};
|
|
8
8
|
/* eslint-enable no-redeclare */
|
|
9
9
|
|
|
@@ -357,6 +357,9 @@ var Sao = {
|
|
|
357
357
|
return lang.replace('_', '-');
|
|
358
358
|
};
|
|
359
359
|
Sao.i18n.set_direction = function(direction) {
|
|
360
|
+
if (!direction) {
|
|
361
|
+
direction = getComputedStyle(document.documentElement).direction;
|
|
362
|
+
}
|
|
360
363
|
Sao.i18n.rtl = (direction === 'rtl');
|
|
361
364
|
jQuery('html').attr('dir', direction);
|
|
362
365
|
};
|
|
@@ -590,6 +593,7 @@ var Sao = {
|
|
|
590
593
|
Sao.login = function() {
|
|
591
594
|
Sao.set_title();
|
|
592
595
|
Sao.i18n.setlang().always(function() {
|
|
596
|
+
Sao.i18n.set_direction();
|
|
593
597
|
Sao.Session.server_version()
|
|
594
598
|
.then(function(version) {
|
|
595
599
|
if (JSON.stringify(version.split('.').slice(0, 2)) !==
|
|
@@ -614,8 +618,7 @@ var Sao = {
|
|
|
614
618
|
let user_id = Sao.Session.current_session.user_id;
|
|
615
619
|
Sao.Bus.register(
|
|
616
620
|
`notification:${user_id}`,
|
|
617
|
-
Sao.NotificationMenu.notify
|
|
618
|
-
.bind(Sao.NotificationMenu));
|
|
621
|
+
Sao.NotificationMenu.notify);
|
|
619
622
|
Sao.NotificationMenu.count();
|
|
620
623
|
Sao.Bus.listen();
|
|
621
624
|
|
|
@@ -642,7 +645,7 @@ var Sao = {
|
|
|
642
645
|
jQuery('#menu').empty();
|
|
643
646
|
let user_id = Sao.Session.current_session.user_id;
|
|
644
647
|
Sao.Bus.unregister(
|
|
645
|
-
`notification:${user_id}`, Sao.NotificationMenu.
|
|
648
|
+
`notification:${user_id}`, Sao.NotificationMenu.notify);
|
|
646
649
|
session.do_logout().always(Sao.login);
|
|
647
650
|
Sao.set_title();
|
|
648
651
|
});
|
|
@@ -6939,21 +6942,22 @@ var Sao = {
|
|
|
6939
6942
|
'white-space': 'pre-wrap',
|
|
6940
6943
|
'word-break': 'break-all',
|
|
6941
6944
|
}));
|
|
6942
|
-
alert_.append(jQuery('<p/>').append(jQuery('<a/>', {
|
|
6943
|
-
'class': 'btn btn-default',
|
|
6944
|
-
role: 'button',
|
|
6945
|
-
'data-toggle': 'collapse',
|
|
6946
|
-
'data-target': '#error-detail',
|
|
6947
|
-
'aria-expanded': false,
|
|
6948
|
-
'aria-controls': '#error-detail',
|
|
6949
|
-
}).text(Sao.i18n.gettext("Details"))));
|
|
6950
6945
|
if (details) {
|
|
6951
|
-
alert_.append(
|
|
6952
|
-
'
|
|
6953
|
-
|
|
6954
|
-
|
|
6955
|
-
|
|
6956
|
-
|
|
6946
|
+
alert_.append(
|
|
6947
|
+
jQuery('<p/>').append(jQuery('<a/>', {
|
|
6948
|
+
'class': 'btn btn-default',
|
|
6949
|
+
role: 'button',
|
|
6950
|
+
'data-toggle': 'collapse',
|
|
6951
|
+
'data-target': '#error-detail',
|
|
6952
|
+
'aria-expanded': false,
|
|
6953
|
+
'aria-controls': '#error-detail',
|
|
6954
|
+
}).text(Sao.i18n.gettext("Details"))))
|
|
6955
|
+
.append(jQuery('<p/>', {
|
|
6956
|
+
'class': 'collapse',
|
|
6957
|
+
id: 'error-detail',
|
|
6958
|
+
}).append(jQuery('<pre/>', {
|
|
6959
|
+
'class': 'pre-scrollable',
|
|
6960
|
+
}).text(details)));
|
|
6957
6961
|
}
|
|
6958
6962
|
jQuery('<a/>', {
|
|
6959
6963
|
'class': 'btn btn-link',
|
|
@@ -12173,9 +12177,11 @@ var Sao = {
|
|
|
12173
12177
|
if (chat.length) {
|
|
12174
12178
|
chat.remove();
|
|
12175
12179
|
} else {
|
|
12176
|
-
|
|
12177
|
-
|
|
12178
|
-
|
|
12180
|
+
if (this.screen.current_reference) {
|
|
12181
|
+
this._chat = new Sao.Chat(this.screen.current_reference);
|
|
12182
|
+
this._chat.refresh();
|
|
12183
|
+
this.sidebar_content.append(this._chat.el);
|
|
12184
|
+
}
|
|
12179
12185
|
}
|
|
12180
12186
|
this.update_sidebar();
|
|
12181
12187
|
},
|
|
@@ -12310,6 +12316,9 @@ var Sao = {
|
|
|
12310
12316
|
const view_type = this.screen.current_view.view_type;
|
|
12311
12317
|
var next_view_type = this.screen.next_view_type;
|
|
12312
12318
|
const has_views = this.screen.number_of_views > 1;
|
|
12319
|
+
let sensitive = (
|
|
12320
|
+
record_id >= 0 ? record_id !== null && record_id !== undefined :
|
|
12321
|
+
false);
|
|
12313
12322
|
var buttons = ['print', 'relate', 'email', 'attach', 'chat'];
|
|
12314
12323
|
for (const button_id of buttons) {
|
|
12315
12324
|
const button = this.buttons[button_id];
|
|
@@ -12329,10 +12338,10 @@ var Sao = {
|
|
|
12329
12338
|
return keyword == button_id;
|
|
12330
12339
|
});
|
|
12331
12340
|
}
|
|
12332
|
-
set_sensitive(button_id,
|
|
12341
|
+
set_sensitive(button_id, sensitive && can_be_sensitive);
|
|
12333
12342
|
}
|
|
12334
12343
|
for (let button_id of ['reload', 'action']) {
|
|
12335
|
-
set_sensitive(button_id,
|
|
12344
|
+
set_sensitive(button_id, sensitive);
|
|
12336
12345
|
}
|
|
12337
12346
|
set_sensitive(
|
|
12338
12347
|
'switch_',
|
|
@@ -12368,6 +12377,7 @@ var Sao = {
|
|
|
12368
12377
|
this._chat.refresh();
|
|
12369
12378
|
this.sidebar_content.append(this._chat.el);
|
|
12370
12379
|
}
|
|
12380
|
+
this.update_sidebar();
|
|
12371
12381
|
}
|
|
12372
12382
|
},
|
|
12373
12383
|
record_modified: function() {
|
|
@@ -29407,8 +29417,9 @@ function eval_pyson(value){
|
|
|
29407
29417
|
|
|
29408
29418
|
class _Chat {
|
|
29409
29419
|
constructor(record) {
|
|
29420
|
+
this.notify = this.notify.bind(this);
|
|
29410
29421
|
this.record = record;
|
|
29411
|
-
Sao.Bus.register(`chat:${this.record}`, this.notify
|
|
29422
|
+
Sao.Bus.register(`chat:${this.record}`, this.notify);
|
|
29412
29423
|
this.el = this.__build();
|
|
29413
29424
|
}
|
|
29414
29425
|
|
|
@@ -29611,6 +29622,7 @@ function eval_pyson(value){
|
|
|
29611
29622
|
|
|
29612
29623
|
class _NotificationMenu {
|
|
29613
29624
|
constructor() {
|
|
29625
|
+
this.notify = this.notify.bind(this);
|
|
29614
29626
|
this.el = jQuery('<ul/>', {
|
|
29615
29627
|
'class': 'notification-menu dropdown-menu',
|
|
29616
29628
|
'role': 'menu',
|
|
@@ -29645,9 +29657,11 @@ function eval_pyson(value){
|
|
|
29645
29657
|
}).append(jQuery('<span/>', {
|
|
29646
29658
|
'class': 'notification-label',
|
|
29647
29659
|
'text': notification.label,
|
|
29660
|
+
'title': notification.label,
|
|
29648
29661
|
})).append(jQuery('<span/>', {
|
|
29649
29662
|
'class': 'notification-description',
|
|
29650
|
-
'text': notification.description
|
|
29663
|
+
'text': notification.description,
|
|
29664
|
+
'title': notification.description,
|
|
29651
29665
|
}));
|
|
29652
29666
|
let link = jQuery('<a/>', {
|
|
29653
29667
|
'role': 'menuitem',
|
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/common.js
CHANGED
|
@@ -3639,21 +3639,22 @@
|
|
|
3639
3639
|
'white-space': 'pre-wrap',
|
|
3640
3640
|
'word-break': 'break-all',
|
|
3641
3641
|
}));
|
|
3642
|
-
alert_.append(jQuery('<p/>').append(jQuery('<a/>', {
|
|
3643
|
-
'class': 'btn btn-default',
|
|
3644
|
-
role: 'button',
|
|
3645
|
-
'data-toggle': 'collapse',
|
|
3646
|
-
'data-target': '#error-detail',
|
|
3647
|
-
'aria-expanded': false,
|
|
3648
|
-
'aria-controls': '#error-detail',
|
|
3649
|
-
}).text(Sao.i18n.gettext("Details"))));
|
|
3650
3642
|
if (details) {
|
|
3651
|
-
alert_.append(
|
|
3652
|
-
'
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3643
|
+
alert_.append(
|
|
3644
|
+
jQuery('<p/>').append(jQuery('<a/>', {
|
|
3645
|
+
'class': 'btn btn-default',
|
|
3646
|
+
role: 'button',
|
|
3647
|
+
'data-toggle': 'collapse',
|
|
3648
|
+
'data-target': '#error-detail',
|
|
3649
|
+
'aria-expanded': false,
|
|
3650
|
+
'aria-controls': '#error-detail',
|
|
3651
|
+
}).text(Sao.i18n.gettext("Details"))))
|
|
3652
|
+
.append(jQuery('<p/>', {
|
|
3653
|
+
'class': 'collapse',
|
|
3654
|
+
id: 'error-detail',
|
|
3655
|
+
}).append(jQuery('<pre/>', {
|
|
3656
|
+
'class': 'pre-scrollable',
|
|
3657
|
+
}).text(details)));
|
|
3657
3658
|
}
|
|
3658
3659
|
jQuery('<a/>', {
|
|
3659
3660
|
'class': 'btn btn-link',
|
package/src/notification.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
class _NotificationMenu {
|
|
8
8
|
constructor() {
|
|
9
|
+
this.notify = this.notify.bind(this);
|
|
9
10
|
this.el = jQuery('<ul/>', {
|
|
10
11
|
'class': 'notification-menu dropdown-menu',
|
|
11
12
|
'role': 'menu',
|
|
@@ -40,9 +41,11 @@
|
|
|
40
41
|
}).append(jQuery('<span/>', {
|
|
41
42
|
'class': 'notification-label',
|
|
42
43
|
'text': notification.label,
|
|
44
|
+
'title': notification.label,
|
|
43
45
|
})).append(jQuery('<span/>', {
|
|
44
46
|
'class': 'notification-description',
|
|
45
|
-
'text': notification.description
|
|
47
|
+
'text': notification.description,
|
|
48
|
+
'title': notification.description,
|
|
46
49
|
}));
|
|
47
50
|
let link = jQuery('<a/>', {
|
|
48
51
|
'role': 'menuitem',
|
package/src/sao.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
/* eslint-disable no-redeclare */
|
|
5
5
|
var Sao = {
|
|
6
|
-
__version__: '7.8.
|
|
6
|
+
__version__: '7.8.2',
|
|
7
7
|
};
|
|
8
8
|
/* eslint-enable no-redeclare */
|
|
9
9
|
|
|
@@ -357,6 +357,9 @@ var Sao = {
|
|
|
357
357
|
return lang.replace('_', '-');
|
|
358
358
|
};
|
|
359
359
|
Sao.i18n.set_direction = function(direction) {
|
|
360
|
+
if (!direction) {
|
|
361
|
+
direction = getComputedStyle(document.documentElement).direction;
|
|
362
|
+
}
|
|
360
363
|
Sao.i18n.rtl = (direction === 'rtl');
|
|
361
364
|
jQuery('html').attr('dir', direction);
|
|
362
365
|
};
|
|
@@ -590,6 +593,7 @@ var Sao = {
|
|
|
590
593
|
Sao.login = function() {
|
|
591
594
|
Sao.set_title();
|
|
592
595
|
Sao.i18n.setlang().always(function() {
|
|
596
|
+
Sao.i18n.set_direction();
|
|
593
597
|
Sao.Session.server_version()
|
|
594
598
|
.then(function(version) {
|
|
595
599
|
if (JSON.stringify(version.split('.').slice(0, 2)) !==
|
|
@@ -614,8 +618,7 @@ var Sao = {
|
|
|
614
618
|
let user_id = Sao.Session.current_session.user_id;
|
|
615
619
|
Sao.Bus.register(
|
|
616
620
|
`notification:${user_id}`,
|
|
617
|
-
Sao.NotificationMenu.notify
|
|
618
|
-
.bind(Sao.NotificationMenu));
|
|
621
|
+
Sao.NotificationMenu.notify);
|
|
619
622
|
Sao.NotificationMenu.count();
|
|
620
623
|
Sao.Bus.listen();
|
|
621
624
|
|
|
@@ -642,7 +645,7 @@ var Sao = {
|
|
|
642
645
|
jQuery('#menu').empty();
|
|
643
646
|
let user_id = Sao.Session.current_session.user_id;
|
|
644
647
|
Sao.Bus.unregister(
|
|
645
|
-
`notification:${user_id}`, Sao.NotificationMenu.
|
|
648
|
+
`notification:${user_id}`, Sao.NotificationMenu.notify);
|
|
646
649
|
session.do_logout().always(Sao.login);
|
|
647
650
|
Sao.set_title();
|
|
648
651
|
});
|
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,10 +1567,10 @@
|
|
|
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
|
for (let button_id of ['reload', 'action']) {
|
|
1568
|
-
set_sensitive(button_id,
|
|
1573
|
+
set_sensitive(button_id, sensitive);
|
|
1569
1574
|
}
|
|
1570
1575
|
set_sensitive(
|
|
1571
1576
|
'switch_',
|
|
@@ -1601,6 +1606,7 @@
|
|
|
1601
1606
|
this._chat.refresh();
|
|
1602
1607
|
this.sidebar_content.append(this._chat.el);
|
|
1603
1608
|
}
|
|
1609
|
+
this.update_sidebar();
|
|
1604
1610
|
}
|
|
1605
1611
|
},
|
|
1606
1612
|
record_modified: function() {
|