@ardimedia/angular-portal-azure 0.2.72 → 0.2.74

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 +2 -4
  2. package/apn.js +70 -56
  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 */
package/apn.js CHANGED
@@ -303,13 +303,15 @@ 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]);
307
306
  this.onActivate();
307
+ this.onActivated();
308
308
  };
309
309
  Blade.prototype.onActivate = function () {
310
310
  //throw new Error('[angularportalazure.Blade] \'onActivate\' is an abstract function. Define one in the derived class.');
311
311
  console.log('function call: Blade.onActivate() - we should override this, but does it work?');
312
312
  };
313
+ Blade.prototype.onActivated = function () {
314
+ };
313
315
  Blade.prototype.navigateTo = function (path) {
314
316
  angularportalazure.Debug.write('[angularportalazure-debug] \'Blade.navigateTo\' called. You should not override this, use onNavigateTo instead.', [this, path]);
315
317
  this.onNavigateTo(path);
@@ -748,9 +750,7 @@ var angularportalazure;
748
750
  //#endregion
749
751
  //#region Methods
750
752
  Tile.prototype.clicked = function () {
751
- angularportalazure.Debug.write('[angularportalazure-debug] \'Tile.clicked\' called.', [this]);
752
- var blade = this.portalService.bladeArea.setFirstBlade(this.bladePath);
753
- blade.activate();
753
+ this.portalService.bladeArea.setFirstBlade(this.bladePath);
754
754
  };
755
755
  return Tile;
756
756
  }());
@@ -1177,35 +1177,48 @@ var angularportalazure;
1177
1177
  }
1178
1178
  //#endregion
1179
1179
  //#region Methods
1180
- BladeDetail.prototype.activate = function () {
1181
- angularportalazure.Debug.write('[angularportalazure-debug] \'BladeDetail.activate\' called.', [this]);
1180
+ //activate() {
1181
+ // angularportalazure.Debug.write('[angularportalazure-debug] \'BladeDetail.activate\' called.', [this]);
1182
+ // var that = this;
1183
+ // that.statusbar = 'Daten laden...';
1184
+ // that.statusbarClass = '';
1185
+ // var onActivate = that.onActivate();
1186
+ // if (onActivate === null || onActivate === undefined) {
1187
+ // that.statusbar = '';
1188
+ // that.statusbarClass = '';
1189
+ // } else {
1190
+ // onActivate.success(function (data: any) {
1191
+ // that.item = data;
1192
+ // that.statusbar = '';
1193
+ // that.statusbarClass = '';
1194
+ // that.onActivated();
1195
+ // }).error(function (data: any, status: any, headers: any, config: any) {
1196
+ // that.item = null;
1197
+ // that.statusbar = 'FEHLER: ' + data;
1198
+ // that.statusbarClass = 'message-info message-off';
1199
+ // that.onActivated();
1200
+ // });
1201
+ // }
1202
+ //}
1203
+ //onActivate(): any { // any should be: angular.IHttpPromise<any>
1204
+ // throw new Error('[angularportalazure.BladeDetail] \'onActivate\' is an abstract function. Define one in the derived class.');
1205
+ //}
1206
+ //onActivated(): void {
1207
+ // angularportalazure.Debug.write('[angularportalazure-debug] \'onActivated\' called. You could override this.');
1208
+ //}
1209
+ BladeDetail.prototype.loadItems = function (func) {
1182
1210
  var that = this;
1183
1211
  that.statusbar = 'Daten laden...';
1184
1212
  that.statusbarClass = '';
1185
- var onActivate = that.onActivate();
1186
- if (onActivate === null || onActivate === undefined) {
1213
+ func().then(function (data) {
1214
+ that.item = data;
1187
1215
  that.statusbar = '';
1188
1216
  that.statusbarClass = '';
1189
- }
1190
- else {
1191
- onActivate.success(function (data) {
1192
- that.item = data;
1193
- that.statusbar = '';
1194
- that.statusbarClass = '';
1195
- that.onActivated();
1196
- }).error(function (data, status, headers, config) {
1197
- that.item = null;
1198
- that.statusbar = 'FEHLER: ' + data;
1199
- that.statusbarClass = 'message-info message-off';
1200
- that.onActivated();
1201
- });
1202
- }
1203
- };
1204
- BladeDetail.prototype.onActivate = function () {
1205
- throw new Error('[angularportalazure.BladeDetail] \'onActivate\' is an abstract function. Define one in the derived class.');
1206
- };
1207
- BladeDetail.prototype.onActivated = function () {
1208
- angularportalazure.Debug.write('[angularportalazure-debug] \'onActivated\' called. You could override this.');
1217
+ that.onActivated();
1218
+ }).catch(function (exception) {
1219
+ that.statusbar = 'FEHLER: ' + exception.Message;
1220
+ that.statusbarClass = 'message-error message-off';
1221
+ });
1209
1222
  };
1210
1223
  BladeDetail.prototype.onCommandCancel = function () {
1211
1224
  this.close();
@@ -1236,34 +1249,34 @@ var angularportalazure;
1236
1249
  }
1237
1250
  //#endregion
1238
1251
  //#region Methods
1239
- BladeGrid.prototype.activate = function () {
1240
- var that = this;
1241
- //this.loadItems(() => this.getItemsFunction);
1242
- //angularportalazure.Debug.write('[angularportalazure-debug] \'BladeGrid.activate\' called.', [this]);
1243
- //console.log('BladeGrid.activate()');
1244
- //var that = this;
1245
- //that.statusbar = 'Daten laden...';
1246
- //that.statusbarClass = '';
1247
- that.onActivate();
1248
- ////var onActivate = that.onActivate();
1249
- ////if (that.onActivate === null || that.onActivate === undefined) {
1250
- ////} else {
1251
- // //that.loadItems(onActivate);
1252
- // console.log('call onActivate()');
1253
- // that.onActivate()
1254
- // .then(function (data: any) {
1255
- // console.log('OK');
1256
- // that.items = data;
1257
- // that.statusbar = '';
1258
- // that.statusbarClass = '';
1259
- // }).catch(function (exception: angularportalazure.Exception) {
1260
- // console.log('exception');
1261
- // console.log(exception);
1262
- // that.statusbar = 'FEHLER: ' + exception.Message;
1263
- // that.statusbarClass = 'message-info message-off';
1264
- // });
1265
- ////}
1266
- };
1252
+ //activate(): void {
1253
+ // let that = this;
1254
+ // //this.loadItems(() => this.getItemsFunction);
1255
+ // //angularportalazure.Debug.write('[angularportalazure-debug] \'BladeGrid.activate\' called.', [this]);
1256
+ // //console.log('BladeGrid.activate()');
1257
+ // //var that = this;
1258
+ // //that.statusbar = 'Daten laden...';
1259
+ // //that.statusbarClass = '';
1260
+ // this.onActivate();
1261
+ // ////var onActivate = that.onActivate();
1262
+ // ////if (that.onActivate === null || that.onActivate === undefined) {
1263
+ // ////} else {
1264
+ // // //that.loadItems(onActivate);
1265
+ // // console.log('call onActivate()');
1266
+ // // that.onActivate()
1267
+ // // .then(function (data: any) {
1268
+ // // console.log('OK');
1269
+ // // that.items = data;
1270
+ // // that.statusbar = '';
1271
+ // // that.statusbarClass = '';
1272
+ // // }).catch(function (exception: angularportalazure.Exception) {
1273
+ // // console.log('exception');
1274
+ // // console.log(exception);
1275
+ // // that.statusbar = 'FEHLER: ' + exception.Message;
1276
+ // // that.statusbarClass = 'message-info message-off';
1277
+ // // });
1278
+ // ////}
1279
+ //}
1267
1280
  //onActivate(): angular.IHttpPromise<any> { // any should be: angular.IHttpPromise<any>
1268
1281
  // throw new Error('[angularportalazure.BladeGrid] \'onActivate\' is an abstract function. Define one in the derived class.');
1269
1282
  //}
@@ -1275,6 +1288,7 @@ var angularportalazure;
1275
1288
  that.items = data;
1276
1289
  that.statusbar = '';
1277
1290
  that.statusbarClass = '';
1291
+ that.onActivated();
1278
1292
  }).catch(function (exception) {
1279
1293
  that.statusbar = 'FEHLER: ' + exception.Message;
1280
1294
  that.statusbarClass = 'message-error message-off';
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.72",
5
+ "version": "0.2.74",
6
6
  "main": "index.js",
7
7
  "typings": "apn.d.ts",
8
8
  "dependencies": {