@ardimedia/angular-portal-azure 0.2.96 → 0.2.98
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 +3 -2
- package/apn.js +22 -25
- package/package.json +1 -1
package/apn.d.ts
CHANGED
|
@@ -130,7 +130,8 @@ declare namespace angularportalazure {
|
|
|
130
130
|
comparePaths(path1: string, path2: string): boolean;
|
|
131
131
|
/** close blade. */
|
|
132
132
|
close(): void;
|
|
133
|
-
|
|
133
|
+
clearStatusbar(): void;
|
|
134
|
+
showExceptionOnStatusbar(exception: angularportalazure.Exception): void;
|
|
134
135
|
onCommandBrowse(): void;
|
|
135
136
|
onCommandCancel(): void;
|
|
136
137
|
onCommandCopy(): void;
|
|
@@ -326,7 +327,7 @@ declare namespace angularportalazure {
|
|
|
326
327
|
class BladeDetail extends angularportalazure.BladeData {
|
|
327
328
|
item: any;
|
|
328
329
|
constructor(portalService: angularportalazure.PortalService, path: string, title: string, subtitle?: string, width?: number);
|
|
329
|
-
|
|
330
|
+
loadItem(func: () => any): void;
|
|
330
331
|
onCommandCancel(): void;
|
|
331
332
|
}
|
|
332
333
|
}
|
package/apn.js
CHANGED
|
@@ -276,8 +276,7 @@ var angularportalazure;
|
|
|
276
276
|
// Register listener1
|
|
277
277
|
_this.listener1 = that.portalService.$rootScope.$on('BladeArea.AddBlade', function (event, args) {
|
|
278
278
|
if (that.blade.comparePaths(args.path, that.blade.path)) {
|
|
279
|
-
console.log('function call: that.activate() will probably not work since this/that is not pointing to the right object.');
|
|
280
|
-
that.activate();
|
|
279
|
+
console.log('listener1-BladeArea.AddBlade - function call: that.activate() will probably not work since this/that is not pointing to the right object. - deactivated');
|
|
281
280
|
}
|
|
282
281
|
});
|
|
283
282
|
return _this;
|
|
@@ -344,13 +343,23 @@ var angularportalazure;
|
|
|
344
343
|
}
|
|
345
344
|
};
|
|
346
345
|
//#region Show Exceptions
|
|
347
|
-
Blade.prototype.
|
|
346
|
+
Blade.prototype.clearStatusbar = function () {
|
|
347
|
+
this.statusbar = '';
|
|
348
|
+
this.statusbarClass = '';
|
|
349
|
+
};
|
|
350
|
+
Blade.prototype.showExceptionOnStatusbar = function (exception) {
|
|
348
351
|
var that = this;
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
352
|
+
if (exception.Message === undefined) {
|
|
353
|
+
that.statusbar = 'FEHLER: ' + exception;
|
|
354
|
+
}
|
|
355
|
+
else {
|
|
356
|
+
that.statusbar = 'FEHLER: ' + exception.Message;
|
|
357
|
+
that.statusbar += ' - ';
|
|
358
|
+
exception.Messages.forEach(function (item) {
|
|
359
|
+
that.statusbar += item + ' - ';
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
that.statusbarClass = 'message-error message-off';
|
|
354
363
|
};
|
|
355
364
|
//#endregion
|
|
356
365
|
//#endregion
|
|
@@ -1165,7 +1174,6 @@ var angularportalazure;
|
|
|
1165
1174
|
//#endregion
|
|
1166
1175
|
//#region Methods
|
|
1167
1176
|
//activate() {
|
|
1168
|
-
// angularportalazure.Debug.write('[angularportalazure-debug] \'BladeDetail.activate\' called.', [this]);
|
|
1169
1177
|
// var that = this;
|
|
1170
1178
|
// that.statusbar = 'Daten laden...';
|
|
1171
1179
|
// that.statusbarClass = '';
|
|
@@ -1193,18 +1201,16 @@ var angularportalazure;
|
|
|
1193
1201
|
//onActivated(): void {
|
|
1194
1202
|
// angularportalazure.Debug.write('[angularportalazure-debug] \'onActivated\' called. You could override this.');
|
|
1195
1203
|
//}
|
|
1196
|
-
BladeDetail.prototype.
|
|
1204
|
+
BladeDetail.prototype.loadItem = function (func) {
|
|
1197
1205
|
var that = this;
|
|
1198
1206
|
that.statusbar = 'Daten laden...';
|
|
1199
1207
|
that.statusbarClass = '';
|
|
1200
1208
|
func().then(function (data) {
|
|
1201
1209
|
that.item = data;
|
|
1202
|
-
that.
|
|
1203
|
-
that.statusbarClass = '';
|
|
1210
|
+
that.clearStatusbar();
|
|
1204
1211
|
that.onActivated();
|
|
1205
1212
|
}).catch(function (exception) {
|
|
1206
|
-
that.
|
|
1207
|
-
that.statusbarClass = 'message-error message-off';
|
|
1213
|
+
that.showExceptionOnStatusbar(exception);
|
|
1208
1214
|
});
|
|
1209
1215
|
};
|
|
1210
1216
|
BladeDetail.prototype.onCommandCancel = function () {
|
|
@@ -1238,8 +1244,6 @@ var angularportalazure;
|
|
|
1238
1244
|
//activate(): void {
|
|
1239
1245
|
// let that = this;
|
|
1240
1246
|
// //this.loadItems(() => this.getItemsFunction);
|
|
1241
|
-
// //angularportalazure.Debug.write('[angularportalazure-debug] \'BladeGrid.activate\' called.', [this]);
|
|
1242
|
-
// //console.log('BladeGrid.activate()');
|
|
1243
1247
|
// //var that = this;
|
|
1244
1248
|
// //that.statusbar = 'Daten laden...';
|
|
1245
1249
|
// //that.statusbarClass = '';
|
|
@@ -1272,17 +1276,10 @@ var angularportalazure;
|
|
|
1272
1276
|
that.statusbarClass = '';
|
|
1273
1277
|
func().then(function (data) {
|
|
1274
1278
|
that.items = data;
|
|
1275
|
-
that.
|
|
1276
|
-
that.statusbarClass = '';
|
|
1279
|
+
that.clearStatusbar();
|
|
1277
1280
|
that.onActivated();
|
|
1278
1281
|
}).catch(function (exception) {
|
|
1279
|
-
|
|
1280
|
-
that.statusbar = 'FEHLER: ' + exception;
|
|
1281
|
-
}
|
|
1282
|
-
else {
|
|
1283
|
-
that.statusbar = 'FEHLER: ' + exception.Message;
|
|
1284
|
-
}
|
|
1285
|
-
that.statusbarClass = 'message-error message-off';
|
|
1282
|
+
that.showExceptionOnStatusbar(exception);
|
|
1286
1283
|
});
|
|
1287
1284
|
};
|
|
1288
1285
|
//#region Filter
|
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.98",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"typings": "apn.d.ts",
|
|
8
8
|
"dependencies": {
|