@ardimedia/angular-portal-azure 0.2.274 → 0.2.276

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
@@ -155,7 +155,8 @@ declare namespace angularportalazure {
155
155
  onCommandNew(): void;
156
156
  onCommandOrder(): void;
157
157
  onCommandRestart(): void;
158
- onCommandSave(): void;
158
+ onCommandSaveBefore(): void;
159
+ onCommandSave(): Promise<void>;
159
160
  onCommandSearch(): void;
160
161
  onCommandStart(): void;
161
162
  onCommandStop(): void;
package/apn.js CHANGED
@@ -149,7 +149,6 @@ var __extends = (this && this.__extends) || (function () {
149
149
  /// <reference path="portalservice.ts" />
150
150
  /// <reference path="usercontrolbase.ts" />
151
151
  /// <reference path="iaddbladeeventargs.ts" />
152
- //declare var $: JQueryStatic;
153
152
  // #endregion
154
153
  var angularportalazure;
155
154
  (function (angularportalazure) {
@@ -215,7 +214,7 @@ var angularportalazure;
215
214
  _this.commandRestart = function () { _this.onCommandRestart(); };
216
215
  _this.commandRestartText = '';
217
216
  _this.isCommandSave = false;
218
- _this.commandSave = function () { _this.onCommandSave(); };
217
+ _this.commandSave = function () { _this.onCommandSaveBefore(); };
219
218
  _this.commandSaveText = '';
220
219
  _this.isCommandSearch = false;
221
220
  _this.commandSearch = function () { _this.onCommandSearch(); };
@@ -414,6 +413,17 @@ var angularportalazure;
414
413
  Blade.prototype.onCommandRestart = function () {
415
414
  throw new Error('[angularportalazure.Blade] \'onCommandRestart\' is an abstract function. Define one in the derived class.');
416
415
  };
416
+ Blade.prototype.onCommandSaveBefore = function () {
417
+ var _this = this;
418
+ if (this.isCommandSave) {
419
+ this.isCommandSave = false;
420
+ this.onCommandSave().then(function () {
421
+ _this.isCommandSave = true;
422
+ }).catch(function () {
423
+ _this.isCommandSave = true;
424
+ });
425
+ }
426
+ };
417
427
  Blade.prototype.onCommandSave = function () {
418
428
  throw new Error('[angularportalazure.Blade] \'onCommandSave\' is an abstract function. Define one in the derived class.');
419
429
  };
@@ -1,3 +1,3 @@
1
- # DirtyFlag
2
-
3
- // http://blogs.msdn.com/b/laurieatkinson/archive/2014/08/23/implementing-a-save-warning-in-an-angular-spa.aspx
1
+ # DirtyFlag
2
+
3
+ // http://blogs.msdn.com/b/laurieatkinson/archive/2014/08/23/implementing-a-save-warning-in-an-angular-spa.aspx
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.274",
5
+ "version": "0.2.276",
6
6
  "main": "index.js",
7
7
  "typings": "apn.d.ts",
8
8
  "dependencies": {