@ardimedia/angular-portal-azure 0.2.279 → 0.2.280

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 +2 -3
  2. package/apn.js +8 -19
  3. package/package.json +1 -1
package/apn.d.ts CHANGED
@@ -155,8 +155,7 @@ declare namespace angularportalazure {
155
155
  onCommandNew(): void;
156
156
  onCommandOrder(): void;
157
157
  onCommandRestart(): void;
158
- onCommandSaveBefore(): void;
159
- onCommandSave(): (Promise<void> & angular.IHttpPromise<any>);
158
+ onCommandSave(): void;
160
159
  onCommandSearch(): void;
161
160
  onCommandStart(): void;
162
161
  onCommandStop(): void;
@@ -374,7 +373,7 @@ declare namespace angularportalazure {
374
373
  constructor($scope: angular.IScope, portalService: angularportalazure.PortalService, path: string, title: string, subtitle?: string, width?: number);
375
374
  item: T;
376
375
  loadItem(func: () => Promise<any>): void;
377
- saveItem(func: () => any): void;
376
+ saveItem(func: () => any): (Promise<void> & angular.IHttpPromise<any>);
378
377
  onSaveItem(): void;
379
378
  onSavedItem(): void;
380
379
  onCommandCancel(): void;
package/apn.js CHANGED
@@ -214,7 +214,7 @@ var angularportalazure;
214
214
  _this.commandRestart = function () { _this.onCommandRestart(); };
215
215
  _this.commandRestartText = '';
216
216
  _this.isCommandSave = false;
217
- _this.commandSave = function () { _this.onCommandSaveBefore(); };
217
+ _this.commandSave = function () { _this.onCommandSave(); };
218
218
  _this.commandSaveText = '';
219
219
  _this.isCommandSearch = false;
220
220
  _this.commandSearch = function () { _this.onCommandSearch(); };
@@ -413,23 +413,6 @@ var angularportalazure;
413
413
  Blade.prototype.onCommandRestart = function () {
414
414
  throw new Error('[angularportalazure.Blade] \'onCommandRestart\' is an abstract function. Define one in the derived class.');
415
415
  };
416
- Blade.prototype.onCommandSaveBefore = function () {
417
- var _this = this;
418
- console.log('onCommandSave');
419
- if (this.isCommandSave) {
420
- console.log('isCommandSave true');
421
- this.isCommandSave = false;
422
- this.setStatusBarSaveData();
423
- this.onCommandSave().then(function () {
424
- console.log('onCommandSave...then');
425
- _this.setStatusBar('');
426
- _this.isCommandSave = true;
427
- }).catch(function () {
428
- console.log('onCommandSave...catch');
429
- _this.isCommandSave = true;
430
- });
431
- }
432
- };
433
416
  Blade.prototype.onCommandSave = function () {
434
417
  throw new Error('[angularportalazure.Blade] \'onCommandSave\' is an abstract function. Define one in the derived class.');
435
418
  };
@@ -1200,10 +1183,16 @@ var angularportalazure;
1200
1183
  console.log(this.formblade);
1201
1184
  return;
1202
1185
  }
1203
- func().then(function (data) {
1186
+ this.isCommandSave = false;
1187
+ console.log('this.isCommandSave = false;');
1188
+ return func().then(function (data) {
1204
1189
  _this.item = data;
1190
+ _this.isCommandSave = true;
1191
+ console.log('this.isCommandSave = true;');
1205
1192
  _this.onSavedItem();
1206
1193
  }).catch(function (exception) {
1194
+ _this.isCommandSave = true;
1195
+ console.log('this.isCommandSave = true;');
1207
1196
  _this.setStatusBarException(exception);
1208
1197
  });
1209
1198
  };
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.279",
5
+ "version": "0.2.280",
6
6
  "main": "index.js",
7
7
  "typings": "apn.d.ts",
8
8
  "dependencies": {