@ardimedia/angular-portal-azure 0.2.199 → 0.2.201

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.
Files changed (3) hide show
  1. package/apn.d.ts +1 -0
  2. package/apn.js +20 -16
  3. package/package.json +1 -1
package/apn.d.ts CHANGED
@@ -423,6 +423,7 @@ declare namespace angularportalazure {
423
423
  private static processDotNetException1(response);
424
424
  private static processDotNetException2(response);
425
425
  private static setExceptionType(response, exception);
426
+ getOneLineMessage(): string;
426
427
  }
427
428
  }
428
429
  declare namespace angularportalazure {
package/apn.js CHANGED
@@ -331,21 +331,8 @@ var angularportalazure;
331
331
  this.statusBarClass = 'apa-statusbar-info';
332
332
  };
333
333
  Blade.prototype.setStatusBarException = function (exception) {
334
- var _this = this;
335
- if (exception.Message === undefined) {
336
- this.statusBar = 'FEHLER: ' + exception;
337
- this.statusBarClass = 'apa-statusbar-error';
338
- }
339
- else {
340
- this.statusBar = 'FEHLER: ' + exception.Message;
341
- this.statusBarClass = 'apa-statusbar-error';
342
- }
343
- if (exception.Messages !== undefined) {
344
- exception.Messages.forEach(function (item) {
345
- _this.statusBar += ' - ' + item;
346
- _this.statusBarClass = 'apa-statusbar-error';
347
- });
348
- }
334
+ this.statusBar = exception.getOneLineMessage();
335
+ this.statusBarClass = 'apa-statusbar-error';
349
336
  };
350
337
  //#endregion
351
338
  //#endregion
@@ -1378,7 +1365,7 @@ var angularportalazure;
1378
1365
  return _super.apply(this, arguments) || this;
1379
1366
  }
1380
1367
  //#endregion
1381
- //#region Methods
1368
+ //#region Static Methods
1382
1369
  // TODO:2017-01-09/hp: [any] will be [Response] in angular2
1383
1370
  Exception.prepareException = function (response) {
1384
1371
  console.log('convertException: input [angular.IHttpPromiseCallbackArg<angularportalazure.Exception>]');
@@ -1468,6 +1455,23 @@ var angularportalazure;
1468
1455
  }
1469
1456
  exception.ExceptionType = response.data.ExceptionType;
1470
1457
  };
1458
+ //#endregion
1459
+ //#region Public Methods
1460
+ Exception.prototype.getOneLineMessage = function () {
1461
+ var message = 'FEHLER ';
1462
+ if (this.Message !== undefined) {
1463
+ message += ': ' + this.Message + ' ';
1464
+ }
1465
+ if (this.ExceptionMessage !== undefined) {
1466
+ message += ': ' + this.ExceptionMessage + ' ';
1467
+ }
1468
+ if (this.Messages !== undefined) {
1469
+ this.Messages.forEach(function (item) {
1470
+ message += '- ' + item + ' ';
1471
+ });
1472
+ }
1473
+ return message;
1474
+ };
1471
1475
  return Exception;
1472
1476
  }(angularportalazure.ValidationsExceptionDotNet));
1473
1477
  angularportalazure.Exception = Exception;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@ardimedia/angular-portal-azure",
3
3
  "description": "Angular Portal Azure - GUI Framework.",
4
4
  "author": "Ardimedia Anstalt <info@ardimedia.com> (http://www.ardimedia.com)",
5
- "version": "0.2.199",
5
+ "version": "0.2.201",
6
6
  "main": "index.js",
7
7
  "typings": "apn.d.ts",
8
8
  "dependencies": {