@ardimedia/angular-portal-azure 0.2.186 → 0.2.188

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 +13 -2
  3. package/package.json +1 -1
package/apn.d.ts CHANGED
@@ -351,6 +351,7 @@ declare namespace angularportalazure {
351
351
  class BladeDetail<T> extends angularportalazure.BladeData {
352
352
  constructor($scope: angular.IScope, portalService: angularportalazure.PortalService, path: string, title: string, subtitle?: string, width?: number);
353
353
  item: T;
354
+ visibility: string;
354
355
  loadItem(func: () => angular.IPromise<any>): void;
355
356
  onLoadItem(): void;
356
357
  onLoadedItem(): void;
package/apn.js CHANGED
@@ -396,11 +396,19 @@ var angularportalazure;
396
396
  throw new Error('[angularportalazure.Blade] \'onCommandExcel\' is an abstract function. Define one in the derived class.');
397
397
  };
398
398
  //#endregion
399
+ //** Change title, as soon as watchExpression changes. watchExpression is either a variable ore an expresssion, e.g. [name1 + name2] */
399
400
  Blade.prototype.setTitle = function (watchExpression, func) {
400
401
  var _this = this;
401
402
  if (this.watcherTitle === undefined) {
402
- this.watcherTitle = this.$scope.$watch(watchExpression, function () { func(); });
403
- this.$scope.$on('$destroy', function () { _this.watcherTitle(); });
403
+ if (this.$scope !== null) {
404
+ // angular1
405
+ this.watcherTitle = this.$scope.$watch(watchExpression, function () { func(); });
406
+ this.$scope.$on('$destroy', function () { _this.watcherTitle(); });
407
+ }
408
+ else {
409
+ // angular2
410
+ console.log('[Blade.setTitle()] not supported for angular2. use [ngOnChanges] instead.');
411
+ }
404
412
  }
405
413
  };
406
414
  Blade.prototype.setBladeHeights = function () {
@@ -1079,6 +1087,7 @@ var angularportalazure;
1079
1087
  //#endregion
1080
1088
  //#region Properties
1081
1089
  _this.item = {};
1090
+ _this.visibility = 'collapse';
1082
1091
  _this.commandNewText = 'neu';
1083
1092
  _this.commandSaveText = 'speichern';
1084
1093
  _this.commandDeleteText = 'löschen';
@@ -1098,9 +1107,11 @@ var angularportalazure;
1098
1107
  });
1099
1108
  };
1100
1109
  BladeDetail.prototype.onLoadItem = function () {
1110
+ this.visibility = 'collapse';
1101
1111
  this.setStatusBarLoadData();
1102
1112
  };
1103
1113
  BladeDetail.prototype.onLoadedItem = function () {
1114
+ this.visibility = 'visible';
1104
1115
  this.clearStatusBar();
1105
1116
  };
1106
1117
  BladeDetail.prototype.saveItem = function (func) {
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.186",
5
+ "version": "0.2.188",
6
6
  "main": "index.js",
7
7
  "typings": "apn.d.ts",
8
8
  "dependencies": {