@ardimedia/angular-portal-azure 0.2.37 → 0.2.38

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
@@ -299,6 +299,10 @@ declare namespace angularportalazure {
299
299
  }
300
300
  declare namespace angularportalazure {
301
301
  }
302
+ declare namespace angularportalazure {
303
+ }
304
+ declare namespace angularportalazure {
305
+ }
302
306
  declare namespace angularportalazure {
303
307
  /** If a Web API through an exception, the following interface should be available. */
304
308
  interface IException {
@@ -327,9 +331,9 @@ declare namespace angularportalazure {
327
331
  }
328
332
  }
329
333
  declare namespace angularportalazure {
330
- class BladeList extends angularportalazure.BladeData {
331
- items: any[];
334
+ class BladeGrid extends angularportalazure.BladeData {
332
335
  constructor(portalService: angularportalazure.PortalService, path: string, title: string, subtitle?: string, width?: number);
336
+ items: any[];
333
337
  activate(): void;
334
338
  onActivate(): any;
335
339
  loadItems(f: any): void;
package/apn.js CHANGED
@@ -899,6 +899,44 @@ var angularportalazure;
899
899
  /// <reference path="../../domain/debug.ts" />
900
900
  /// <reference path="../../domain/portalservice.ts" />
901
901
  var angularportalazure;
902
+ (function (angularportalazure) {
903
+ function angularPortalBladeGrid(portalService) {
904
+ return {
905
+ restrict: 'E',
906
+ transclude: true,
907
+ scope: {},
908
+ bindToController: { vm: '=' },
909
+ templateUrl: '/node_modules/@ardimedia/angular-portal-azure/directives/blade/blade.html',
910
+ link: function (scope, element, attrs, controller) {
911
+ //console.log('angularPortalBladeGrid.link()');
912
+ //console.log(this);
913
+ //#region the following code makes sure, that a function scope.vm.close is available
914
+ //if (scope.vm === undefined) { scope.vm = {}; }
915
+ //if (scope.vm.close === undefined) {
916
+ // scope.vm.close = function () {
917
+ // angularportalazure.Debug.write('[angularportalazure-debug] \'directive:azurePortalBlade.close\' called.', [this, portalService]);
918
+ // portalService.bladeArea.clearLastLevel();
919
+ // }
920
+ //}
921
+ //#endregion
922
+ },
923
+ controller: function () {
924
+ //console.log('angularPortalBladeGrid.controller()');
925
+ //console.log(this);
926
+ this.vm.close = function () {
927
+ angularportalazure.Debug.write('[angularportalazure-debug] \'directive:azurePortalBlade.close\' called.', [this, portalService]);
928
+ portalService.bladeArea.clearLastLevel();
929
+ };
930
+ },
931
+ controllerAs: 'ctrl'
932
+ };
933
+ }
934
+ angular.module('angularportalazure').directive('angularPortalBladeGrid', ['angularportalazure.portalService', angularPortalBladeGrid]);
935
+ })(angularportalazure || (angularportalazure = {}));
936
+ /// <reference types="angular" />
937
+ /// <reference path="../../domain/debug.ts" />
938
+ /// <reference path="../../domain/portalservice.ts" />
939
+ var angularportalazure;
902
940
  (function (angularportalazure) {
903
941
  function angularPortalBladeNav(portalService) {
904
942
  return {
@@ -1000,6 +1038,39 @@ var angularportalazure;
1000
1038
  // app.directive(DirtyFlag.directiveId, ['personmanager', (pm) => new DirtyFlag(pm)]);
1001
1039
  //}
1002
1040
  var angularportalazure;
1041
+ (function (angularportalazure) {
1042
+ function grid($window) {
1043
+ return {
1044
+ restrict: 'E',
1045
+ scope: {},
1046
+ bindToController: { vm: '=' },
1047
+ templateUrl: '/node_modules/@ardimedia/angular-portal-azure/directives/grid/grid.html',
1048
+ link: function (scope, element, attrs, controller) {
1049
+ //console.log('grid.link()');
1050
+ //console.log(this);
1051
+ angular.forEach(controller.vm.items, function (item) {
1052
+ // Set some default values, depending on existing values
1053
+ if (item.isVisible == undefined) {
1054
+ item.isVisible = true;
1055
+ }
1056
+ if (item.title == undefined || item.title == '') {
1057
+ item.style = { cursor: 'default' };
1058
+ }
1059
+ if (item.bladePath == undefined || item.bladePath == '') {
1060
+ item.style = { cursor: 'default' };
1061
+ }
1062
+ });
1063
+ },
1064
+ controller: function () {
1065
+ //console.log('grid.controller()');
1066
+ //console.log(this);
1067
+ },
1068
+ controllerAs: 'ctrl'
1069
+ };
1070
+ }
1071
+ angular.module('angularportalazure').directive('grid', ['$window', grid]);
1072
+ })(angularportalazure || (angularportalazure = {}));
1073
+ var angularportalazure;
1003
1074
  (function (angularportalazure) {
1004
1075
  function angularPortalHome() {
1005
1076
  return {
@@ -1151,14 +1222,14 @@ var angularportalazure;
1151
1222
  /// <reference path="portalservice.ts" />
1152
1223
  var angularportalazure;
1153
1224
  (function (angularportalazure) {
1154
- var BladeList = (function (_super) {
1155
- __extends(BladeList, _super);
1156
- //#endregion
1225
+ var BladeGrid = (function (_super) {
1226
+ __extends(BladeGrid, _super);
1157
1227
  //#region Constructor
1158
- function BladeList(portalService, path, title, subtitle, width) {
1228
+ function BladeGrid(portalService, path, title, subtitle, width) {
1159
1229
  if (subtitle === void 0) { subtitle = ''; }
1160
1230
  if (width === void 0) { width = 200; }
1161
1231
  _super.call(this, portalService, path, title, subtitle, width);
1232
+ //#endregion
1162
1233
  //#region Properties
1163
1234
  this.items = [];
1164
1235
  angularportalazure.Debug.write('[angularportalazure-debug] \'BladeList\' constructor called.', [this, portalService, path, title, subtitle, width]);
@@ -1167,7 +1238,7 @@ var angularportalazure;
1167
1238
  }
1168
1239
  //#endregion
1169
1240
  //#region Methods
1170
- BladeList.prototype.activate = function () {
1241
+ BladeGrid.prototype.activate = function () {
1171
1242
  angularportalazure.Debug.write('[angularportalazure-debug] \'BladeList.activate\' called.', [this]);
1172
1243
  var that = this;
1173
1244
  that.statusbar = 'Daten laden...';
@@ -1179,10 +1250,10 @@ var angularportalazure;
1179
1250
  that.loadItems(onActivate);
1180
1251
  }
1181
1252
  };
1182
- BladeList.prototype.onActivate = function () {
1253
+ BladeGrid.prototype.onActivate = function () {
1183
1254
  throw new Error('[angularportalazure.BladeList] \'onActivate\' is an abstract function. Define one in the derived class.');
1184
1255
  };
1185
- BladeList.prototype.loadItems = function (f) {
1256
+ BladeGrid.prototype.loadItems = function (f) {
1186
1257
  var that = this;
1187
1258
  f.success(function (data) {
1188
1259
  that.items = data;
@@ -1194,7 +1265,7 @@ var angularportalazure;
1194
1265
  });
1195
1266
  };
1196
1267
  //#region Filter
1197
- BladeList.prototype.onFilter = function (actual, expected) {
1268
+ BladeGrid.prototype.onFilter = function (actual, expected) {
1198
1269
  angularportalazure.Debug.write('[angularportalazure-debug] \'BladeList.filter\' called.', [this, actual, expected]);
1199
1270
  //#region Documentation
1200
1271
  // > onFilter will be called for each item in an array
@@ -1280,16 +1351,16 @@ var angularportalazure;
1280
1351
  //#endregion
1281
1352
  //#region OBSOLETE
1282
1353
  /** Obsolete */
1283
- BladeList.prototype.setObsoleteLayoutProperites = function () {
1354
+ BladeGrid.prototype.setObsoleteLayoutProperites = function () {
1284
1355
  angularportalazure.Debug.write('[angularportalazure-debug] \'BladeList.setObsoleteLayoutProperites\' called.', [this]);
1285
1356
  //if (this.items.length !== 0) {
1286
1357
  // this.navGrid.items = this.items; //--> needed, otherwise nav html pages will no longer work.
1287
1358
  //}
1288
1359
  _super.prototype.setObsoleteLayoutProperites.call(this);
1289
1360
  };
1290
- return BladeList;
1361
+ return BladeGrid;
1291
1362
  }(angularportalazure.BladeData));
1292
- angularportalazure.BladeList = BladeList;
1363
+ angularportalazure.BladeGrid = BladeGrid;
1293
1364
  })(angularportalazure || (angularportalazure = {}));
1294
1365
  /// <reference path="debug.ts" />
1295
1366
  /// <reference path="bladenav.ts" />
@@ -0,0 +1,42 @@
1
+ /// <reference types="angular" />
2
+ /// <reference path="../../domain/debug.ts" />
3
+ /// <reference path="../../domain/portalservice.ts" />
4
+
5
+ namespace angularportalazure {
6
+ function angularPortalBladeGrid(portalService: angularportalazure.PortalService) {
7
+ return {
8
+ restrict: 'E',
9
+ transclude: true,
10
+ scope: {},
11
+ bindToController: { vm: '=' },
12
+ templateUrl: '/node_modules/@ardimedia/angular-portal-azure/directives/blade/blade.html',
13
+ link: function (scope, element, attrs, controller) {
14
+ //console.log('angularPortalBladeGrid.link()');
15
+ //console.log(this);
16
+ //#region the following code makes sure, that a function scope.vm.close is available
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
+ //}
25
+
26
+ //#endregion
27
+ },
28
+ controller: function () {
29
+ //console.log('angularPortalBladeGrid.controller()');
30
+ //console.log(this);
31
+
32
+ this.vm.close = function () {
33
+ angularportalazure.Debug.write('[angularportalazure-debug] \'directive:azurePortalBlade.close\' called.', [this, portalService]);
34
+ portalService.bladeArea.clearLastLevel();
35
+ };
36
+ },
37
+ controllerAs: 'ctrl'
38
+ };
39
+ }
40
+
41
+ angular.module('angularportalazure').directive('angularPortalBladeGrid', ['angularportalazure.portalService', angularPortalBladeGrid]);
42
+ }
@@ -0,0 +1,27 @@
1
+ <table class="azc-grid-full azc-grid-multiselectable" aria-readonly="true">
2
+ <caption data-bind="text: data.summary"></caption>
3
+ <colgroup>
4
+ <col class="col0" style="width: 41px;">
5
+ <col class="col1">
6
+ </colgroup>
7
+ <tbody class="azc-grid-groupdata" role="rowgroup">
8
+ <tr data-ng-repeat="item in ctrl.vm.items track by $index" data-ng-click="ctrl.vm.navigateTo(item.bladePath);" role="row" aria-selected="false" data-grid-row-activated="false" data-grid-selectable="true" data-grid-focusable="true" data-grid-activateable="true" ng-show="item.isVisible" style="cursor:pointer" ng-style="item.style">
9
+ <td class="msportalfx-gridcolumn-asseticon" role="gridcell" data-grid-cell-activated="false">
10
+ <div class="azc-vivaControl" data-bind='vivaControl: "DEB28B4C-518F-4F70-A817-BF9277606CAB"'>
11
+ <div data-bind="image: value">
12
+ <svg data-ng-show="item.title" xmlns="http://www.w3.org/2000/svg" class="msportal-fx-svg-placeholder" viewBox="0 0 50 50" focusable="false">
13
+ <rect class="msportalfx-svg-c04" x="19.8" y="39.4" width="10.6" height="3.4" />
14
+ <polygon class="msportalfx-svg-c04" points="23.1,50 27,50 30.3,46.5 19.8,46.5" />
15
+ <path class="msportalfx-svg-c20" d="M 41.2 14.7 L 41.2 14.7 v -0.3 c 0 -7.7 -6.6 -14.1 -14.7 -14.2 c -0.2 -0.3 -4.8 0.1 -4.8 0.1 l 0 0 c -7.3 0.9 -13 7 -13 14.1 c 0 0.2 -0.8 5.8 4.9 10.5 c 2.6 2.3 5.3 8.5 5.7 10.3 l 0.3 0.6 h 10.6 l 0.3 -0.6 c 0.4 -1.8 3.2 -8 5.7 -10.2 C 41.9 20.2 41.2 14.9 41.2 14.7 Z" />
16
+ <path class="msportalfx-svg-c01" d="M 30.4 18.1 l -1.7 10.6 h -2 V 18.2 l 0.1 -0.2 c 3.8 0 3.3 -3.5 3.3 -3.5 H 19.8 v 0.3 c 0 0.8 0.3 3.3 3.5 3.3 v 10.6 h -2 l -0.5 -2.5 l -1.3 -8.1 c -2.3 0 -3 -1.5 -3.3 -2.6 c 0 -0.4 0 -0.9 0 -1.4 c 0 -2.8 3.2 -3.1 3.2 -3.1 h 11 c 0 0 3.5 0.4 3.5 3.5 C 33.8 14.5 33.9 18.1 30.4 18.1 Z" />
17
+ <path class="msportalfx-svg-c01" opacity="0.15" enable-background="new " d="M 41.2 16.4 c 0.1 -1 0 -1.7 0 -1.8 l 0 0 v -0.3 c 0 -7.7 -6.6 -14.1 -14.7 -14.2 c -0.2 -0.3 -4.8 0.1 -4.8 0.1 l 0 0 c -7.3 0.9 -13 7 -13 14.1 c 0 0.1 -0.1 0.9 0 2.1 H 41.2 Z" />
18
+ </svg>
19
+ </div>
20
+ </div>
21
+ </td>
22
+ <td tabindex="0" role="gridcell" data-activatable="true" data-grid-cell-activated="false">
23
+ <a ng-href="{{item.hrefPath}}" target="_blank" style="color:black">{{item.title}}</a>
24
+ </td>
25
+ </tr>
26
+ </tbody>
27
+ </table>
@@ -0,0 +1,27 @@
1
+ namespace angularportalazure {
2
+ function grid($window) {
3
+ return {
4
+ restrict: 'E',
5
+ scope: {},
6
+ bindToController: { vm: '=' },
7
+ templateUrl: '/node_modules/@ardimedia/angular-portal-azure/directives/grid/grid.html',
8
+ link: function (scope, element, attrs, controller) {
9
+ //console.log('grid.link()');
10
+ //console.log(this);
11
+ angular.forEach(controller.vm.items, function (item) {
12
+ // Set some default values, depending on existing values
13
+ if (item.isVisible == undefined) { item.isVisible = true; }
14
+ if (item.title == undefined || item.title == '') { item.style = { cursor: 'default' }; }
15
+ if (item.bladePath == undefined || item.bladePath == '') { item.style = { cursor: 'default' }; }
16
+ });
17
+ },
18
+ controller: function () {
19
+ //console.log('grid.controller()');
20
+ //console.log(this);
21
+ },
22
+ controllerAs: 'ctrl'
23
+ };
24
+ }
25
+
26
+ angular.module('angularportalazure').directive('grid', ['$window', grid]);
27
+ }
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.37",
5
+ "version": "0.2.38",
6
6
  "main": "index.js",
7
7
  "typings": "apn.d.ts",
8
8
  "dependencies": {