@ardimedia/angular-portal-azure 0.2.127 → 0.2.128

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 +15 -12
  2. package/apn.js +35 -28
  3. package/package.json +1 -1
package/apn.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- /// <reference types="jquery" />
2
1
  /// <reference types="angular" />
2
+ /// <reference types="jquery" />
3
3
  /// <reference types="angular-resource" />
4
4
  /// <reference types="angulartics" />
5
5
  /// <reference types="angular-translate" />
@@ -35,7 +35,8 @@ declare namespace angularportalazure {
35
35
  }
36
36
  declare namespace angularportalazure {
37
37
  class UserControlBase {
38
- constructor(portalService: angularportalazure.PortalService);
38
+ constructor($scope: angular.IScope, portalService: angularportalazure.PortalService);
39
+ $scope: angular.IScope;
39
40
  portalService: angularportalazure.PortalService;
40
41
  }
41
42
  }
@@ -48,7 +49,8 @@ declare namespace angularportalazure {
48
49
  declare var $: JQueryStatic;
49
50
  declare namespace angularportalazure {
50
51
  class Blade extends angularportalazure.UserControlBase {
51
- constructor(portalService: angularportalazure.PortalService, path: string, title: string, subtitle?: string, width?: number);
52
+ constructor($scope: angular.IScope, portalService: angularportalazure.PortalService, path: string, title: string, subtitle?: string, width?: number);
53
+ private watcherTitle;
52
54
  bladeContentHeight: number;
53
55
  bladeContentInnerHeight: number;
54
56
  path: string;
@@ -156,12 +158,13 @@ declare namespace angularportalazure {
156
158
  onCommandSwap(): void;
157
159
  /** Obsolete */
158
160
  bladeClose(): void;
161
+ setTitle(text: string): void;
159
162
  private setBladeHeights();
160
163
  }
161
164
  }
162
165
  declare namespace angularportalazure {
163
166
  class BladeArea extends angularportalazure.UserControlBase {
164
- constructor(portalService: angularportalazure.PortalService);
167
+ constructor($scope: angular.IScope, portalService: angularportalazure.PortalService);
165
168
  private listener1;
166
169
  blades: Array<angularportalazure.Blade>;
167
170
  raiseAddBladeEvent(args: angularportalazure.IAddBladeEventArgs): void;
@@ -189,7 +192,7 @@ declare namespace angularportalazure {
189
192
  }
190
193
  declare namespace angularportalazure {
191
194
  class AvatarMenu extends angularportalazure.UserControlBase {
192
- constructor(portalService: angularportalazure.PortalService);
195
+ constructor($scope: angular.IScope, portalService: angularportalazure.PortalService);
193
196
  userAccount: angularportalazure.UserAccount;
194
197
  }
195
198
  }
@@ -242,8 +245,8 @@ declare namespace angularportalazure {
242
245
  }
243
246
  declare namespace angularportalazure {
244
247
  class Startboard extends angularportalazure.UserControlBase {
248
+ constructor($scope: angular.IScope, portalService: angularportalazure.PortalService);
245
249
  tiles: angularportalazure.Tiles;
246
- constructor(portalService: angularportalazure.PortalService);
247
250
  }
248
251
  }
249
252
  declare namespace angularportalazure {
@@ -252,7 +255,7 @@ declare namespace angularportalazure {
252
255
  isVisible: boolean;
253
256
  avatarMenu: angularportalazure.AvatarMenu;
254
257
  startboard: angularportalazure.Startboard;
255
- constructor(title: string, portalService: angularportalazure.PortalService);
258
+ constructor($scope: angular.IScope, title: string, portalService: angularportalazure.PortalService);
256
259
  }
257
260
  }
258
261
  declare namespace angularportalazure {
@@ -269,7 +272,7 @@ declare namespace angularportalazure {
269
272
  /** Obsolete
270
273
  * start using this.bladesNew.blades. */
271
274
  blades: any[];
272
- constructor(title: string, portalService: angularportalazure.PortalService);
275
+ constructor($scope: angular.IScope, title: string, portalService: angularportalazure.PortalService);
273
276
  initialize(): void;
274
277
  setObsoleteLayoutProperites(): void;
275
278
  }
@@ -325,13 +328,13 @@ declare namespace angularportalazure {
325
328
  }
326
329
  declare namespace angularportalazure {
327
330
  class BladeData extends angularportalazure.Blade {
328
- constructor(portalService: angularportalazure.PortalService, path: string, title: string, subtitle?: string, width?: number);
331
+ constructor($scope: angular.IScope, portalService: angularportalazure.PortalService, path: string, title: string, subtitle?: string, width?: number);
329
332
  }
330
333
  }
331
334
  declare namespace angularportalazure {
332
335
  class BladeDetail<T> extends angularportalazure.BladeData {
333
336
  item: T;
334
- constructor(portalService: angularportalazure.PortalService, path: string, title: string, subtitle?: string, width?: number);
337
+ constructor($scope: angular.IScope, portalService: angularportalazure.PortalService, path: string, title: string, subtitle?: string, width?: number);
335
338
  loadItem(func: () => any): void;
336
339
  onLoadItem(): void;
337
340
  onLoadedItem(): void;
@@ -343,7 +346,7 @@ declare namespace angularportalazure {
343
346
  }
344
347
  declare namespace angularportalazure {
345
348
  class BladeGrid extends angularportalazure.BladeData {
346
- constructor(portalService: angularportalazure.PortalService, path: string, title: string, subtitle?: string, width?: number);
349
+ constructor($scope: angular.IScope, portalService: angularportalazure.PortalService, path: string, title: string, subtitle?: string, width?: number);
347
350
  items: any[];
348
351
  loadItems(func: () => angular.IPromise<any>): void;
349
352
  onLoadItems(): void;
@@ -367,7 +370,7 @@ declare namespace angularportalazure {
367
370
  }
368
371
  declare namespace angularportalazure {
369
372
  class BladeNav extends angularportalazure.BladeData {
370
- constructor(portalService: angularportalazure.PortalService, path: string, title?: string, subtitle?: string, width?: number);
373
+ constructor($scope: angular.IScope, portalService: angularportalazure.PortalService, path: string, title?: string, subtitle?: string, width?: number);
371
374
  items: Array<angularportalazure.BladeNavItem>;
372
375
  isNav: boolean;
373
376
  onNavigateTo(path: string): void;
package/apn.js CHANGED
@@ -144,7 +144,8 @@ var angularportalazure;
144
144
  (function (angularportalazure) {
145
145
  var UserControlBase = (function () {
146
146
  //#region Constructor
147
- function UserControlBase(portalService) {
147
+ function UserControlBase($scope, portalService) {
148
+ this.$scope = $scope;
148
149
  this.portalService = portalService;
149
150
  }
150
151
  return UserControlBase;
@@ -166,10 +167,10 @@ var angularportalazure;
166
167
  var Blade = (function (_super) {
167
168
  __extends(Blade, _super);
168
169
  //#region Constructor
169
- function Blade(portalService, path, title, subtitle, width) {
170
+ function Blade($scope, portalService, path, title, subtitle, width) {
170
171
  if (subtitle === void 0) { subtitle = ''; }
171
172
  if (width === void 0) { width = 200; }
172
- var _this = _super.call(this, portalService) || this;
173
+ var _this = _super.call(this, $scope, portalService) || this;
173
174
  //#endregion
174
175
  _this.title = '';
175
176
  _this.subTitle = '';
@@ -435,6 +436,13 @@ var angularportalazure;
435
436
  };
436
437
  //#endregion
437
438
  //#endregion
439
+ Blade.prototype.setTitle = function (text) {
440
+ var _this = this;
441
+ if (this.watcherTitle === undefined) {
442
+ this.watcherTitle = this.$scope.$watch('vm.item.Name', function () { _this.title = (text || ''); });
443
+ this.$scope.$on('$destroy', function () { _this.watcherTitle(); });
444
+ }
445
+ };
438
446
  Blade.prototype.setBladeHeights = function () {
439
447
  var that = this;
440
448
  that.bladeContentHeight = $('.fxs-blade-content').height();
@@ -464,8 +472,8 @@ var angularportalazure;
464
472
  var BladeArea = (function (_super) {
465
473
  __extends(BladeArea, _super);
466
474
  //#region Constructor
467
- function BladeArea(portalService) {
468
- var _this = _super.call(this, portalService) || this;
475
+ function BladeArea($scope, portalService) {
476
+ var _this = _super.call(this, $scope, portalService) || this;
469
477
  _this.blades = new Array();
470
478
  var that = _this;
471
479
  // Set dependencies
@@ -546,7 +554,7 @@ var angularportalazure;
546
554
  });
547
555
  //#endregion
548
556
  //#region Show the blade
549
- var blade = new angularportalazure.Blade(that.portalService, path, '');
557
+ var blade = new angularportalazure.Blade(that.$scope, that.portalService, path, '');
550
558
  that.blades.push(blade);
551
559
  //#endregion
552
560
  //#region Position the blade
@@ -647,7 +655,7 @@ var angularportalazure;
647
655
  if (path === undefined || path == '') {
648
656
  return;
649
657
  }
650
- var blade = new angularportalazure.Blade(that.portalService, path, '');
658
+ var blade = new angularportalazure.Blade(that.$scope, that.portalService, path, '');
651
659
  that.blades.push(blade);
652
660
  var portalcontent = that.portalService.$window.document.getElementById('azureportalscroll');
653
661
  that.portalService.$window.setTimeout(function () {
@@ -680,8 +688,8 @@ var angularportalazure;
680
688
  var AvatarMenu = (function (_super) {
681
689
  __extends(AvatarMenu, _super);
682
690
  //#region Constructor
683
- function AvatarMenu(portalService) {
684
- return _super.call(this, portalService) || this;
691
+ function AvatarMenu($scope, portalService) {
692
+ return _super.call(this, $scope, portalService) || this;
685
693
  }
686
694
  return AvatarMenu;
687
695
  }(angularportalazure.UserControlBase));
@@ -807,10 +815,9 @@ var angularportalazure;
807
815
  (function (angularportalazure) {
808
816
  var Startboard = (function (_super) {
809
817
  __extends(Startboard, _super);
810
- //#endregion
811
818
  //#region Constructor
812
- function Startboard(portalService) {
813
- var _this = _super.call(this, portalService) || this;
819
+ function Startboard($scope, portalService) {
820
+ var _this = _super.call(this, $scope, portalService) || this;
814
821
  _this.tiles = new angularportalazure.Tiles();
815
822
  return _this;
816
823
  }
@@ -829,13 +836,13 @@ var angularportalazure;
829
836
  __extends(Panorama, _super);
830
837
  //#endregion
831
838
  //#region Constructor
832
- function Panorama(title, portalService) {
833
- var _this = _super.call(this, portalService) || this;
839
+ function Panorama($scope, title, portalService) {
840
+ var _this = _super.call(this, $scope, portalService) || this;
834
841
  _this.isVisible = true;
835
842
  _this.title = title;
836
843
  _this.portalService.panorama = _this;
837
- _this.avatarMenu = new angularportalazure.AvatarMenu(_this.portalService);
838
- _this.startboard = new angularportalazure.Startboard(_this.portalService);
844
+ _this.avatarMenu = new angularportalazure.AvatarMenu(_this.$scope, _this.portalService);
845
+ _this.startboard = new angularportalazure.Startboard(_this.$scope, _this.portalService);
839
846
  return _this;
840
847
  }
841
848
  return Panorama;
@@ -855,12 +862,12 @@ var angularportalazure;
855
862
  //#endregion
856
863
  //#endregion
857
864
  //#region Constructor
858
- function PortalShell(title, portalService) {
859
- var _this = _super.call(this, portalService) || this;
865
+ function PortalShell($scope, title, portalService) {
866
+ var _this = _super.call(this, $scope, portalService) || this;
860
867
  _this.portalService = portalService;
861
868
  _this.portalService.portalShell = _this;
862
- _this.portalService.panorama = new angularportalazure.Panorama(title, _this.portalService);
863
- _this.portalService.bladeArea = new angularportalazure.BladeArea(portalService);
869
+ _this.portalService.panorama = new angularportalazure.Panorama(_this.$scope, title, _this.portalService);
870
+ _this.portalService.bladeArea = new angularportalazure.BladeArea(_this.$scope, portalService);
864
871
  _this.initialize();
865
872
  return _this;
866
873
  }
@@ -1124,10 +1131,10 @@ var angularportalazure;
1124
1131
  var BladeData = (function (_super) {
1125
1132
  __extends(BladeData, _super);
1126
1133
  //#region Constructor
1127
- function BladeData(portalService, path, title, subtitle, width) {
1134
+ function BladeData($scope, portalService, path, title, subtitle, width) {
1128
1135
  if (subtitle === void 0) { subtitle = ''; }
1129
1136
  if (width === void 0) { width = 300; }
1130
- return _super.call(this, portalService, path, title, subtitle, width) || this;
1137
+ return _super.call(this, $scope, portalService, path, title, subtitle, width) || this;
1131
1138
  }
1132
1139
  return BladeData;
1133
1140
  }(angularportalazure.Blade));
@@ -1142,10 +1149,10 @@ var angularportalazure;
1142
1149
  __extends(BladeDetail, _super);
1143
1150
  //#endregion
1144
1151
  //#region Constructor
1145
- function BladeDetail(portalService, path, title, subtitle, width) {
1152
+ function BladeDetail($scope, portalService, path, title, subtitle, width) {
1146
1153
  if (subtitle === void 0) { subtitle = ''; }
1147
1154
  if (width === void 0) { width = 200; }
1148
- var _this = _super.call(this, portalService, path, title, subtitle, width) || this;
1155
+ var _this = _super.call(this, $scope, portalService, path, title, subtitle, width) || this;
1149
1156
  //#region Properties
1150
1157
  _this.item = null;
1151
1158
  //this.isCommandNew = true;
@@ -1214,10 +1221,10 @@ var angularportalazure;
1214
1221
  var BladeGrid = (function (_super) {
1215
1222
  __extends(BladeGrid, _super);
1216
1223
  //#region Constructor
1217
- function BladeGrid(portalService, path, title, subtitle, width) {
1224
+ function BladeGrid($scope, portalService, path, title, subtitle, width) {
1218
1225
  if (subtitle === void 0) { subtitle = ''; }
1219
1226
  if (width === void 0) { width = 200; }
1220
- var _this = _super.call(this, portalService, path, title, subtitle, width) || this;
1227
+ var _this = _super.call(this, $scope, portalService, path, title, subtitle, width) || this;
1221
1228
  //#endregion
1222
1229
  //#region Properties
1223
1230
  _this.items = [];
@@ -1374,11 +1381,11 @@ var angularportalazure;
1374
1381
  var BladeNav = (function (_super) {
1375
1382
  __extends(BladeNav, _super);
1376
1383
  //#region Constructor
1377
- function BladeNav(portalService, path, title, subtitle, width) {
1384
+ function BladeNav($scope, portalService, path, title, subtitle, width) {
1378
1385
  if (title === void 0) { title = ''; }
1379
1386
  if (subtitle === void 0) { subtitle = ''; }
1380
1387
  if (width === void 0) { width = 315; }
1381
- var _this = _super.call(this, portalService, path, title, subtitle, width) || this;
1388
+ var _this = _super.call(this, $scope, portalService, path, title, subtitle, width) || this;
1382
1389
  //#endregion
1383
1390
  //#region Properties
1384
1391
  _this.items = new Array();
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.127",
5
+ "version": "0.2.128",
6
6
  "main": "index.js",
7
7
  "typings": "apn.d.ts",
8
8
  "dependencies": {