@esfaenza/extensions 11.2.49 → 11.2.50

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.
@@ -359,8 +359,8 @@
359
359
  if (postSuccess)
360
360
  postSuccess();
361
361
  }
362
- else if (response.haserror) {
363
- this.simpleError((errorMsg ? errorMsg + ": " : "") + response.error);
362
+ else {
363
+ this.simpleError((errorMsg ? errorMsg + ": " : "") + response.haserror ? response.error : '[NO ERR.]');
364
364
  if (postFailure)
365
365
  postFailure();
366
366
  }
@@ -998,8 +998,9 @@
998
998
  */
999
999
  var ExportAs = function (order, type) { return function (target, propertyKey) {
1000
1000
  var t = new type();
1001
- for (var prop in t) {
1002
- //Niente hasownproperty perché le proprietà dell'oggetto interno sono dentro al prototype
1001
+ var props = t[exportList];
1002
+ for (var i = 0; i < props.length; i++) {
1003
+ var prop = props[i].replace(csvVisPrefix, '');
1003
1004
  if (typeof t[prop + csvVisPrefix] !== "undefined") {
1004
1005
  var toEmit = t[prop + csvVisPrefix];
1005
1006
  var lbl = t[prop + csvHdrPrefix];
@@ -1116,7 +1117,7 @@
1116
1117
  }
1117
1118
  }
1118
1119
  }
1119
- if (!columns)
1120
+ if (!columns || columns.length == 0)
1120
1121
  return headers.sort(function (a, b) { return a.order - b.order; });
1121
1122
  else {
1122
1123
  // Se mi arriva la lista di colonne non mi dà solo la visibilità, ma anche l'ordinamento