@ardimedia/angular-portal-azure 0.2.72 → 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 +2 -4
  2. package/apn.js +72 -54
  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,17 @@ 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
311
  //throw new Error('[angularportalazure.Blade] \'onActivate\' is an abstract function. Define one in the derived class.');
311
312
  console.log('function call: Blade.onActivate() - we should override this, but does it work?');
312
313
  };
314
+ Blade.prototype.onActivated = function () {
315
+ angularportalazure.Debug.write('[angularportalazure-debug] \'onActivated\' called. You could override this.');
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]);
315
319
  this.onNavigateTo(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
  };
@@ -1177,35 +1181,48 @@ var angularportalazure;
1177
1181
  }
1178
1182
  //#endregion
1179
1183
  //#region Methods
1180
- BladeDetail.prototype.activate = function () {
1181
- 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) {
1182
1214
  var that = this;
1183
1215
  that.statusbar = 'Daten laden...';
1184
1216
  that.statusbarClass = '';
1185
- var onActivate = that.onActivate();
1186
- if (onActivate === null || onActivate === undefined) {
1217
+ func().then(function (data) {
1218
+ that.item = data;
1187
1219
  that.statusbar = '';
1188
1220
  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.');
1221
+ that.onActivated();
1222
+ }).catch(function (exception) {
1223
+ that.statusbar = 'FEHLER: ' + exception.Message;
1224
+ that.statusbarClass = 'message-error message-off';
1225
+ });
1209
1226
  };
1210
1227
  BladeDetail.prototype.onCommandCancel = function () {
1211
1228
  this.close();
@@ -1236,34 +1253,34 @@ var angularportalazure;
1236
1253
  }
1237
1254
  //#endregion
1238
1255
  //#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
- };
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
+ //}
1267
1284
  //onActivate(): angular.IHttpPromise<any> { // any should be: angular.IHttpPromise<any>
1268
1285
  // throw new Error('[angularportalazure.BladeGrid] \'onActivate\' is an abstract function. Define one in the derived class.');
1269
1286
  //}
@@ -1275,6 +1292,7 @@ var angularportalazure;
1275
1292
  that.items = data;
1276
1293
  that.statusbar = '';
1277
1294
  that.statusbarClass = '';
1295
+ that.onActivated();
1278
1296
  }).catch(function (exception) {
1279
1297
  that.statusbar = 'FEHLER: ' + exception.Message;
1280
1298
  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.73",
6
6
  "main": "index.js",
7
7
  "typings": "apn.d.ts",
8
8
  "dependencies": {