tryton-sao 6.2.11 → 6.2.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 CHANGED
@@ -1,3 +1,9 @@
1
+ Version 6.2.13 - 2022-10-17
2
+ * Bug fixes (see mercurial logs for details)
3
+
4
+ Version 6.2.12 - 2022-08-17
5
+ * Bug fixes (see mercurial logs for details)
6
+
1
7
  Version 6.2.11 - 2022-07-01
2
8
  * Bug fixes (see mercurial logs for details)
3
9
 
@@ -9164,9 +9164,10 @@ html[theme="default"] .carousel-caption h6 {
9164
9164
  content: "";
9165
9165
  background-color: rgba(0, 0, 0, 0);
9166
9166
  }
9167
- button {
9168
- overflow-y: hidden;
9167
+ .btn-horizontal {
9168
+ overflow: hidden;
9169
9169
  text-overflow: ellipsis;
9170
+ white-space: nowrap;
9170
9171
  }
9171
9172
  .input-group > .form-control-feedback {
9172
9173
  z-index: 3;
@@ -505,8 +505,8 @@ var Sao = {};
505
505
  }
506
506
  function open_wizard(path) {
507
507
  var attributes = {};
508
- attributes.name = path[0];
509
- if (!attributes.name) {
508
+ attributes.action = path[0];
509
+ if (!attributes.action) {
510
510
  return;
511
511
  }
512
512
  try {
@@ -3160,7 +3160,7 @@ var Sao = {};
3160
3160
 
3161
3161
  Sao.common.date_format = function(format) {
3162
3162
  if (jQuery.isEmptyObject(format)) {
3163
- format = '%Y-%m-%d';
3163
+ format = '%x';
3164
3164
  if (Sao.Session.current_session) {
3165
3165
  var context = Sao.Session.current_session.context;
3166
3166
  if (context.locale && context.locale.date) {
@@ -3794,8 +3794,9 @@ var Sao = {};
3794
3794
  }).prependTo(this.el);
3795
3795
  this.icon.hide();
3796
3796
  }
3797
- this.el.addClass(
3798
- ['btn', (style || 'btn-default'), (size || '')].join(' '));
3797
+ this.el.addClass([
3798
+ 'btn', 'btn-horizontal',
3799
+ (style || 'btn-default'), (size || '')].join(' '));
3799
3800
  this.el.attr('type', 'button');
3800
3801
  this.icon.attr('aria-hidden', true);
3801
3802
  this.set_icon(attributes.icon);
@@ -11643,20 +11644,17 @@ var Sao = {};
11643
11644
  },
11644
11645
  _close_allowed: function() {
11645
11646
  var wizard = this.wizard;
11646
- var prm = jQuery.when();
11647
11647
  if ((wizard.state !== wizard.end_state) &&
11648
11648
  (wizard.end_state in wizard.states)) {
11649
- prm = wizard.response(
11649
+ wizard.response(
11650
11650
  wizard.states[wizard.end_state].attributes);
11651
11651
  }
11652
11652
  var dfd = jQuery.Deferred();
11653
- prm.always(function() {
11654
- if (wizard.state === wizard.end_state) {
11655
- dfd.resolve();
11656
- } else {
11657
- dfd.reject();
11658
- }
11659
- });
11653
+ if (wizard.state === wizard.end_state) {
11654
+ dfd.resolve();
11655
+ } else {
11656
+ dfd.reject();
11657
+ }
11660
11658
  return dfd.promise();
11661
11659
  }
11662
11660
  });
@@ -14688,7 +14686,7 @@ function eval_pyson(value){
14688
14686
  i = 0;
14689
14687
  row.children().map(function() {
14690
14688
  var cell = jQuery(this);
14691
- var colspan = Math.min(Number(cell.attr('colspan')), col);
14689
+ var colspan = Math.min(Number(cell.attr('colspan')), col || 1);
14692
14690
  if (cell.hasClass('xexpand') &&
14693
14691
  (!jQuery.isEmptyObject(cell.children())) &&
14694
14692
  (cell.children(':not(.tooltip)').css('display') != 'none')) {
@@ -14708,7 +14706,7 @@ function eval_pyson(value){
14708
14706
  var reduce = function(previous, current) {
14709
14707
  var cell = current[0];
14710
14708
  var colspan = Math.min(
14711
- Number(cell.attr('colspan')), col);
14709
+ Number(cell.attr('colspan')), col || 1);
14712
14710
  return previous + colspan;
14713
14711
  };
14714
14712
  return a.reduce(reduce, 0) - b.reduce(reduce, 0);
@@ -14723,7 +14721,8 @@ function eval_pyson(value){
14723
14721
  xexpands.forEach(function(e) {
14724
14722
  var cell = e[0];
14725
14723
  i = e[1];
14726
- var colspan = Math.min(Number(cell.attr('colspan')), col);
14724
+ var colspan = Math.min(
14725
+ Number(cell.attr('colspan')), col || 1);
14727
14726
  var current_width = 0;
14728
14727
  for (j = 0; j < colspan; j++) {
14729
14728
  current_width += widths[i + j] || 0;
@@ -14751,7 +14750,8 @@ function eval_pyson(value){
14751
14750
  i = 0;
14752
14751
  row.children().map(function() {
14753
14752
  var cell = jQuery(this);
14754
- var colspan = Math.min(Number(cell.attr('colspan')), col);
14753
+ var colspan = Math.min(
14754
+ Number(cell.attr('colspan')), col || 1);
14755
14755
  if (cell.hasClass('xexpand') &&
14756
14756
  (cell.children(':not(.tooltip)').css('display') !=
14757
14757
  'none')) {
@@ -15719,7 +15719,6 @@ function eval_pyson(value){
15719
15719
  _input_format: '%Y-%m-%d',
15720
15720
  _format: Sao.common.format_date,
15721
15721
  _parse: Sao.common.parse_date,
15722
- _default_format: '%x',
15723
15722
  init: function(view, attributes) {
15724
15723
  Sao.View.Form.Date._super.init.call(this, view, attributes);
15725
15724
  this.el = jQuery('<div/>', {
@@ -15798,7 +15797,8 @@ function eval_pyson(value){
15798
15797
  if (this.field && this.record) {
15799
15798
  return this.field.date_format(this.record);
15800
15799
  } else {
15801
- return this._default_format;
15800
+ return Sao.common.date_format(
15801
+ this.view.screen.context.date_format);
15802
15802
  }
15803
15803
  },
15804
15804
  get_value: function() {
@@ -15855,13 +15855,13 @@ function eval_pyson(value){
15855
15855
  _input_format: '%Y-%m-%dT%H:%M:%S',
15856
15856
  _format: Sao.common.format_datetime,
15857
15857
  _parse: Sao.common.parse_datetime,
15858
- _default_format: '%x %X',
15859
15858
  get_format: function() {
15860
15859
  if (this.field && this.record) {
15861
15860
  return (this.field.date_format(this.record) + ' ' +
15862
15861
  this.field.time_format(this.record));
15863
15862
  } else {
15864
- return this._default_format;
15863
+ return (Sao.common.date_format(
15864
+ this.view.screen.context.date_format) + ' %X');
15865
15865
  }
15866
15866
  },
15867
15867
  cast: function(value){
@@ -15876,7 +15876,6 @@ function eval_pyson(value){
15876
15876
  _input_format: '%H:%M:%S',
15877
15877
  _format: Sao.common.format_time,
15878
15878
  _parse: Sao.common.parse_time,
15879
- _default_format: '%X',
15880
15879
  init: function(view, attributes) {
15881
15880
  Sao.View.Form.Time._super.init.call(this, view, attributes);
15882
15881
  if (~navigator.userAgent.indexOf("Firefox")) {
@@ -15888,7 +15887,7 @@ function eval_pyson(value){
15888
15887
  if (this.field && this.record) {
15889
15888
  return this.field.time_format(this.record);
15890
15889
  } else {
15891
- return this._default_format;
15890
+ return '%X';
15892
15891
  }
15893
15892
  },
15894
15893
  cast: function(value){
@@ -9164,9 +9164,10 @@ html[theme="default"] .carousel-caption h6 {
9164
9164
  content: "";
9165
9165
  background-color: rgba(0, 0, 0, 0);
9166
9166
  }
9167
- button {
9168
- overflow-y: hidden;
9167
+ .btn-horizontal {
9168
+ overflow: hidden;
9169
9169
  text-overflow: ellipsis;
9170
+ white-space: nowrap;
9170
9171
  }
9171
9172
  .input-group > .form-control-feedback {
9172
9173
  z-index: 3;