@ardimedia/angular-portal-azure 0.2.71 → 0.2.73

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 +3 -5
  2. package/apn.js +77 -62
  3. package/package.json +1 -1
package/apn.d.ts CHANGED
@@ -124,6 +124,7 @@ declare namespace angularportalazure {
124
124
  };
125
125
  activate(): void;
126
126
  onActivate(): void;
127
+ onActivated(): void;
127
128
  navigateTo(path: any): void;
128
129
  onNavigateTo(path: any): void;
129
130
  comparePaths(path1: string, path2: string): boolean;
@@ -325,9 +326,7 @@ declare namespace angularportalazure {
325
326
  class BladeDetail extends angularportalazure.BladeData {
326
327
  item: any;
327
328
  constructor(portalService: angularportalazure.PortalService, path: string, title: string, subtitle?: string, width?: number);
328
- activate(): void;
329
- onActivate(): any;
330
- onActivated(): void;
329
+ loadItems(func: () => any): void;
331
330
  onCommandCancel(): void;
332
331
  }
333
332
  }
@@ -335,7 +334,6 @@ declare namespace angularportalazure {
335
334
  class BladeGrid extends angularportalazure.BladeData {
336
335
  items: any[];
337
336
  constructor(portalService: angularportalazure.PortalService, path: string, title: string, subtitle?: string, width?: number);
338
- activate(): void;
339
337
  loadItems(func: () => any): void;
340
338
  onFilter(actual: Object, expected: string): boolean;
341
339
  /** Obsolete */
@@ -357,9 +355,9 @@ declare namespace angularportalazure {
357
355
  }
358
356
  declare namespace angularportalazure {
359
357
  class BladeNav extends angularportalazure.BladeData {
358
+ constructor(portalService: angularportalazure.PortalService, path: string, title?: string, subtitle?: string, width?: number);
360
359
  items: Array<angularportalazure.BladeNavItem>;
361
360
  isNav: boolean;
362
- constructor(portalService: angularportalazure.PortalService, path: string, title?: string, subtitle?: string, width?: number);
363
361
  }
364
362
  }
365
363
  declare namespace angularportalazure {
package/apn.js CHANGED
@@ -303,12 +303,16 @@ var angularportalazure;
303
303
  //#region Methods
304
304
  //#region Methods
305
305
  Blade.prototype.activate = function () {
306
- angularportalazure.Debug.write('[angularportalazure-debug] \'Blade.activate\' called. You could override this, but proably you should call super.activate().', [this]);
306
+ console.log('function call: Blade.activate() - from where is this called?');
307
307
  this.onActivate();
308
+ this.onActivated();
308
309
  };
309
310
  Blade.prototype.onActivate = function () {
310
- angularportalazure.Debug.write('[angularportalazure-debug] \'Blade.onActivate\' not overriden. You could override this.', [this]);
311
- throw new Error('[angularportalazure.Blade] \'onActivate\' is an abstract function. Define one in the derived class.');
311
+ //throw new Error('[angularportalazure.Blade] \'onActivate\' is an abstract function. Define one in the derived class.');
312
+ console.log('function call: Blade.onActivate() - we should override this, but does it work?');
313
+ };
314
+ Blade.prototype.onActivated = function () {
315
+ angularportalazure.Debug.write('[angularportalazure-debug] \'onActivated\' called. You could override this.');
312
316
  };
313
317
  Blade.prototype.navigateTo = function (path) {
314
318
  angularportalazure.Debug.write('[angularportalazure-debug] \'Blade.navigateTo\' called. You should not override this, use onNavigateTo instead.', [this, path]);
@@ -748,7 +752,7 @@ var angularportalazure;
748
752
  //#endregion
749
753
  //#region Methods
750
754
  Tile.prototype.clicked = function () {
751
- angularportalazure.Debug.write('[angularportalazure-debug] \'Tile.clicked\' called.', [this]);
755
+ console.log('function call: Tile.clicked() we should probably not activate the blade or get the blade in another way.');
752
756
  var blade = this.portalService.bladeArea.setFirstBlade(this.bladePath);
753
757
  blade.activate();
754
758
  };
@@ -1143,9 +1147,7 @@ var angularportalazure;
1143
1147
  function BladeData(portalService, path, title, subtitle, width) {
1144
1148
  if (subtitle === void 0) { subtitle = ''; }
1145
1149
  if (width === void 0) { width = 300; }
1146
- var _this = _super.call(this, portalService, path, title, subtitle, width) || this;
1147
- angularportalazure.Debug.write('[angularportalazure-debug] \'BladeData\' constructor called.', [_this, portalService, path, title, subtitle, width]);
1148
- return _this;
1150
+ return _super.call(this, portalService, path, title, subtitle, width) || this;
1149
1151
  }
1150
1152
  return BladeData;
1151
1153
  }(angularportalazure.Blade));
@@ -1179,35 +1181,48 @@ var angularportalazure;
1179
1181
  }
1180
1182
  //#endregion
1181
1183
  //#region Methods
1182
- BladeDetail.prototype.activate = function () {
1183
- angularportalazure.Debug.write('[angularportalazure-debug] \'BladeDetail.activate\' called.', [this]);
1184
+ //activate() {
1185
+ // angularportalazure.Debug.write('[angularportalazure-debug] \'BladeDetail.activate\' called.', [this]);
1186
+ // var that = this;
1187
+ // that.statusbar = 'Daten laden...';
1188
+ // that.statusbarClass = '';
1189
+ // var onActivate = that.onActivate();
1190
+ // if (onActivate === null || onActivate === undefined) {
1191
+ // that.statusbar = '';
1192
+ // that.statusbarClass = '';
1193
+ // } else {
1194
+ // onActivate.success(function (data: any) {
1195
+ // that.item = data;
1196
+ // that.statusbar = '';
1197
+ // that.statusbarClass = '';
1198
+ // that.onActivated();
1199
+ // }).error(function (data: any, status: any, headers: any, config: any) {
1200
+ // that.item = null;
1201
+ // that.statusbar = 'FEHLER: ' + data;
1202
+ // that.statusbarClass = 'message-info message-off';
1203
+ // that.onActivated();
1204
+ // });
1205
+ // }
1206
+ //}
1207
+ //onActivate(): any { // any should be: angular.IHttpPromise<any>
1208
+ // throw new Error('[angularportalazure.BladeDetail] \'onActivate\' is an abstract function. Define one in the derived class.');
1209
+ //}
1210
+ //onActivated(): void {
1211
+ // angularportalazure.Debug.write('[angularportalazure-debug] \'onActivated\' called. You could override this.');
1212
+ //}
1213
+ BladeDetail.prototype.loadItems = function (func) {
1184
1214
  var that = this;
1185
1215
  that.statusbar = 'Daten laden...';
1186
1216
  that.statusbarClass = '';
1187
- var onActivate = that.onActivate();
1188
- if (onActivate === null || onActivate === undefined) {
1217
+ func().then(function (data) {
1218
+ that.item = data;
1189
1219
  that.statusbar = '';
1190
1220
  that.statusbarClass = '';
1191
- }
1192
- else {
1193
- onActivate.success(function (data) {
1194
- that.item = data;
1195
- that.statusbar = '';
1196
- that.statusbarClass = '';
1197
- that.onActivated();
1198
- }).error(function (data, status, headers, config) {
1199
- that.item = null;
1200
- that.statusbar = 'FEHLER: ' + data;
1201
- that.statusbarClass = 'message-info message-off';
1202
- that.onActivated();
1203
- });
1204
- }
1205
- };
1206
- BladeDetail.prototype.onActivate = function () {
1207
- throw new Error('[angularportalazure.BladeDetail] \'onActivate\' is an abstract function. Define one in the derived class.');
1208
- };
1209
- BladeDetail.prototype.onActivated = function () {
1210
- angularportalazure.Debug.write('[angularportalazure-debug] \'onActivated\' called. You could override this.');
1221
+ that.onActivated();
1222
+ }).catch(function (exception) {
1223
+ that.statusbar = 'FEHLER: ' + exception.Message;
1224
+ that.statusbarClass = 'message-error message-off';
1225
+ });
1211
1226
  };
1212
1227
  BladeDetail.prototype.onCommandCancel = function () {
1213
1228
  this.close();
@@ -1238,34 +1253,34 @@ var angularportalazure;
1238
1253
  }
1239
1254
  //#endregion
1240
1255
  //#region Methods
1241
- BladeGrid.prototype.activate = function () {
1242
- var that = this;
1243
- //this.loadItems(() => this.getItemsFunction);
1244
- //angularportalazure.Debug.write('[angularportalazure-debug] \'BladeGrid.activate\' called.', [this]);
1245
- //console.log('BladeGrid.activate()');
1246
- //var that = this;
1247
- //that.statusbar = 'Daten laden...';
1248
- //that.statusbarClass = '';
1249
- that.onActivate();
1250
- ////var onActivate = that.onActivate();
1251
- ////if (that.onActivate === null || that.onActivate === undefined) {
1252
- ////} else {
1253
- // //that.loadItems(onActivate);
1254
- // console.log('call onActivate()');
1255
- // that.onActivate()
1256
- // .then(function (data: any) {
1257
- // console.log('OK');
1258
- // that.items = data;
1259
- // that.statusbar = '';
1260
- // that.statusbarClass = '';
1261
- // }).catch(function (exception: angularportalazure.Exception) {
1262
- // console.log('exception');
1263
- // console.log(exception);
1264
- // that.statusbar = 'FEHLER: ' + exception.Message;
1265
- // that.statusbarClass = 'message-info message-off';
1266
- // });
1267
- ////}
1268
- };
1256
+ //activate(): void {
1257
+ // let that = this;
1258
+ // //this.loadItems(() => this.getItemsFunction);
1259
+ // //angularportalazure.Debug.write('[angularportalazure-debug] \'BladeGrid.activate\' called.', [this]);
1260
+ // //console.log('BladeGrid.activate()');
1261
+ // //var that = this;
1262
+ // //that.statusbar = 'Daten laden...';
1263
+ // //that.statusbarClass = '';
1264
+ // this.onActivate();
1265
+ // ////var onActivate = that.onActivate();
1266
+ // ////if (that.onActivate === null || that.onActivate === undefined) {
1267
+ // ////} else {
1268
+ // // //that.loadItems(onActivate);
1269
+ // // console.log('call onActivate()');
1270
+ // // that.onActivate()
1271
+ // // .then(function (data: any) {
1272
+ // // console.log('OK');
1273
+ // // that.items = data;
1274
+ // // that.statusbar = '';
1275
+ // // that.statusbarClass = '';
1276
+ // // }).catch(function (exception: angularportalazure.Exception) {
1277
+ // // console.log('exception');
1278
+ // // console.log(exception);
1279
+ // // that.statusbar = 'FEHLER: ' + exception.Message;
1280
+ // // that.statusbarClass = 'message-info message-off';
1281
+ // // });
1282
+ // ////}
1283
+ //}
1269
1284
  //onActivate(): angular.IHttpPromise<any> { // any should be: angular.IHttpPromise<any>
1270
1285
  // throw new Error('[angularportalazure.BladeGrid] \'onActivate\' is an abstract function. Define one in the derived class.');
1271
1286
  //}
@@ -1277,6 +1292,7 @@ var angularportalazure;
1277
1292
  that.items = data;
1278
1293
  that.statusbar = '';
1279
1294
  that.statusbarClass = '';
1295
+ that.onActivated();
1280
1296
  }).catch(function (exception) {
1281
1297
  that.statusbar = 'FEHLER: ' + exception.Message;
1282
1298
  that.statusbarClass = 'message-error message-off';
@@ -1424,19 +1440,18 @@ var angularportalazure;
1424
1440
  (function (angularportalazure) {
1425
1441
  var BladeNav = (function (_super) {
1426
1442
  __extends(BladeNav, _super);
1427
- //#endregion
1428
1443
  //#region Constructor
1429
1444
  function BladeNav(portalService, path, title, subtitle, width) {
1430
1445
  if (title === void 0) { title = ''; }
1431
1446
  if (subtitle === void 0) { subtitle = ''; }
1432
1447
  if (width === void 0) { width = 200; }
1433
1448
  var _this = _super.call(this, portalService, path, title, subtitle, width) || this;
1449
+ //#endregion
1434
1450
  //#region Properties
1435
1451
  _this.items = new Array();
1436
1452
  _this.isNav = true;
1437
- angularportalazure.Debug.write('[angularportalazure-debug] \'BladeNav\' constructor called.', [_this, portalService, path, title, subtitle, width]);
1438
- _super.prototype.navigateTo = _this.navigateTo;
1439
1453
  return _this;
1454
+ //super.navigateTo = this.navigateTo;
1440
1455
  }
1441
1456
  return BladeNav;
1442
1457
  }(angularportalazure.BladeData));
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.71",
5
+ "version": "0.2.73",
6
6
  "main": "index.js",
7
7
  "typings": "apn.d.ts",
8
8
  "dependencies": {