@ardimedia/angular-portal-azure 0.2.10 → 0.2.12

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
@@ -903,24 +903,30 @@ var angularportalazure;
903
903
  scope: {},
904
904
  bindToController: { vm: '=' },
905
905
  templateUrl: '/node_modules/@ardimedia/angular-portal-azure/directives/blade/blade.html',
906
- //link: function (scope, element, attrs, controller) {
907
- // angularportalazure.Debug.write('[angularportalazure-debug] \'directive:azurePortalBlade.link\' called.', [this, portalService]);
908
- // //#region the following code makes sure, that a function scope.vm.close is available
909
- // if (scope.vm === undefined) { scope.vm = {}; }
910
- // if (scope.vm.close === undefined) {
911
- // scope.vm.close = function () {
912
- // angularportalazure.Debug.write('[angularportalazure-debug] \'directive:azurePortalBlade.close\' called.', [this, portalService]);
913
- // portalService.bladeArea.clearLastLevel();
914
- // }
915
- // }
916
- // //#endregion
917
- //},
906
+ link: function (scope, element, attrs, controller) {
907
+ console.log('azurePortalBlade.link()');
908
+ //#region the following code makes sure, that a function scope.vm.close is available
909
+ if (scope.vm === undefined) {
910
+ scope.vm = {};
911
+ }
912
+ if (scope.vm.close === undefined) {
913
+ scope.vm.close = function () {
914
+ angularportalazure.Debug.write('[angularportalazure-debug] \'directive:azurePortalBlade.close\' called.', [this, portalService]);
915
+ portalService.bladeArea.clearLastLevel();
916
+ };
917
+ }
918
+ //#endregion
919
+ },
918
920
  controller: function () {
919
- this.vm.close = function () {
920
- console.log('azurePortalBlade.close()');
921
- //angularportalazure.Debug.write('[angularportalazure-debug] \'directive:azurePortalBlade.close\' called.', [this, portalService]);
922
- //portalService.bladeArea.clearLastLevel();
921
+ this.blade = this.vm.blade;
922
+ this.contentTitle = this.vm.contentTitle;
923
+ this.contentSubTitle = this.vm.contentSubTitle;
924
+ this.isNav = this.vm.isNav;
925
+ this.close = function () {
926
+ angularportalazure.Debug.write('[angularportalazure-debug] \'directive:azurePortalBlade.close\' called.', [this, portalService]);
927
+ portalService.bladeArea.clearLastLevel();
923
928
  };
929
+ this.vm.close = this.close;
924
930
  },
925
931
  controllerAs: 'vm'
926
932
  };
@@ -980,9 +986,13 @@ var angularportalazure;
980
986
  (function (angularportalazure) {
981
987
  function nav($window) {
982
988
  return {
983
- scope: { vm: '=viewModel' },
989
+ restrict: 'E',
990
+ //scope: { vm: '=viewModel' },
991
+ scope: {},
992
+ bindToController: { vm: '=' },
984
993
  templateUrl: '/node_modules/@ardimedia/angular-portal-azure/directives/nav/nav.html',
985
994
  link: function (scope, element, attrs, controller) {
995
+ console.log('nav.link()');
986
996
  angular.forEach(scope.vm.navItems, function (item) {
987
997
  // Set some default values, depending on existing values
988
998
  if (item.isVisible == undefined) {
@@ -995,7 +1005,8 @@ var angularportalazure;
995
1005
  item.style = { cursor: 'default' };
996
1006
  }
997
1007
  });
998
- }
1008
+ },
1009
+ controllerAs: 'vm'
999
1010
  };
1000
1011
  }
1001
1012
  angular.module('angularportalazure').directive('nav', ['$window', nav]);
@@ -10,27 +10,32 @@ namespace angularportalazure {
10
10
  scope: {}, //scope: { vm: '=vm' },
11
11
  bindToController: { vm: '=' },
12
12
  templateUrl: '/node_modules/@ardimedia/angular-portal-azure/directives/blade/blade.html',
13
- //link: function (scope, element, attrs, controller) {
14
- // angularportalazure.Debug.write('[angularportalazure-debug] \'directive:azurePortalBlade.link\' called.', [this, portalService]);
13
+ link: function (scope, element, attrs, controller) {
14
+ console.log('azurePortalBlade.link()');
15
15
 
16
- // //#region the following code makes sure, that a function scope.vm.close is available
16
+ //#region the following code makes sure, that a function scope.vm.close is available
17
17
 
18
- // if (scope.vm === undefined) { scope.vm = {}; }
19
- // if (scope.vm.close === undefined) {
20
- // scope.vm.close = function () {
21
- // angularportalazure.Debug.write('[angularportalazure-debug] \'directive:azurePortalBlade.close\' called.', [this, portalService]);
22
- // portalService.bladeArea.clearLastLevel();
23
- // }
24
- // }
18
+ if (scope.vm === undefined) { scope.vm = {}; }
19
+ if (scope.vm.close === undefined) {
20
+ scope.vm.close = function () {
21
+ angularportalazure.Debug.write('[angularportalazure-debug] \'directive:azurePortalBlade.close\' called.', [this, portalService]);
22
+ portalService.bladeArea.clearLastLevel();
23
+ }
24
+ }
25
25
 
26
- // //#endregion
27
- //},
26
+ //#endregion
27
+ },
28
28
  controller: function () {
29
- this.vm.close = () => {
30
- console.log('azurePortalBlade.close()');
31
- //angularportalazure.Debug.write('[angularportalazure-debug] \'directive:azurePortalBlade.close\' called.', [this, portalService]);
32
- //portalService.bladeArea.clearLastLevel();
33
- };
29
+ this.blade = this.vm.blade;
30
+ this.contentTitle = this.vm.contentTitle;
31
+ this.contentSubTitle = this.vm.contentSubTitle;
32
+ this.isNav = this.vm.isNav;
33
+
34
+ this.close = function () {
35
+ angularportalazure.Debug.write('[angularportalazure-debug] \'directive:azurePortalBlade.close\' called.', [this, portalService]);
36
+ portalService.bladeArea.clearLastLevel();
37
+ };
38
+ this.vm.close = this.close;
34
39
  },
35
40
  controllerAs: 'vm'
36
41
  };
@@ -1,16 +1,21 @@
1
1
  namespace angularportalazure {
2
2
  function nav($window) {
3
3
  return {
4
- scope: { vm: '=viewModel' },
4
+ restrict: 'E',
5
+ //scope: { vm: '=viewModel' },
6
+ scope: {}, //scope: { vm: '=viewModel' },
7
+ bindToController: { vm: '=' },
5
8
  templateUrl: '/node_modules/@ardimedia/angular-portal-azure/directives/nav/nav.html',
6
9
  link: function (scope, element, attrs, controller) {
10
+ console.log('nav.link()');
7
11
  angular.forEach(scope.vm.navItems, function (item) {
8
12
  // Set some default values, depending on existing values
9
13
  if (item.isVisible == undefined) { item.isVisible = true; }
10
14
  if (item.title == undefined || item.title == '') { item.style = { cursor: 'default' }; }
11
15
  if (item.bladePath == undefined || item.bladePath == '') { item.style = { cursor: 'default' }; }
12
16
  });
13
- }
17
+ },
18
+ controllerAs: 'vm'
14
19
  };
15
20
  }
16
21
 
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.10",
5
+ "version": "0.2.12",
6
6
  "main": "index.js",
7
7
  "typings": "apn.d.ts",
8
8
  "dependencies": {