@ardimedia/angular-portal-azure 0.2.183 → 0.2.184

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.js CHANGED
@@ -163,58 +163,58 @@ var angularportalazure;
163
163
  //#endregion
164
164
  //#region Commands
165
165
  _this.isCommandBrowse = false;
166
- _this.commandBrowse = function () { this.onCommandBrowse(); };
166
+ _this.commandBrowse = function () { _this.onCommandBrowse(); };
167
167
  _this.commandBrowseText = '';
168
168
  _this.isCommandCancel = false;
169
- _this.commandCancel = function () { this.onCommandCancel(); };
169
+ _this.commandCancel = function () { _this.onCommandCancel(); };
170
170
  _this.commandCancelText = '';
171
171
  _this.isCommandCopy = false;
172
- _this.commandCopy = function () { this.onCommandCopy(); };
172
+ _this.commandCopy = function () { _this.onCommandCopy(); };
173
173
  _this.commandCopyText = '';
174
174
  _this.isCommandDelete = false;
175
- _this.commandDelete = function () { this.onCommandDelete(); };
175
+ _this.commandDelete = function () { _this.onCommandDelete(); };
176
176
  _this.commandDeleteText = '';
177
177
  _this.isCommandDocument = false;
178
- _this.commandDocument = function () { this.onCommandDocument(); };
178
+ _this.commandDocument = function () { _this.onCommandDocument(); };
179
179
  _this.commandDocumentText = '';
180
180
  _this.isCommandDocument2 = false;
181
- _this.commandDocument2 = function () { this.onCommandDocument2(); };
181
+ _this.commandDocument2 = function () { _this.onCommandDocument2(); };
182
182
  _this.commandDocument2Text = '';
183
183
  _this.isCommandDocument3 = false;
184
- _this.commandDocument3 = function () { this.onCommandDocument3(); };
184
+ _this.commandDocument3 = function () { _this.onCommandDocument3(); };
185
185
  _this.commandDocument3Text = '';
186
186
  _this.isCommandDocument4 = false;
187
- _this.commandDocument4 = function () { this.onCommandDocument4(); };
187
+ _this.commandDocument4 = function () { _this.onCommandDocument4(); };
188
188
  _this.commandDocument4Text = '';
189
189
  _this.isCommandDocument5 = false;
190
- _this.commandDocument5 = function () { this.onCommandDocument5(); };
190
+ _this.commandDocument5 = function () { _this.onCommandDocument5(); };
191
191
  _this.commandDocument5Text = '';
192
192
  _this.isCommandNew = false;
193
- _this.commandNew = function () { this.onCommandNew(); };
193
+ _this.commandNew = function () { _this.onCommandNew(); };
194
194
  _this.commandNewText = '';
195
195
  _this.isCommandOrder = false;
196
- _this.commandOrder = function () { this.onCommandOrder(); };
196
+ _this.commandOrder = function () { _this.onCommandOrder(); };
197
197
  _this.commandOrderText = '';
198
198
  _this.isCommandRestart = false;
199
- _this.commandRestart = function () { this.onCommandRestart(); };
199
+ _this.commandRestart = function () { _this.onCommandRestart(); };
200
200
  _this.commandRestartText = '';
201
201
  _this.isCommandSave = false;
202
- _this.commandSave = function () { this.onCommandSave(); };
202
+ _this.commandSave = function () { _this.onCommandSave(); };
203
203
  _this.commandSaveText = '';
204
204
  _this.isCommandSearch = false;
205
- _this.commandSearch = function () { this.onCommandSearch(); };
205
+ _this.commandSearch = function () { _this.onCommandSearch(); };
206
206
  _this.commandSearchText = '';
207
207
  _this.isCommandStart = false;
208
- _this.commandStart = function () { this.onCommandStart(); };
208
+ _this.commandStart = function () { _this.onCommandStart(); };
209
209
  _this.commandStartText = '';
210
210
  _this.isCommandStop = false;
211
- _this.commandStop = function () { this.onCommandStop(); };
211
+ _this.commandStop = function () { _this.onCommandStop(); };
212
212
  _this.commandStopText = '';
213
213
  _this.isCommandSwap = false;
214
- _this.commandSwap = function () { this.onCommandSwap(); };
214
+ _this.commandSwap = function () { _this.onCommandSwap(); };
215
215
  _this.commandSwapText = '';
216
216
  _this.isCommandExcel = false;
217
- _this.commandExcel = function () { this.onCommandExcel(); };
217
+ _this.commandExcel = function () { _this.onCommandExcel(); };
218
218
  _this.commandExcelText = '';
219
219
  _this.vm = _this;
220
220
  _this.path = path;
@@ -322,6 +322,7 @@ var angularportalazure;
322
322
  this.statusBarClass = 'apa-statusbar-info';
323
323
  };
324
324
  Blade.prototype.setStatusBarException = function (exception) {
325
+ var _this = this;
325
326
  if (exception.Message === undefined) {
326
327
  this.statusBar = 'FEHLER: ' + exception;
327
328
  this.statusBarClass = 'apa-statusbar-error';
@@ -332,8 +333,8 @@ var angularportalazure;
332
333
  }
333
334
  if (exception.Messages !== undefined) {
334
335
  exception.Messages.forEach(function (item) {
335
- this.statusBar += ' - ' + item;
336
- this.statusBarClass = 'apa-statusbar-error';
336
+ _this.statusBar += ' - ' + item;
337
+ _this.statusBarClass = 'apa-statusbar-error';
337
338
  });
338
339
  }
339
340
  };
@@ -425,7 +426,6 @@ var angularportalazure;
425
426
  function AreaBlades($scope, portalService) {
426
427
  var _this = _super.call(this, $scope, portalService) || this;
427
428
  _this.blades = new Array();
428
- var that = _this;
429
429
  //this.areaBlades = this.portalService.$window.document.getElementById('apa-blade-area');
430
430
  _this.portalScroll = _this.portalService.$window.document.getElementById('apa-portal-scroll');
431
431
  _this.setupAddBladeListener();
@@ -456,6 +456,7 @@ var angularportalazure;
456
456
  return this.addBlade(path);
457
457
  };
458
458
  AreaBlades.prototype.addBlade = function (path, senderPath) {
459
+ var _this = this;
459
460
  if (senderPath === void 0) { senderPath = ''; }
460
461
  if (path == null) {
461
462
  return;
@@ -463,7 +464,6 @@ var angularportalazure;
463
464
  if (senderPath == null) {
464
465
  return;
465
466
  }
466
- var that = this;
467
467
  var portalcontent = null;
468
468
  this.portalService.$analytics.pageTrack(path);
469
469
  path = path.toLowerCase();
@@ -472,11 +472,11 @@ var angularportalazure;
472
472
  if (path === undefined || path === '') {
473
473
  return;
474
474
  }
475
- if (that.portalService.$window !== undefined) {
476
- if (that.portalService.$window.document === undefined) {
475
+ if (this.portalService.$window !== undefined) {
476
+ if (this.portalService.$window.document === undefined) {
477
477
  throw new Error('[angularportalazure.AreaBlades] \'this.$window.document\' undefined.');
478
478
  }
479
- portalcontent = that.portalService.$window.document.getElementById('apa-portal-scroll');
479
+ portalcontent = this.portalService.$window.document.getElementById('apa-portal-scroll');
480
480
  if (portalcontent === null) {
481
481
  throw new Error('[angularportalazure.AreaBlades] HTML element with ID [apa-portal-scroll] not found. Maybe it is to early to call function \'BladeArea.addBlade\'.');
482
482
  }
@@ -495,14 +495,14 @@ var angularportalazure;
495
495
  });
496
496
  //#endregion
497
497
  //#region Show the blade
498
- var blade = new angularportalazure.Blade(this.$scope, that.portalService, path, '');
499
- that.blades.push(blade);
498
+ var blade = new angularportalazure.Blade(this.$scope, this.portalService, path, '');
499
+ this.blades.push(blade);
500
500
  //#endregion
501
501
  //#region Position the blade
502
- if (that.portalService.$window !== undefined) {
503
- that.portalService.$window.setTimeout(function () {
504
- var azureportalblades = that.portalService.$window.document.getElementsByClassName('azureportalblade');
505
- var i = that.blades.length - 1;
502
+ if (this.portalService.$window !== undefined) {
503
+ this.portalService.$window.setTimeout(function () {
504
+ var azureportalblades = _this.portalService.$window.document.getElementsByClassName('azureportalblade');
505
+ var i = _this.blades.length - 1;
506
506
  // HACK: Sometime azureportalblades[i].offsetLeft is undefined.
507
507
  // So now if it is, the user has to scroll on its own.
508
508
  if (azureportalblades[i] !== undefined && azureportalblades[i].offsetLeft !== undefined) {
@@ -519,12 +519,12 @@ var angularportalazure;
519
519
  this.showPanoramaIfNoBlades();
520
520
  };
521
521
  AreaBlades.prototype.clearPath = function (path) {
522
- var that = this;
522
+ var _this = this;
523
523
  // we do not distinguish between lower and upper case path name
524
524
  path = path.toLowerCase();
525
- var isremoved = that.blades.some(function (blade, index) {
525
+ var isremoved = this.blades.some(function (blade, index) {
526
526
  if (blade.comparePaths(blade.path, path)) {
527
- that.blades.length = index;
527
+ _this.blades.length = index;
528
528
  return true;
529
529
  }
530
530
  });
@@ -548,15 +548,15 @@ var angularportalazure;
548
548
  this.showPanoramaIfNoBlades();
549
549
  };
550
550
  AreaBlades.prototype.clearChild = function (path) {
551
- var that = this;
551
+ var _this = this;
552
552
  path = path.toLowerCase();
553
553
  if (path === '') {
554
554
  return;
555
555
  }
556
- var isremoved = that.blades.some(function (blade, index) {
556
+ var isremoved = this.blades.some(function (blade, index) {
557
557
  // we do not distinguish between lower and upper case path name
558
558
  if (blade.comparePaths(blade.path, path)) {
559
- that.blades.length = index + 1;
559
+ _this.blades.length = index + 1;
560
560
  return true;
561
561
  }
562
562
  });
@@ -599,9 +599,9 @@ var angularportalazure;
599
599
  });
600
600
  };
601
601
  AreaBlades.prototype.setupAddBladeListener = function () {
602
- var that = this;
603
- that.addBladeListener = that.portalService.$rootScope.$on('AreaBlades.AddBlade', function (event, args) {
604
- that.addBlade(args.path, args.pathSender);
602
+ var _this = this;
603
+ this.addBladeListener = this.portalService.$rootScope.$on('AreaBlades.AddBlade', function (event, args) {
604
+ _this.addBlade(args.path, args.pathSender);
605
605
  });
606
606
  };
607
607
  return AreaBlades;
@@ -1004,9 +1004,9 @@ var angularportalazure;
1004
1004
  (function (angularportalazure) {
1005
1005
  AngularPortalBladeController.$inject = ['angularportalazure.portalService'];
1006
1006
  function AngularPortalBladeController(portalService) {
1007
+ var _this = this;
1007
1008
  this.$onInit = function () {
1008
- this.close = function () {
1009
- };
1009
+ _this.close = function () { };
1010
1010
  };
1011
1011
  }
1012
1012
  var angularPortalBlade = {
@@ -1088,14 +1088,14 @@ var angularportalazure;
1088
1088
  //#endregion
1089
1089
  //#region Methods
1090
1090
  BladeDetail.prototype.loadItem = function (func) {
1091
- var that = this;
1092
- that.onLoadItem();
1091
+ var _this = this;
1092
+ this.onLoadItem();
1093
1093
  func().then(function (data) {
1094
- that.item = data;
1095
- that.clearStatusBar();
1096
- that.onLoadedItem();
1094
+ _this.item = data;
1095
+ _this.clearStatusBar();
1096
+ _this.onLoadedItem();
1097
1097
  }).catch(function (exception) {
1098
- that.setStatusBarException(exception);
1098
+ _this.setStatusBarException(exception);
1099
1099
  });
1100
1100
  };
1101
1101
  BladeDetail.prototype.onLoadItem = function () {
@@ -1104,20 +1104,20 @@ var angularportalazure;
1104
1104
  BladeDetail.prototype.onLoadedItem = function () {
1105
1105
  };
1106
1106
  BladeDetail.prototype.saveItem = function (func) {
1107
- var that = this;
1108
- that.onSaveItem();
1107
+ var _this = this;
1108
+ this.onSaveItem();
1109
1109
  // Is form valid
1110
- if (!that.formblade.$valid) {
1111
- that.statusBar = 'Speichern nicht möglich!';
1112
- that.statusBarClass = 'apa-statusbar-error';
1113
- console.log(that.formblade);
1110
+ if (!this.formblade.$valid) {
1111
+ this.statusBar = 'Speichern nicht möglich!';
1112
+ this.statusBarClass = 'apa-statusbar-error';
1113
+ console.log(this.formblade);
1114
1114
  return;
1115
1115
  }
1116
1116
  func().then(function (data) {
1117
- that.item = data;
1118
- that.onSavedItem();
1117
+ _this.item = data;
1118
+ _this.onSavedItem();
1119
1119
  }).catch(function (exception) {
1120
- that.setStatusBarException(exception);
1120
+ _this.setStatusBarException(exception);
1121
1121
  });
1122
1122
  };
1123
1123
  BladeDetail.prototype.onSaveItem = function () {
@@ -1330,20 +1330,19 @@ var angularportalazure;
1330
1330
  }
1331
1331
  //#endregion
1332
1332
  Exception.prototype.processException = function (response) {
1333
- var that = this;
1334
1333
  this.convertFromWebApiException(response.data);
1335
- that.ExceptionType = response.data.ExceptionType;
1336
- that.Type = response.data.Type;
1337
- that.Message = response.data.Message;
1338
- that.MessageDetail = response.data.MessageDetail;
1339
- that.Messages = response.data.Messages;
1340
- that.Url = response.config.url;
1341
- that.Status = response.status;
1342
- that.StatusText = response.statusText;
1334
+ this.ExceptionType = response.data.ExceptionType;
1335
+ this.Type = response.data.Type;
1336
+ this.Message = response.data.Message;
1337
+ this.MessageDetail = response.data.MessageDetail;
1338
+ this.Messages = response.data.Messages;
1339
+ this.Url = response.config.url;
1340
+ this.Status = response.status;
1341
+ this.StatusText = response.statusText;
1343
1342
  // Find a better way to log information, maybe to the database or to Google Analytics.
1344
1343
  console.log('processException:');
1345
1344
  console.log(response);
1346
- console.log(that);
1345
+ console.log(this);
1347
1346
  };
1348
1347
  Exception.prototype.convertFromWebApiException = function (ex) {
1349
1348
  //#region Process data to Messages
@@ -1398,12 +1397,9 @@ var angularportalazure;
1398
1397
  //#endregion
1399
1398
  //#region Methods
1400
1399
  DataService.prototype.getData = function (url) {
1401
- var that = this;
1402
- return that.$http({ method: 'GET', url: url })
1403
- .then(function (response) {
1404
- })
1405
- .catch(function (response) {
1406
- });
1400
+ return this.$http({ method: 'GET', url: url })
1401
+ .then(function (response) { })
1402
+ .catch(function (response) { });
1407
1403
  };
1408
1404
  return DataService;
1409
1405
  }());
@@ -4,9 +4,8 @@
4
4
  namespace angularportalazure {
5
5
  AngularPortalBladeController.$inject = ['angularportalazure.portalService'];
6
6
  function AngularPortalBladeController(portalService: angularportalazure.PortalService) {
7
- this.$onInit = function () {
8
- this.close = function () {
9
- };
7
+ this.$onInit = () => {
8
+ this.close = () => { };
10
9
  };
11
10
  }
12
11
 
@@ -2,7 +2,7 @@
2
2
  let angularPortalGrid = {
3
3
  transclude: true,
4
4
  templateUrl: '/node_modules/@ardimedia/angular-portal-azure/directives/bladegrid/bladegrid.html',
5
- controller: function () { },
5
+ controller: () => { },
6
6
  bindings: {
7
7
  vm: '='
8
8
  }
@@ -1,7 +1,7 @@
1
1
  namespace angularportalazure {
2
2
  AngularPortalHomeController.$inject = ['$scope', 'angularportalazure.portalService'];
3
3
  function AngularPortalHomeController($scope: angular.IScope, portalService: angularportalazure.PortalService) {
4
- this.$onInit = function () {
4
+ this.$onInit = () => {
5
5
  portalService.areaNotification = new angularportalazure.AreaNotification($scope, portalService);
6
6
  portalService.areaBlades = new angularportalazure.AreaBlades($scope, portalService);
7
7
  };
@@ -2,7 +2,7 @@
2
2
  let angularPortalNav = {
3
3
  transclude: true,
4
4
  templateUrl: '/node_modules/@ardimedia/angular-portal-azure/directives/nav/nav.html',
5
- controller: function () { },
5
+ controller: () => { },
6
6
  bindings: {
7
7
  vm: '='
8
8
  }
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.183",
5
+ "version": "0.2.184",
6
6
  "main": "index.js",
7
7
  "typings": "apn.d.ts",
8
8
  "dependencies": {