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