@ardimedia/angular-portal-azure 0.2.102 → 0.2.104
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 +1 -3
- package/apn.js +14 -80
- package/package.json +1 -1
package/apn.d.ts
CHANGED
|
@@ -333,11 +333,9 @@ declare namespace angularportalazure {
|
|
|
333
333
|
class BladeGrid extends angularportalazure.BladeData {
|
|
334
334
|
constructor(portalService: angularportalazure.PortalService, path: string, title: string, subtitle?: string, width?: number);
|
|
335
335
|
items: any[];
|
|
336
|
-
loadItems(func: () => any): void;
|
|
336
|
+
loadItems(func: () => angular.IPromise<any>): void;
|
|
337
337
|
onLoadedItems(): void;
|
|
338
338
|
onFilter(actual: Object, expected: string): boolean;
|
|
339
|
-
/** Obsolete */
|
|
340
|
-
setObsoleteLayoutProperites(): void;
|
|
341
339
|
}
|
|
342
340
|
}
|
|
343
341
|
declare namespace angularportalazure {
|
package/apn.js
CHANGED
|
@@ -97,7 +97,6 @@ var angularportalazure;
|
|
|
97
97
|
function UserAccount(username, firstName, lastName) {
|
|
98
98
|
if (firstName === void 0) { firstName = ''; }
|
|
99
99
|
if (lastName === void 0) { lastName = ''; }
|
|
100
|
-
angularportalazure.Debug.write('[angularportalazure-debug] \'UserAccount\' constructor called.', [this, username, firstName, lastName]);
|
|
101
100
|
this.userName = username;
|
|
102
101
|
this.firstName = firstName;
|
|
103
102
|
this.lastName = lastName;
|
|
@@ -146,7 +145,6 @@ var angularportalazure;
|
|
|
146
145
|
var UserControlBase = (function () {
|
|
147
146
|
//#region Constructor
|
|
148
147
|
function UserControlBase(portalService) {
|
|
149
|
-
angularportalazure.Debug.write('[angularportalazure-debug] \'UserControlBase\' constructor called.', [this, portalService]);
|
|
150
148
|
this.portalService = portalService;
|
|
151
149
|
}
|
|
152
150
|
return UserControlBase;
|
|
@@ -240,9 +238,7 @@ var angularportalazure;
|
|
|
240
238
|
items: [],
|
|
241
239
|
navigateTo: function (path) { }
|
|
242
240
|
};
|
|
243
|
-
angularportalazure.Debug.write('[angularportalazure-debug] \'Blade\' constructor called.', [_this, portalService, path, title, subtitle, width]);
|
|
244
241
|
var that = _this;
|
|
245
|
-
//this.blade = this;
|
|
246
242
|
_this.path = path;
|
|
247
243
|
_this.title = title;
|
|
248
244
|
_this.subTitle = subtitle;
|
|
@@ -270,6 +266,7 @@ var angularportalazure;
|
|
|
270
266
|
//#region Add BladeArea.AddBlade event listener
|
|
271
267
|
/** OBSOLETE: remove when all OBSOLETE code has been removed */
|
|
272
268
|
if (portalService instanceof angularportalazure.PortalService == false) {
|
|
269
|
+
console.log('Blade.constructor: This code cannot be removed yet.');
|
|
273
270
|
return _this;
|
|
274
271
|
}
|
|
275
272
|
/** OBSOLETE: end */
|
|
@@ -333,7 +330,6 @@ var angularportalazure;
|
|
|
333
330
|
};
|
|
334
331
|
/** close blade. */
|
|
335
332
|
Blade.prototype.close = function () {
|
|
336
|
-
angularportalazure.Debug.write('[angularportalazure-debug] \'Blade.close\' called.', [this]);
|
|
337
333
|
this.listener1(); // Unregister listener1
|
|
338
334
|
if (this.portalService.bladeArea !== undefined) {
|
|
339
335
|
this.portalService.bladeArea.clearPath(this.path);
|
|
@@ -463,7 +459,6 @@ var angularportalazure;
|
|
|
463
459
|
function BladeArea(portalService) {
|
|
464
460
|
var _this = _super.call(this, portalService) || this;
|
|
465
461
|
_this.blades = new Array();
|
|
466
|
-
angularportalazure.Debug.write('[angularportalazure-debug] \'BladeArea\' constructor called.', [_this, portalService]);
|
|
467
462
|
var that = _this;
|
|
468
463
|
// Set dependencies
|
|
469
464
|
_this.portalService = portalService;
|
|
@@ -476,7 +471,6 @@ var angularportalazure;
|
|
|
476
471
|
/** OBSOLETE: end */
|
|
477
472
|
// Register listener1
|
|
478
473
|
_this.listener1 = that.portalService.$rootScope.$on('BladeArea.AddBlade', function (event, args) {
|
|
479
|
-
angularportalazure.Debug.write('[angularportalazure-debug] \'BladeArea\' BladeArea.AddBlade event processing.', [this, event, args]);
|
|
480
474
|
that.addBlade(args.path, args.pathSender);
|
|
481
475
|
});
|
|
482
476
|
return _this;
|
|
@@ -485,10 +479,17 @@ var angularportalazure;
|
|
|
485
479
|
//#endregion
|
|
486
480
|
//#region Methods
|
|
487
481
|
BladeArea.prototype.raiseAddBladeEvent = function (args) {
|
|
482
|
+
this.blades.forEach(function (blade) {
|
|
483
|
+
if (blade.path === args.path) {
|
|
484
|
+
console.log('executing: blade.onActivate();');
|
|
485
|
+
blade.onActivate();
|
|
486
|
+
return;
|
|
487
|
+
}
|
|
488
|
+
});
|
|
489
|
+
console.log('broadcast: BladeArea.AddBlade');
|
|
488
490
|
this.portalService.$rootScope.$broadcast('BladeArea.AddBlade', args);
|
|
489
491
|
};
|
|
490
492
|
BladeArea.prototype.setFirstBlade = function (path) {
|
|
491
|
-
angularportalazure.Debug.write('[angularportalazure-debug] \'BladeArea.setFirstBlade\' called.', [this, path]);
|
|
492
493
|
this.clearAll();
|
|
493
494
|
this.hidePanorama();
|
|
494
495
|
return this.addBlade(path);
|
|
@@ -496,7 +497,6 @@ var angularportalazure;
|
|
|
496
497
|
/** obsolete */
|
|
497
498
|
BladeArea.prototype.addBlade = function (path, senderPath) {
|
|
498
499
|
if (senderPath === void 0) { senderPath = ''; }
|
|
499
|
-
angularportalazure.Debug.write('[angularportalazure-debug] \'BladeArea.addBlade\' called.', [this, senderPath, path]);
|
|
500
500
|
if (path == null) {
|
|
501
501
|
return;
|
|
502
502
|
}
|
|
@@ -554,30 +554,25 @@ var angularportalazure;
|
|
|
554
554
|
return blade;
|
|
555
555
|
};
|
|
556
556
|
BladeArea.prototype.clearAll = function () {
|
|
557
|
-
angularportalazure.Debug.write('[angularportalazure-debug] \'BladeArea.clearAll\' called.', [this]);
|
|
558
557
|
this.blades.length = 0;
|
|
559
558
|
this.showPanoramaIfNoBlades();
|
|
560
559
|
};
|
|
561
560
|
BladeArea.prototype.clearPath = function (path) {
|
|
562
|
-
angularportalazure.Debug.write('[angularportalazure-debug] \'BladeArea.clearPath\' called.', [this, path]);
|
|
563
561
|
var that = this;
|
|
564
562
|
// we do not distinguish between lower and upper case path name
|
|
565
563
|
path = path.toLowerCase();
|
|
566
564
|
var isremoved = that.blades.some(function (blade, index) {
|
|
567
565
|
if (blade.comparePaths(blade.path, path)) {
|
|
568
|
-
angularportalazure.Debug.write('[angularportalazure-debug] \'BladeArea.clearPath\' set bladeUrls.length to: ' + index);
|
|
569
566
|
that.blades.length = index;
|
|
570
567
|
return true;
|
|
571
568
|
}
|
|
572
569
|
});
|
|
573
570
|
if (!isremoved) {
|
|
574
|
-
angularportalazure.Debug.write('>>> bladeUrls:', [that.blades]);
|
|
575
571
|
throw new Error('[angularportalazure.BladeArea.clearPath] path: \'' + path + '\' could not be removed, since path not found in bladeUrls.');
|
|
576
572
|
}
|
|
577
573
|
this.showPanoramaIfNoBlades();
|
|
578
574
|
};
|
|
579
575
|
BladeArea.prototype.clearLevel = function (level) {
|
|
580
|
-
angularportalazure.Debug.write('[angularportalazure-debug] \'BladeArea.clearLevel\' called.', [this, level]);
|
|
581
576
|
if (this.blades.length < level) {
|
|
582
577
|
}
|
|
583
578
|
if (level == 0) {
|
|
@@ -587,28 +582,23 @@ var angularportalazure;
|
|
|
587
582
|
this.showPanoramaIfNoBlades();
|
|
588
583
|
};
|
|
589
584
|
BladeArea.prototype.clearLastLevel = function () {
|
|
590
|
-
angularportalazure.Debug.write('[angularportalazure-debug] \'BladeArea.clearLastLevel\' called.', [this]);
|
|
591
585
|
this.clearLevel(this.blades.length);
|
|
592
586
|
this.showPanoramaIfNoBlades();
|
|
593
587
|
};
|
|
594
588
|
BladeArea.prototype.clearChild = function (path) {
|
|
595
|
-
angularportalazure.Debug.write('[angularportalazure-debug] \'BladeArea.clearChild\' called.', [this, path]);
|
|
596
589
|
var that = this;
|
|
597
590
|
path = path.toLowerCase();
|
|
598
591
|
if (path === '') {
|
|
599
|
-
angularportalazure.Debug.write('[angularportalazure-debug] \'BladeArea.clearChild\' path is empty, nothing to clear.');
|
|
600
592
|
return;
|
|
601
593
|
}
|
|
602
594
|
var isremoved = that.blades.some(function (blade, index) {
|
|
603
595
|
// we do not distinguish between lower and upper case path name
|
|
604
596
|
if (blade.comparePaths(blade.path, path)) {
|
|
605
|
-
angularportalazure.Debug.write('[angularportalazure-debug] \'BladeArea.clearChild\' set bladeUrls.length to: ' + (index + 1));
|
|
606
597
|
that.blades.length = index + 1;
|
|
607
598
|
return true;
|
|
608
599
|
}
|
|
609
600
|
});
|
|
610
601
|
if (!isremoved) {
|
|
611
|
-
angularportalazure.Debug.write('>>> bladeUrls:', [that.blades]);
|
|
612
602
|
throw new Error('[angularportalazure.BladeArea.clearChild] path: \'' + path + '\' could not be removed, since path not found in bladeUrls.');
|
|
613
603
|
}
|
|
614
604
|
};
|
|
@@ -633,7 +623,6 @@ var angularportalazure;
|
|
|
633
623
|
//#endregion
|
|
634
624
|
//#region OBSOLETE
|
|
635
625
|
BladeArea.prototype.addBladePath = function (path) {
|
|
636
|
-
angularportalazure.Debug.write('[angularportalazure-debug] \'BladeArea.addBladePath\' called.', [this, path]);
|
|
637
626
|
// Fix issue with old code
|
|
638
627
|
if (this.portalService.$window === undefined) {
|
|
639
628
|
this.portalService.$window = this.portalService;
|
|
@@ -642,7 +631,6 @@ var angularportalazure;
|
|
|
642
631
|
//this.addBladeOld(path);
|
|
643
632
|
};
|
|
644
633
|
BladeArea.prototype.addBladeOld = function (path) {
|
|
645
|
-
angularportalazure.Debug.write('[angularportalazure-debug] \'BladeArea.addBladeOld\' called.', [this, path]);
|
|
646
634
|
var that = this;
|
|
647
635
|
if (path === undefined || path == '') {
|
|
648
636
|
return;
|
|
@@ -681,9 +669,7 @@ var angularportalazure;
|
|
|
681
669
|
__extends(AvatarMenu, _super);
|
|
682
670
|
//#region Constructor
|
|
683
671
|
function AvatarMenu(portalService) {
|
|
684
|
-
|
|
685
|
-
angularportalazure.Debug.write('[angularportalazure-debug] \'AvatarMenu\' constructor called.', [_this]);
|
|
686
|
-
return _this;
|
|
672
|
+
return _super.call(this, portalService) || this;
|
|
687
673
|
}
|
|
688
674
|
return AvatarMenu;
|
|
689
675
|
}(angularportalazure.UserControlBase));
|
|
@@ -710,12 +696,10 @@ var angularportalazure;
|
|
|
710
696
|
this.tileSizes = tileSizes;
|
|
711
697
|
this.width = width;
|
|
712
698
|
this.height = height;
|
|
713
|
-
angularportalazure.Debug.write('[angularportalazure-debug] \'TileSize\' constructor called.', [this, tileSizes, width, height]);
|
|
714
699
|
}
|
|
715
700
|
//#endregion
|
|
716
701
|
//#region Methods
|
|
717
702
|
TileSize.getTileSizes = function () {
|
|
718
|
-
angularportalazure.Debug.write('[angularportalazure-debug] \'TileSize.getTileSizes\' called.', [this]);
|
|
719
703
|
var tileSizes = Array();
|
|
720
704
|
tileSizes.push(new TileSize(angularportalazure.TileSizes.small, 90, 90));
|
|
721
705
|
tileSizes.push(new TileSize(angularportalazure.TileSizes.mini, 180, 90));
|
|
@@ -736,7 +720,6 @@ var angularportalazure;
|
|
|
736
720
|
var Tile = (function () {
|
|
737
721
|
//#region Constructor
|
|
738
722
|
function Tile(title, bladePath, portalService) {
|
|
739
|
-
angularportalazure.Debug.write('[angularportalazure-debug] \'Tile\' constructor called.', [this, title, bladePath, portalService]);
|
|
740
723
|
this.portalService = portalService;
|
|
741
724
|
this.title = title;
|
|
742
725
|
this.bladePath = bladePath;
|
|
@@ -784,7 +767,6 @@ var angularportalazure;
|
|
|
784
767
|
//#endregion
|
|
785
768
|
//#region Methods
|
|
786
769
|
Tiles.prototype.addTile = function (tile) {
|
|
787
|
-
angularportalazure.Debug.write('[angularportalazure-debug] \'Tiles.addTile\' called.', [this, tile]);
|
|
788
770
|
var tileSize = this.tileSizes[tile.tileSize];
|
|
789
771
|
tile.size = angularportalazure.TileSizes[tile.tileSize]; // Get CSS Name
|
|
790
772
|
tile.top = this.nextTop + 'px';
|
|
@@ -817,7 +799,6 @@ var angularportalazure;
|
|
|
817
799
|
//#region Constructor
|
|
818
800
|
function Startboard(portalService) {
|
|
819
801
|
var _this = _super.call(this, portalService) || this;
|
|
820
|
-
angularportalazure.Debug.write('[angularportalazure-debug] \'Startboard\' constructor called.', [_this]);
|
|
821
802
|
_this.tiles = new angularportalazure.Tiles();
|
|
822
803
|
return _this;
|
|
823
804
|
}
|
|
@@ -839,7 +820,6 @@ var angularportalazure;
|
|
|
839
820
|
function Panorama(title, portalService) {
|
|
840
821
|
var _this = _super.call(this, portalService) || this;
|
|
841
822
|
_this.isVisible = true;
|
|
842
|
-
angularportalazure.Debug.write('[angularportalazure-debug] \'Panorama\' constructor called.', [_this, title]);
|
|
843
823
|
_this.title = title;
|
|
844
824
|
_this.portalService.panorama = _this;
|
|
845
825
|
_this.avatarMenu = new angularportalazure.AvatarMenu(_this.portalService);
|
|
@@ -865,7 +845,6 @@ var angularportalazure;
|
|
|
865
845
|
//#region Constructor
|
|
866
846
|
function PortalShell(title, portalService) {
|
|
867
847
|
var _this = _super.call(this, portalService) || this;
|
|
868
|
-
angularportalazure.Debug.write('[angularportalazure-debug] \'PortalShell\' constructor called.', [_this, title, portalService]);
|
|
869
848
|
_this.portalService = portalService;
|
|
870
849
|
_this.portalService.portalShell = _this;
|
|
871
850
|
_this.portalService.panorama = new angularportalazure.Panorama(title, _this.portalService);
|
|
@@ -876,11 +855,9 @@ var angularportalazure;
|
|
|
876
855
|
//#endregion
|
|
877
856
|
//#region Methods
|
|
878
857
|
PortalShell.prototype.initialize = function () {
|
|
879
|
-
angularportalazure.Debug.write('[angularportalazure-debug] \'PortalShell.initialize\' called.', [this]);
|
|
880
858
|
this.setObsoleteLayoutProperites();
|
|
881
859
|
};
|
|
882
860
|
PortalShell.prototype.setObsoleteLayoutProperites = function () {
|
|
883
|
-
angularportalazure.Debug.write('[angularportalazure-debug] \'PortalShell.setObsoleteLayoutProperites\' called.', [this]);
|
|
884
861
|
this.title = this.portalService.panorama.title;
|
|
885
862
|
this.tiles = this.portalService.panorama.startboard.tiles.tiles;
|
|
886
863
|
this.blades = this.portalService.bladeArea.blades;
|
|
@@ -916,7 +893,6 @@ var angularportalazure;
|
|
|
916
893
|
//#endregion
|
|
917
894
|
//#region Properties
|
|
918
895
|
this.parameter = { action: 'none', itemId: 0 };
|
|
919
|
-
angularportalazure.Debug.write('[angularportalazure-debug] \'PortalService\' constructor called.', [this, $injector]);
|
|
920
896
|
this.$injector = $injector;
|
|
921
897
|
//this.$scope = $scope;
|
|
922
898
|
this.$http = $injector.get('$http');
|
|
@@ -1160,7 +1136,6 @@ var angularportalazure;
|
|
|
1160
1136
|
var _this = _super.call(this, portalService, path, title, subtitle, width) || this;
|
|
1161
1137
|
//#region Properties
|
|
1162
1138
|
_this.item = null;
|
|
1163
|
-
angularportalazure.Debug.write('[angularportalazure-debug] \'BladeDetail\' constructor called.', [_this, portalService, path, title, subtitle, width]);
|
|
1164
1139
|
_this.isCommandNew = true;
|
|
1165
1140
|
_this.commandNewText = 'neu';
|
|
1166
1141
|
_this.isCommandSave = true;
|
|
@@ -1237,41 +1212,12 @@ var angularportalazure;
|
|
|
1237
1212
|
//#endregion
|
|
1238
1213
|
//#region Properties
|
|
1239
1214
|
_this.items = [];
|
|
1215
|
+
_this.isCommandNew = true;
|
|
1216
|
+
_this.commandNewText = 'neu';
|
|
1240
1217
|
return _this;
|
|
1241
|
-
//this.isCommandNew = true;
|
|
1242
|
-
//this.commandNewText = 'neu';
|
|
1243
1218
|
}
|
|
1244
1219
|
//#endregion
|
|
1245
1220
|
//#region Methods
|
|
1246
|
-
//activate(): void {
|
|
1247
|
-
// let that = this;
|
|
1248
|
-
// //this.loadItems(() => this.getItemsFunction);
|
|
1249
|
-
// //var that = this;
|
|
1250
|
-
// //that.statusbar = 'Daten laden...';
|
|
1251
|
-
// //that.statusbarClass = '';
|
|
1252
|
-
// this.onActivate();
|
|
1253
|
-
// ////var onActivate = that.onActivate();
|
|
1254
|
-
// ////if (that.onActivate === null || that.onActivate === undefined) {
|
|
1255
|
-
// ////} else {
|
|
1256
|
-
// // //that.loadItems(onActivate);
|
|
1257
|
-
// // console.log('call onActivate()');
|
|
1258
|
-
// // that.onActivate()
|
|
1259
|
-
// // .then(function (data: any) {
|
|
1260
|
-
// // console.log('OK');
|
|
1261
|
-
// // that.items = data;
|
|
1262
|
-
// // that.statusbar = '';
|
|
1263
|
-
// // that.statusbarClass = '';
|
|
1264
|
-
// // }).catch(function (exception: angularportalazure.Exception) {
|
|
1265
|
-
// // console.log('exception');
|
|
1266
|
-
// // console.log(exception);
|
|
1267
|
-
// // that.statusbar = 'FEHLER: ' + exception.Message;
|
|
1268
|
-
// // that.statusbarClass = 'message-info message-off';
|
|
1269
|
-
// // });
|
|
1270
|
-
// ////}
|
|
1271
|
-
//}
|
|
1272
|
-
//onActivate(): angular.IHttpPromise<any> { // any should be: angular.IHttpPromise<any>
|
|
1273
|
-
// throw new Error('[angularportalazure.BladeGrid] \'onActivate\' is an abstract function. Define one in the derived class.');
|
|
1274
|
-
//}
|
|
1275
1221
|
BladeGrid.prototype.loadItems = function (func) {
|
|
1276
1222
|
var that = this;
|
|
1277
1223
|
that.statusbar = 'Daten laden...';
|
|
@@ -1284,8 +1230,8 @@ var angularportalazure;
|
|
|
1284
1230
|
that.showExceptionOnStatusbar(exception);
|
|
1285
1231
|
});
|
|
1286
1232
|
};
|
|
1287
|
-
|
|
1288
|
-
};
|
|
1233
|
+
/* Override this function. This function is called from the loadItems function, when the promise is done. */
|
|
1234
|
+
BladeGrid.prototype.onLoadedItems = function () { };
|
|
1289
1235
|
//#region Filter
|
|
1290
1236
|
BladeGrid.prototype.onFilter = function (actual, expected) {
|
|
1291
1237
|
//#region Documentation
|
|
@@ -1369,16 +1315,6 @@ var angularportalazure;
|
|
|
1369
1315
|
;
|
|
1370
1316
|
//#endregion
|
|
1371
1317
|
};
|
|
1372
|
-
//#endregion
|
|
1373
|
-
//#region OBSOLETE
|
|
1374
|
-
/** Obsolete */
|
|
1375
|
-
BladeGrid.prototype.setObsoleteLayoutProperites = function () {
|
|
1376
|
-
if (this.items.length !== 0) {
|
|
1377
|
-
this.navGrid.items = this.items; //--> needed, otherwise nav html pages will no longer work.
|
|
1378
|
-
}
|
|
1379
|
-
this.isNavGrid = this.isNavGrid;
|
|
1380
|
-
//super.setObsoleteLayoutProperites();
|
|
1381
|
-
};
|
|
1382
1318
|
return BladeGrid;
|
|
1383
1319
|
}(angularportalazure.BladeData));
|
|
1384
1320
|
angularportalazure.BladeGrid = BladeGrid;
|
|
@@ -1406,12 +1342,10 @@ var angularportalazure;
|
|
|
1406
1342
|
this.isVisible = isVisible;
|
|
1407
1343
|
this.callback = callback;
|
|
1408
1344
|
this.bladeNav = bladeNav;
|
|
1409
|
-
angularportalazure.Debug.write('[angularportalazure-debug] \'BladeNavItem\' constructor called.', [this, title, bladePath, hrefPath, roles, isVisible]);
|
|
1410
1345
|
}
|
|
1411
1346
|
//#endregion
|
|
1412
1347
|
//#region
|
|
1413
1348
|
BladeNavItem.prototype.onNavItemClick = function () {
|
|
1414
|
-
angularportalazure.Debug.write('[angularportalazure-debug] \'BladeNavItem.onNavItemClick\' called.', [this]);
|
|
1415
1349
|
if (this.callback != null) {
|
|
1416
1350
|
this.callback();
|
|
1417
1351
|
}
|
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.
|
|
5
|
+
"version": "0.2.104",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"typings": "apn.d.ts",
|
|
8
8
|
"dependencies": {
|