@ardimedia/angular-portal-azure 0.2.108 → 0.2.110

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.
package/apn.d.ts CHANGED
@@ -47,7 +47,6 @@ declare namespace angularportalazure {
47
47
  declare namespace angularportalazure {
48
48
  class Blade extends angularportalazure.UserControlBase {
49
49
  constructor(portalService: angularportalazure.PortalService, path: string, title: string, subtitle?: string, width?: number);
50
- listener1: Function;
51
50
  path: string;
52
51
  private _path;
53
52
  title: string;
@@ -59,8 +58,8 @@ declare namespace angularportalazure {
59
58
  'width': string;
60
59
  };
61
60
  isInnerHtml: boolean;
62
- statusbar: string;
63
- statusbarClass: string;
61
+ statusBar: string;
62
+ statusBarClass: string;
64
63
  formblade: any;
65
64
  isCommandBrowse: boolean;
66
65
  commandBrowse: () => void;
@@ -130,8 +129,9 @@ declare namespace angularportalazure {
130
129
  comparePaths(path1: string, path2: string): boolean;
131
130
  /** close blade. */
132
131
  close(): void;
133
- clearStatusbar(): void;
134
- showExceptionOnStatusbar(exception: angularportalazure.Exception): void;
132
+ clearStatusBar(): void;
133
+ setStatusBarLoadData(): void;
134
+ setStatusBarException(exception: angularportalazure.Exception): void;
135
135
  onCommandBrowse(): void;
136
136
  onCommandCancel(): void;
137
137
  onCommandCopy(): void;
@@ -326,6 +326,7 @@ declare namespace angularportalazure {
326
326
  item: any;
327
327
  constructor(portalService: angularportalazure.PortalService, path: string, title: string, subtitle?: string, width?: number);
328
328
  loadItem(func: () => any): void;
329
+ onLoadItem(): void;
329
330
  onLoadedItem(): void;
330
331
  onCommandCancel(): void;
331
332
  }
@@ -335,6 +336,7 @@ declare namespace angularportalazure {
335
336
  constructor(portalService: angularportalazure.PortalService, path: string, title: string, subtitle?: string, width?: number);
336
337
  items: any[];
337
338
  loadItems(func: () => angular.IPromise<any>): void;
339
+ onLoadItems(): void;
338
340
  onLoadedItems(): void;
339
341
  onFilter(actual: Object, expected: string): boolean;
340
342
  }
package/apn.js CHANGED
@@ -177,8 +177,8 @@ var angularportalazure;
177
177
  _this.width = { 'width': '0' };
178
178
  _this.widthStackLayout = { 'width': '50px' };
179
179
  _this.isInnerHtml = true;
180
- _this.statusbar = '';
181
- _this.statusbarClass = '';
180
+ _this.statusBar = '';
181
+ _this.statusBarClass = '';
182
182
  //#endregion
183
183
  //#region Commands
184
184
  _this.isCommandBrowse = false;
@@ -287,6 +287,10 @@ var angularportalazure;
287
287
  return _this;
288
288
  }
289
289
  Object.defineProperty(Blade.prototype, "path", {
290
+ //#endregion
291
+ //#region Properties
292
+ //#region Properties
293
+ //listener1: Function;
290
294
  //#region path
291
295
  get: function () {
292
296
  return this._path;
@@ -337,7 +341,7 @@ var angularportalazure;
337
341
  };
338
342
  /** close blade. */
339
343
  Blade.prototype.close = function () {
340
- this.listener1(); // Unregister listener1
344
+ //this.listener1(); // Unregister listener1
341
345
  if (this.portalService.bladeArea !== undefined) {
342
346
  this.portalService.bladeArea.clearPath(this.path);
343
347
  }
@@ -345,24 +349,28 @@ var angularportalazure;
345
349
  throw new Error('[angularportalazure.Blade] path: \'' + this.path + '\' could not be removed, since no \'this.portalService.bladeArea\' available.');
346
350
  }
347
351
  };
348
- //#region Show Exceptions
349
- Blade.prototype.clearStatusbar = function () {
350
- this.statusbar = '';
351
- this.statusbarClass = '';
352
+ //#region Set StatusBar
353
+ Blade.prototype.clearStatusBar = function () {
354
+ this.statusBar = '';
355
+ this.statusBarClass = '';
356
+ };
357
+ Blade.prototype.setStatusBarLoadData = function () {
358
+ this.statusBar = 'Daten laden...';
359
+ this.statusBarClass = '';
352
360
  };
353
- Blade.prototype.showExceptionOnStatusbar = function (exception) {
361
+ Blade.prototype.setStatusBarException = function (exception) {
354
362
  var that = this;
355
363
  if (exception.Message === undefined) {
356
- that.statusbar = 'FEHLER: ' + exception;
364
+ that.statusBar = 'FEHLER: ' + exception;
357
365
  }
358
366
  else {
359
- that.statusbar = 'FEHLER: ' + exception.Message;
360
- that.statusbar += ' - ';
367
+ that.statusBar = 'FEHLER: ' + exception.Message;
368
+ that.statusBar += ' - ';
361
369
  exception.Messages.forEach(function (item) {
362
- that.statusbar += item + ' - ';
370
+ that.statusBar += item + ' - ';
363
371
  });
364
372
  }
365
- that.statusbarClass = 'message-error message-off';
373
+ that.statusBarClass = 'message-error message-off';
366
374
  };
367
375
  //#endregion
368
376
  //#endregion
@@ -420,30 +428,6 @@ var angularportalazure;
420
428
  };
421
429
  //#endregion
422
430
  //#region OBSOLETE
423
- ///** Obsolete */
424
- //setObsoleteLayoutProperites() {
425
- // angularportalazure.Debug.write('[angularportalazure-debug] \'Blade.setObsoleteLayoutProperites\' called.', [this]);
426
- // //this.blade.title = this.title;
427
- // //this.blade.statusbar = this.statusbar;
428
- // //this.blade.statusbarClass = this.statusbarClass;
429
- // //this.blade.isCommandBrowse = this.isCommandBrowse;
430
- // //this.blade.isCommandCancel = this.isCommandCancel;
431
- // //this.blade.isCommandCopy = this.isCommandCopy;
432
- // //this.blade.isCommandDelete = this.isCommandDelete;
433
- // //this.blade.isCommandDocument = this.isCommandDocument;
434
- // //this.blade.isCommandDocument2 = this.isCommandDocument2;
435
- // //this.blade.isCommandDocument3 = this.isCommandDocument3;
436
- // //this.blade.isCommandDocument4 = this.isCommandDocument4;
437
- // //this.blade.isCommandDocument5 = this.isCommandDocument5;
438
- // //this.blade.isCommandNew = this.isCommandNew;
439
- // //this.blade.isCommandOrder = this.isCommandOrder;
440
- // //this.blade.isCommandRestart = this.isCommandRestart;
441
- // //this.blade.isCommandSave = this.isCommandSave;
442
- // //this.blade.isCommandSearch = this.isCommandSearch;
443
- // //this.blade.isCommandStart = this.isCommandStart;
444
- // //this.blade.isCommandStop = this.isCommandStop;
445
- // //this.blade.isCommandSwap = this.isCommandSwap;
446
- //}
447
431
  /** Obsolete */
448
432
  Blade.prototype.bladeClose = function () {
449
433
  this.close();
@@ -487,16 +471,17 @@ var angularportalazure;
487
471
  //#endregion
488
472
  //#region Methods
489
473
  BladeArea.prototype.raiseAddBladeEvent = function (args) {
490
- var isActivated = false;
474
+ var isBladeAlreadyShown = false;
491
475
  this.blades.forEach(function (blade) {
492
476
  if (blade.path === args.path) {
477
+ // Blade is already show, just activate it again
493
478
  blade.onActivate();
494
- isActivated = true;
479
+ isBladeAlreadyShown = true;
495
480
  return;
496
481
  }
497
482
  });
498
- if (!isActivated) {
499
- console.log('broadcast: BladeArea.AddBlade');
483
+ if (!isBladeAlreadyShown) {
484
+ // Add the blade, since it is not yet shown
500
485
  this.portalService.$rootScope.$broadcast('BladeArea.AddBlade', args);
501
486
  }
502
487
  };
@@ -1147,58 +1132,32 @@ var angularportalazure;
1147
1132
  var _this = _super.call(this, portalService, path, title, subtitle, width) || this;
1148
1133
  //#region Properties
1149
1134
  _this.item = null;
1150
- _this.isCommandNew = true;
1135
+ //this.isCommandNew = true;
1151
1136
  _this.commandNewText = 'neu';
1152
- _this.isCommandSave = true;
1137
+ //this.isCommandSave = true;
1153
1138
  _this.commandSaveText = 'speichern';
1154
- _this.isCommandDelete = true;
1139
+ //this.isCommandDelete = true;
1155
1140
  _this.commandDeleteText = 'löschen';
1156
- _this.isCommandCancel = true;
1141
+ //this.isCommandCancel = true;
1157
1142
  _this.commandCancelText = 'abbrechen';
1158
1143
  return _this;
1159
1144
  }
1160
1145
  //#endregion
1161
1146
  //#region Methods
1162
- //activate() {
1163
- // var that = this;
1164
- // that.statusbar = 'Daten laden...';
1165
- // that.statusbarClass = '';
1166
- // var onActivate = that.onActivate();
1167
- // if (onActivate === null || onActivate === undefined) {
1168
- // that.statusbar = '';
1169
- // that.statusbarClass = '';
1170
- // } else {
1171
- // onActivate.success(function (data: any) {
1172
- // that.item = data;
1173
- // that.statusbar = '';
1174
- // that.statusbarClass = '';
1175
- // that.onActivated();
1176
- // }).error(function (data: any, status: any, headers: any, config: any) {
1177
- // that.item = null;
1178
- // that.statusbar = 'FEHLER: ' + data;
1179
- // that.statusbarClass = 'message-info message-off';
1180
- // that.onActivated();
1181
- // });
1182
- // }
1183
- //}
1184
- //onActivate(): any { // any should be: angular.IHttpPromise<any>
1185
- // throw new Error('[angularportalazure.BladeDetail] \'onActivate\' is an abstract function. Define one in the derived class.');
1186
- //}
1187
- //onActivated(): void {
1188
- // angularportalazure.Debug.write('[angularportalazure-debug] \'onActivated\' called. You could override this.');
1189
- //}
1190
1147
  BladeDetail.prototype.loadItem = function (func) {
1191
1148
  var that = this;
1192
- that.statusbar = 'Daten laden...';
1193
- that.statusbarClass = '';
1149
+ that.onLoadItem();
1194
1150
  func().then(function (data) {
1195
1151
  that.item = data;
1196
- that.clearStatusbar();
1152
+ that.clearStatusBar();
1197
1153
  that.onLoadedItem();
1198
1154
  }).catch(function (exception) {
1199
- that.showExceptionOnStatusbar(exception);
1155
+ that.setStatusBarException(exception);
1200
1156
  });
1201
1157
  };
1158
+ BladeDetail.prototype.onLoadItem = function () {
1159
+ this.setStatusBarLoadData();
1160
+ };
1202
1161
  BladeDetail.prototype.onLoadedItem = function () {
1203
1162
  };
1204
1163
  BladeDetail.prototype.onCommandCancel = function () {
@@ -1231,18 +1190,20 @@ var angularportalazure;
1231
1190
  //#region Methods
1232
1191
  BladeGrid.prototype.loadItems = function (func) {
1233
1192
  var that = this;
1234
- that.statusbar = 'Daten laden...';
1235
- that.statusbarClass = '';
1193
+ that.onLoadItems();
1236
1194
  func().then(function (data) {
1237
1195
  that.items = data;
1238
- that.clearStatusbar();
1196
+ that.clearStatusBar();
1239
1197
  that.onLoadedItems();
1240
1198
  }).catch(function (exception) {
1241
- that.showExceptionOnStatusbar(exception);
1199
+ that.setStatusBarException(exception);
1242
1200
  });
1243
1201
  };
1244
- /* Override this function. This function is called from the loadItems function, when the promise is done. */
1245
- BladeGrid.prototype.onLoadedItems = function () { };
1202
+ BladeGrid.prototype.onLoadItems = function () {
1203
+ this.setStatusBarLoadData();
1204
+ };
1205
+ BladeGrid.prototype.onLoadedItems = function () {
1206
+ };
1246
1207
  //#region Filter
1247
1208
  BladeGrid.prototype.onFilter = function (actual, expected) {
1248
1209
  //#region Documentation
@@ -2,7 +2,7 @@
2
2
  <header class="fxs-blade-header">
3
3
  <div class="fxs-blade-statusbar-wrapper">
4
4
  <div class="fxs-blade-statusbar">
5
- <span ng-class="$ctrl.vm.statusbarClass">{{$ctrl.vm.statusbar}}</span>
5
+ <span ng-class="$ctrl.vm.statusBarClass">{{$ctrl.vm.statusBar}}</span>
6
6
  </div>
7
7
  </div>
8
8
  <div class="fxs-blade-actions">
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.108",
5
+ "version": "0.2.110",
6
6
  "main": "index.js",
7
7
  "typings": "apn.d.ts",
8
8
  "dependencies": {