@ardimedia/angular-portal-azure 0.2.311 → 0.2.313
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 +55 -50
- package/apn.js +189 -178
- package/package.json +1 -1
package/apn.d.ts
CHANGED
|
@@ -197,18 +197,67 @@ declare namespace angularportalazure {
|
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
199
|
declare namespace angularportalazure {
|
|
200
|
-
class BladeData extends angularportalazure.Blade {
|
|
200
|
+
class BladeData<T> extends angularportalazure.Blade {
|
|
201
201
|
constructor($scope: angular.IScope, portalService: angularportalazure.PortalService, path: string, title: string, subtitle?: string, width?: number);
|
|
202
|
+
item: T;
|
|
203
|
+
items: T[];
|
|
204
|
+
newItem(func: () => Promise<any | angularportalazure.Exception>): void;
|
|
205
|
+
/** Extension point */
|
|
206
|
+
onNewItem(): void;
|
|
207
|
+
/** Extension point */
|
|
208
|
+
onNewedItem(): void;
|
|
209
|
+
loadItem(func: () => Promise<any | angularportalazure.Exception>): void;
|
|
202
210
|
onLoadItem(): void;
|
|
203
|
-
onLoadItems(): void;
|
|
204
211
|
onLoadedItem(): void;
|
|
212
|
+
onLoadItems(): void;
|
|
205
213
|
onLoadedItems(): void;
|
|
214
|
+
/**
|
|
215
|
+
* Default behavior for saving an entity.
|
|
216
|
+
* - call this.setStatusBarSaveData();
|
|
217
|
+
* - call this.onSaveItem()
|
|
218
|
+
* - validates this.formblade. if not valid, returns without saving
|
|
219
|
+
* - set this.isCommandSaveEnabled = false
|
|
220
|
+
* - call the provided function
|
|
221
|
+
* THEN
|
|
222
|
+
* - call this.clearStatusBar()
|
|
223
|
+
* - set this.isCommandSaveEnabled = true
|
|
224
|
+
* - set this.item to the saved data
|
|
225
|
+
* - call this.onSavedItem()
|
|
226
|
+
* - returns the saved data
|
|
227
|
+
* CATCH
|
|
228
|
+
* - set this.isCommandSaveEnabled = true
|
|
229
|
+
* - call this.setStatusBarException
|
|
230
|
+
*/
|
|
231
|
+
saveItem(func: () => Promise<T | angularportalazure.Exception> | angular.IPromise<T | angularportalazure.Exception>, ngForm?: any): (Promise<T | void> | angular.IPromise<T | void>);
|
|
232
|
+
/** Extension point */
|
|
233
|
+
onSaveItem(): void;
|
|
234
|
+
/** Extension point */
|
|
235
|
+
onSavedItem(): void;
|
|
236
|
+
/**
|
|
237
|
+
* Default behavior for saving any object.
|
|
238
|
+
* - call this.setStatusBarSaveData();
|
|
239
|
+
* - call this.onSaveItem()
|
|
240
|
+
* - validates this.formblade. if not valid, returns without saving
|
|
241
|
+
* - call the provided function
|
|
242
|
+
* THEN
|
|
243
|
+
* - call this.clearStatusBar()
|
|
244
|
+
* - call this.onSavedItem()
|
|
245
|
+
* - returns the saved data
|
|
246
|
+
* CATCH
|
|
247
|
+
* - call this.setStatusBarException
|
|
248
|
+
*/
|
|
249
|
+
saveObject(func: () => Promise<any | angularportalazure.Exception> | angular.IPromise<any | angularportalazure.Exception>, ngForm?: any): (Promise<any | void> | angular.IPromise<any | void>);
|
|
250
|
+
deleteItem(func: () => Promise<T | angularportalazure.Exception> | angular.IPromise<T | angularportalazure.Exception>, ngForm?: any): (Promise<T | void> | angular.IPromise<T | void>);
|
|
251
|
+
/** Extension point */
|
|
252
|
+
onDeleteItem(): void;
|
|
253
|
+
/** Extension point */
|
|
254
|
+
onDeletedItem(): void;
|
|
206
255
|
}
|
|
207
256
|
}
|
|
208
257
|
declare namespace angularportalazure {
|
|
209
|
-
class BladeNav extends angularportalazure.BladeData {
|
|
258
|
+
class BladeNav extends angularportalazure.BladeData<any> {
|
|
210
259
|
constructor($scope: angular.IScope, portalService: angularportalazure.PortalService, path: string, title?: string, subtitle?: string, width?: number);
|
|
211
|
-
|
|
260
|
+
navItems: Array<angularportalazure.BladeNavItem>;
|
|
212
261
|
isNav: boolean;
|
|
213
262
|
onNavigateTo(path: string): void;
|
|
214
263
|
}
|
|
@@ -357,59 +406,15 @@ declare namespace angularportalazure {
|
|
|
357
406
|
declare namespace angularportalazure {
|
|
358
407
|
}
|
|
359
408
|
declare namespace angularportalazure {
|
|
360
|
-
class BladeDetail<T> extends angularportalazure.BladeData {
|
|
409
|
+
class BladeDetail<T> extends angularportalazure.BladeData<T> {
|
|
361
410
|
constructor($scope: angular.IScope, portalService: angularportalazure.PortalService, path: string, title: string, subtitle?: string, width?: number);
|
|
362
411
|
item: T;
|
|
363
|
-
newItem(func: () => Promise<any | angularportalazure.Exception>): void;
|
|
364
|
-
loadItem(func: () => Promise<any | angularportalazure.Exception>): void;
|
|
365
|
-
/**
|
|
366
|
-
* Default behavior for saving an entity.
|
|
367
|
-
* - call this.setStatusBarSaveData();
|
|
368
|
-
* - call this.onSaveItem()
|
|
369
|
-
* - validates this.formblade. if not valid, returns without saving
|
|
370
|
-
* - set this.isCommandSaveEnabled = false
|
|
371
|
-
* - call the provided function
|
|
372
|
-
* THEN
|
|
373
|
-
* - call this.clearStatusBar()
|
|
374
|
-
* - set this.isCommandSaveEnabled = true
|
|
375
|
-
* - set this.item to the saved data
|
|
376
|
-
* - call this.onSavedItem()
|
|
377
|
-
* - returns the saved data
|
|
378
|
-
* CATCH
|
|
379
|
-
* - set this.isCommandSaveEnabled = true
|
|
380
|
-
* - call this.setStatusBarException
|
|
381
|
-
*/
|
|
382
|
-
saveItem(func: () => Promise<T | angularportalazure.Exception> | angular.IPromise<T | angularportalazure.Exception>, ngForm?: any): (Promise<T | void> | angular.IPromise<T | void>);
|
|
383
|
-
/** Extension point */
|
|
384
|
-
onSaveItem(): void;
|
|
385
|
-
/** Extension point */
|
|
386
|
-
onSavedItem(): void;
|
|
387
|
-
/**
|
|
388
|
-
* Default behavior for saving any object.
|
|
389
|
-
* - call this.setStatusBarSaveData();
|
|
390
|
-
* - call this.onSaveItem()
|
|
391
|
-
* - validates this.formblade. if not valid, returns without saving
|
|
392
|
-
* - call the provided function
|
|
393
|
-
* THEN
|
|
394
|
-
* - call this.clearStatusBar()
|
|
395
|
-
* - call this.onSavedItem()
|
|
396
|
-
* - returns the saved data
|
|
397
|
-
* CATCH
|
|
398
|
-
* - call this.setStatusBarException
|
|
399
|
-
*/
|
|
400
|
-
saveObject(func: () => Promise<any | angularportalazure.Exception> | angular.IPromise<any | angularportalazure.Exception>, ngForm?: any): (Promise<any | void> | angular.IPromise<any | void>);
|
|
401
|
-
deleteItem(func: () => Promise<T | angularportalazure.Exception> | angular.IPromise<T | angularportalazure.Exception>, ngForm?: any): (Promise<T | void> | angular.IPromise<T | void>);
|
|
402
|
-
/** Extension point */
|
|
403
|
-
onDeleteItem(): void;
|
|
404
|
-
/** Extension point */
|
|
405
|
-
onDeletedItem(): void;
|
|
406
412
|
onCommandCancel(): void;
|
|
407
413
|
}
|
|
408
414
|
}
|
|
409
415
|
declare namespace angularportalazure {
|
|
410
|
-
class BladeGrid extends angularportalazure.BladeData {
|
|
416
|
+
class BladeGrid extends angularportalazure.BladeData<any> {
|
|
411
417
|
constructor($scope: angular.IScope, portalService: angularportalazure.PortalService, path: string, title: string, subtitle?: string, width?: number);
|
|
412
|
-
items: any[];
|
|
413
418
|
loadItems(func: () => any | angular.IPromise<any> | Promise<any>): void;
|
|
414
419
|
onFilter(actual: Object, expected: string): boolean;
|
|
415
420
|
}
|
package/apn.js
CHANGED
|
@@ -686,14 +686,45 @@ var angularportalazure;
|
|
|
686
686
|
function BladeData($scope, portalService, path, title, subtitle, width) {
|
|
687
687
|
if (subtitle === void 0) { subtitle = ''; }
|
|
688
688
|
if (width === void 0) { width = 300; }
|
|
689
|
-
|
|
689
|
+
var _this = _super.call(this, $scope, portalService, path, title, subtitle, width) || this;
|
|
690
|
+
// #endregion
|
|
691
|
+
// #region Properties
|
|
692
|
+
_this.item = {};
|
|
693
|
+
_this.items = [];
|
|
694
|
+
return _this;
|
|
690
695
|
}
|
|
691
696
|
// #endregion
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
this.
|
|
697
|
+
// #region newItem
|
|
698
|
+
BladeData.prototype.newItem = function (func) {
|
|
699
|
+
//this.onLoadItem();
|
|
700
|
+
var _this = this;
|
|
701
|
+
func().then(function (data) {
|
|
702
|
+
_this.isCommandDeleteEnabled = false;
|
|
703
|
+
_this.item = data;
|
|
704
|
+
//this.onLoadedItem();
|
|
705
|
+
}).catch(function (ex) {
|
|
706
|
+
_this.setStatusBarException(ex);
|
|
707
|
+
});
|
|
695
708
|
};
|
|
696
|
-
|
|
709
|
+
/** Extension point */
|
|
710
|
+
BladeData.prototype.onNewItem = function () {
|
|
711
|
+
};
|
|
712
|
+
/** Extension point */
|
|
713
|
+
BladeData.prototype.onNewedItem = function () {
|
|
714
|
+
};
|
|
715
|
+
// #endregion
|
|
716
|
+
// #region loadItem
|
|
717
|
+
BladeData.prototype.loadItem = function (func) {
|
|
718
|
+
var _this = this;
|
|
719
|
+
this.onLoadItem();
|
|
720
|
+
func().then(function (data) {
|
|
721
|
+
_this.item = data;
|
|
722
|
+
_this.onLoadedItem();
|
|
723
|
+
}).catch(function (ex) {
|
|
724
|
+
_this.setStatusBarException(ex);
|
|
725
|
+
});
|
|
726
|
+
};
|
|
727
|
+
BladeData.prototype.onLoadItem = function () {
|
|
697
728
|
this.visibility = 'collapse';
|
|
698
729
|
this.setStatusBarLoadData();
|
|
699
730
|
};
|
|
@@ -701,10 +732,158 @@ var angularportalazure;
|
|
|
701
732
|
this.visibility = 'visible';
|
|
702
733
|
this.clearStatusBar();
|
|
703
734
|
};
|
|
735
|
+
// #endregion
|
|
736
|
+
// #region loadItems
|
|
737
|
+
BladeData.prototype.onLoadItems = function () {
|
|
738
|
+
this.visibility = 'collapse';
|
|
739
|
+
this.setStatusBarLoadData();
|
|
740
|
+
};
|
|
704
741
|
BladeData.prototype.onLoadedItems = function () {
|
|
705
742
|
this.visibility = 'visible';
|
|
706
743
|
this.clearStatusBar();
|
|
707
744
|
};
|
|
745
|
+
// #endregion
|
|
746
|
+
// #region saveItem
|
|
747
|
+
/**
|
|
748
|
+
* Default behavior for saving an entity.
|
|
749
|
+
* - call this.setStatusBarSaveData();
|
|
750
|
+
* - call this.onSaveItem()
|
|
751
|
+
* - validates this.formblade. if not valid, returns without saving
|
|
752
|
+
* - set this.isCommandSaveEnabled = false
|
|
753
|
+
* - call the provided function
|
|
754
|
+
* THEN
|
|
755
|
+
* - call this.clearStatusBar()
|
|
756
|
+
* - set this.isCommandSaveEnabled = true
|
|
757
|
+
* - set this.item to the saved data
|
|
758
|
+
* - call this.onSavedItem()
|
|
759
|
+
* - returns the saved data
|
|
760
|
+
* CATCH
|
|
761
|
+
* - set this.isCommandSaveEnabled = true
|
|
762
|
+
* - call this.setStatusBarException
|
|
763
|
+
*/
|
|
764
|
+
BladeData.prototype.saveItem = function (func, ngForm) {
|
|
765
|
+
var _this = this;
|
|
766
|
+
if (ngForm === void 0) { ngForm = undefined; }
|
|
767
|
+
this.setStatusBarSaveData();
|
|
768
|
+
this.onSaveItem();
|
|
769
|
+
// #region form valid?
|
|
770
|
+
// angularjs: if form valid
|
|
771
|
+
if (!this.formblade.$valid) {
|
|
772
|
+
this.statusBar = 'Speichern nicht möglich! [Console] enthält weitere Informationen.';
|
|
773
|
+
this.statusBarClass = 'apa-statusbar-error';
|
|
774
|
+
//console.log(this.formblade);
|
|
775
|
+
return;
|
|
776
|
+
}
|
|
777
|
+
// angular: if form valid
|
|
778
|
+
if (ngForm !== undefined) {
|
|
779
|
+
if (!ngForm.valid) {
|
|
780
|
+
return;
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
// #endregion
|
|
784
|
+
this.isCommandSaveEnabled = false;
|
|
785
|
+
return func().then(function (data) {
|
|
786
|
+
_this.clearStatusBar();
|
|
787
|
+
_this.isCommandSaveEnabled = true;
|
|
788
|
+
_this.isCommandDeleteEnabled = true;
|
|
789
|
+
_this.item = data;
|
|
790
|
+
_this.onSavedItem();
|
|
791
|
+
return data;
|
|
792
|
+
}).catch(function (exception) {
|
|
793
|
+
_this.isCommandSaveEnabled = true;
|
|
794
|
+
_this.setStatusBarException(exception);
|
|
795
|
+
});
|
|
796
|
+
};
|
|
797
|
+
/** Extension point */
|
|
798
|
+
BladeData.prototype.onSaveItem = function () {
|
|
799
|
+
};
|
|
800
|
+
/** Extension point */
|
|
801
|
+
BladeData.prototype.onSavedItem = function () {
|
|
802
|
+
};
|
|
803
|
+
// #endregion
|
|
804
|
+
// #region saveObject
|
|
805
|
+
/**
|
|
806
|
+
* Default behavior for saving any object.
|
|
807
|
+
* - call this.setStatusBarSaveData();
|
|
808
|
+
* - call this.onSaveItem()
|
|
809
|
+
* - validates this.formblade. if not valid, returns without saving
|
|
810
|
+
* - call the provided function
|
|
811
|
+
* THEN
|
|
812
|
+
* - call this.clearStatusBar()
|
|
813
|
+
* - call this.onSavedItem()
|
|
814
|
+
* - returns the saved data
|
|
815
|
+
* CATCH
|
|
816
|
+
* - call this.setStatusBarException
|
|
817
|
+
*/
|
|
818
|
+
BladeData.prototype.saveObject = function (func, ngForm) {
|
|
819
|
+
var _this = this;
|
|
820
|
+
if (ngForm === void 0) { ngForm = undefined; }
|
|
821
|
+
this.setStatusBarSaveData();
|
|
822
|
+
this.onSaveItem();
|
|
823
|
+
// #region form valid?
|
|
824
|
+
// angularjs: if form valid
|
|
825
|
+
if (!this.formblade.$valid) {
|
|
826
|
+
this.statusBar = 'Speichern nicht möglich! [Console] enthält weitere Informationen.';
|
|
827
|
+
this.statusBarClass = 'apa-statusbar-error';
|
|
828
|
+
//console.log(this.formblade);
|
|
829
|
+
return;
|
|
830
|
+
}
|
|
831
|
+
// angular: if form valid
|
|
832
|
+
if (ngForm !== undefined) {
|
|
833
|
+
if (!ngForm.valid) {
|
|
834
|
+
return;
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
// #endregion
|
|
838
|
+
return func().then(function (data) {
|
|
839
|
+
_this.clearStatusBar();
|
|
840
|
+
_this.onSavedItem();
|
|
841
|
+
return data;
|
|
842
|
+
}).catch(function (exception) {
|
|
843
|
+
_this.setStatusBarException(exception);
|
|
844
|
+
});
|
|
845
|
+
};
|
|
846
|
+
// #endregion
|
|
847
|
+
// #region deleteItem
|
|
848
|
+
BladeData.prototype.deleteItem = function (func, ngForm) {
|
|
849
|
+
var _this = this;
|
|
850
|
+
if (ngForm === void 0) { ngForm = undefined; }
|
|
851
|
+
this.setStatusBarDeleteData();
|
|
852
|
+
this.onDeleteItem();
|
|
853
|
+
// #region form valid?
|
|
854
|
+
// angularjs: if form valid
|
|
855
|
+
if (!this.formblade.$valid) {
|
|
856
|
+
this.statusBar = 'Löschen nicht möglich! [Console] enthält weitere Informationen.';
|
|
857
|
+
this.statusBarClass = 'apa-statusbar-error';
|
|
858
|
+
//console.log(this.formblade);
|
|
859
|
+
return;
|
|
860
|
+
}
|
|
861
|
+
// angular: if form valid
|
|
862
|
+
if (ngForm !== undefined) {
|
|
863
|
+
if (!ngForm.valid) {
|
|
864
|
+
return;
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
// #endregion
|
|
868
|
+
this.isCommandDeleteEnabled = false;
|
|
869
|
+
return func().then(function (data) {
|
|
870
|
+
_this.clearStatusBar();
|
|
871
|
+
_this.isCommandDeleteEnabled = true;
|
|
872
|
+
_this.item = data;
|
|
873
|
+
_this.onDeletedItem();
|
|
874
|
+
_this.close();
|
|
875
|
+
return data;
|
|
876
|
+
}).catch(function (exception) {
|
|
877
|
+
_this.isCommandDeleteEnabled = true;
|
|
878
|
+
_this.setStatusBarException(exception);
|
|
879
|
+
});
|
|
880
|
+
};
|
|
881
|
+
/** Extension point */
|
|
882
|
+
BladeData.prototype.onDeleteItem = function () {
|
|
883
|
+
};
|
|
884
|
+
/** Extension point */
|
|
885
|
+
BladeData.prototype.onDeletedItem = function () {
|
|
886
|
+
};
|
|
708
887
|
return BladeData;
|
|
709
888
|
}(angularportalazure.Blade));
|
|
710
889
|
angularportalazure.BladeData = BladeData;
|
|
@@ -726,7 +905,7 @@ var angularportalazure;
|
|
|
726
905
|
var _this = _super.call(this, $scope, portalService, path, title, subtitle, width) || this;
|
|
727
906
|
// #endregion
|
|
728
907
|
// #region Properties
|
|
729
|
-
_this.
|
|
908
|
+
_this.navItems = new Array();
|
|
730
909
|
_this.isNav = true;
|
|
731
910
|
_this.isInnerHtml = false;
|
|
732
911
|
return _this;
|
|
@@ -1202,173 +1381,6 @@ var angularportalazure;
|
|
|
1202
1381
|
}
|
|
1203
1382
|
// #endregion
|
|
1204
1383
|
// #region Methods
|
|
1205
|
-
// #region newItem
|
|
1206
|
-
BladeDetail.prototype.newItem = function (func) {
|
|
1207
|
-
//this.onLoadItem();
|
|
1208
|
-
var _this = this;
|
|
1209
|
-
func().then(function (data) {
|
|
1210
|
-
_this.isCommandDeleteEnabled = false;
|
|
1211
|
-
_this.item = data;
|
|
1212
|
-
//this.onLoadedItem();
|
|
1213
|
-
}).catch(function (ex) {
|
|
1214
|
-
_this.setStatusBarException(ex);
|
|
1215
|
-
});
|
|
1216
|
-
};
|
|
1217
|
-
// #endregion
|
|
1218
|
-
// #region loadItem
|
|
1219
|
-
BladeDetail.prototype.loadItem = function (func) {
|
|
1220
|
-
var _this = this;
|
|
1221
|
-
this.onLoadItem();
|
|
1222
|
-
func().then(function (data) {
|
|
1223
|
-
_this.item = data;
|
|
1224
|
-
_this.onLoadedItem();
|
|
1225
|
-
}).catch(function (ex) {
|
|
1226
|
-
_this.setStatusBarException(ex);
|
|
1227
|
-
});
|
|
1228
|
-
};
|
|
1229
|
-
// #endregion
|
|
1230
|
-
// #region saveItem
|
|
1231
|
-
/**
|
|
1232
|
-
* Default behavior for saving an entity.
|
|
1233
|
-
* - call this.setStatusBarSaveData();
|
|
1234
|
-
* - call this.onSaveItem()
|
|
1235
|
-
* - validates this.formblade. if not valid, returns without saving
|
|
1236
|
-
* - set this.isCommandSaveEnabled = false
|
|
1237
|
-
* - call the provided function
|
|
1238
|
-
* THEN
|
|
1239
|
-
* - call this.clearStatusBar()
|
|
1240
|
-
* - set this.isCommandSaveEnabled = true
|
|
1241
|
-
* - set this.item to the saved data
|
|
1242
|
-
* - call this.onSavedItem()
|
|
1243
|
-
* - returns the saved data
|
|
1244
|
-
* CATCH
|
|
1245
|
-
* - set this.isCommandSaveEnabled = true
|
|
1246
|
-
* - call this.setStatusBarException
|
|
1247
|
-
*/
|
|
1248
|
-
BladeDetail.prototype.saveItem = function (func, ngForm) {
|
|
1249
|
-
var _this = this;
|
|
1250
|
-
if (ngForm === void 0) { ngForm = undefined; }
|
|
1251
|
-
this.setStatusBarSaveData();
|
|
1252
|
-
this.onSaveItem();
|
|
1253
|
-
// #region form valid?
|
|
1254
|
-
// angularjs: if form valid
|
|
1255
|
-
if (!this.formblade.$valid) {
|
|
1256
|
-
this.statusBar = 'Speichern nicht möglich! [Console] enthält weitere Informationen.';
|
|
1257
|
-
this.statusBarClass = 'apa-statusbar-error';
|
|
1258
|
-
//console.log(this.formblade);
|
|
1259
|
-
return;
|
|
1260
|
-
}
|
|
1261
|
-
// angular: if form valid
|
|
1262
|
-
if (ngForm !== undefined) {
|
|
1263
|
-
if (!ngForm.valid) {
|
|
1264
|
-
return;
|
|
1265
|
-
}
|
|
1266
|
-
}
|
|
1267
|
-
// #endregion
|
|
1268
|
-
this.isCommandSaveEnabled = false;
|
|
1269
|
-
return func().then(function (data) {
|
|
1270
|
-
_this.clearStatusBar();
|
|
1271
|
-
_this.isCommandSaveEnabled = true;
|
|
1272
|
-
_this.isCommandDeleteEnabled = true;
|
|
1273
|
-
_this.item = data;
|
|
1274
|
-
_this.onSavedItem();
|
|
1275
|
-
return data;
|
|
1276
|
-
}).catch(function (exception) {
|
|
1277
|
-
_this.isCommandSaveEnabled = true;
|
|
1278
|
-
_this.setStatusBarException(exception);
|
|
1279
|
-
});
|
|
1280
|
-
};
|
|
1281
|
-
/** Extension point */
|
|
1282
|
-
BladeDetail.prototype.onSaveItem = function () {
|
|
1283
|
-
};
|
|
1284
|
-
/** Extension point */
|
|
1285
|
-
BladeDetail.prototype.onSavedItem = function () {
|
|
1286
|
-
};
|
|
1287
|
-
// #endregion
|
|
1288
|
-
// #region saveObject
|
|
1289
|
-
/**
|
|
1290
|
-
* Default behavior for saving any object.
|
|
1291
|
-
* - call this.setStatusBarSaveData();
|
|
1292
|
-
* - call this.onSaveItem()
|
|
1293
|
-
* - validates this.formblade. if not valid, returns without saving
|
|
1294
|
-
* - call the provided function
|
|
1295
|
-
* THEN
|
|
1296
|
-
* - call this.clearStatusBar()
|
|
1297
|
-
* - call this.onSavedItem()
|
|
1298
|
-
* - returns the saved data
|
|
1299
|
-
* CATCH
|
|
1300
|
-
* - call this.setStatusBarException
|
|
1301
|
-
*/
|
|
1302
|
-
BladeDetail.prototype.saveObject = function (func, ngForm) {
|
|
1303
|
-
var _this = this;
|
|
1304
|
-
if (ngForm === void 0) { ngForm = undefined; }
|
|
1305
|
-
this.setStatusBarSaveData();
|
|
1306
|
-
this.onSaveItem();
|
|
1307
|
-
// #region form valid?
|
|
1308
|
-
// angularjs: if form valid
|
|
1309
|
-
if (!this.formblade.$valid) {
|
|
1310
|
-
this.statusBar = 'Speichern nicht möglich! [Console] enthält weitere Informationen.';
|
|
1311
|
-
this.statusBarClass = 'apa-statusbar-error';
|
|
1312
|
-
//console.log(this.formblade);
|
|
1313
|
-
return;
|
|
1314
|
-
}
|
|
1315
|
-
// angular: if form valid
|
|
1316
|
-
if (ngForm !== undefined) {
|
|
1317
|
-
if (!ngForm.valid) {
|
|
1318
|
-
return;
|
|
1319
|
-
}
|
|
1320
|
-
}
|
|
1321
|
-
// #endregion
|
|
1322
|
-
return func().then(function (data) {
|
|
1323
|
-
_this.clearStatusBar();
|
|
1324
|
-
_this.onSavedItem();
|
|
1325
|
-
return data;
|
|
1326
|
-
}).catch(function (exception) {
|
|
1327
|
-
_this.setStatusBarException(exception);
|
|
1328
|
-
});
|
|
1329
|
-
};
|
|
1330
|
-
// #endregion
|
|
1331
|
-
// #region deleteItem
|
|
1332
|
-
BladeDetail.prototype.deleteItem = function (func, ngForm) {
|
|
1333
|
-
var _this = this;
|
|
1334
|
-
if (ngForm === void 0) { ngForm = undefined; }
|
|
1335
|
-
this.setStatusBarDeleteData();
|
|
1336
|
-
this.onDeleteItem();
|
|
1337
|
-
// #region form valid?
|
|
1338
|
-
// angularjs: if form valid
|
|
1339
|
-
if (!this.formblade.$valid) {
|
|
1340
|
-
this.statusBar = 'Löschen nicht möglich! [Console] enthält weitere Informationen.';
|
|
1341
|
-
this.statusBarClass = 'apa-statusbar-error';
|
|
1342
|
-
//console.log(this.formblade);
|
|
1343
|
-
return;
|
|
1344
|
-
}
|
|
1345
|
-
// angular: if form valid
|
|
1346
|
-
if (ngForm !== undefined) {
|
|
1347
|
-
if (!ngForm.valid) {
|
|
1348
|
-
return;
|
|
1349
|
-
}
|
|
1350
|
-
}
|
|
1351
|
-
// #endregion
|
|
1352
|
-
this.isCommandDeleteEnabled = false;
|
|
1353
|
-
return func().then(function (data) {
|
|
1354
|
-
_this.clearStatusBar();
|
|
1355
|
-
_this.isCommandDeleteEnabled = true;
|
|
1356
|
-
_this.item = data;
|
|
1357
|
-
_this.onDeletedItem();
|
|
1358
|
-
_this.close();
|
|
1359
|
-
return data;
|
|
1360
|
-
}).catch(function (exception) {
|
|
1361
|
-
_this.isCommandDeleteEnabled = true;
|
|
1362
|
-
_this.setStatusBarException(exception);
|
|
1363
|
-
});
|
|
1364
|
-
};
|
|
1365
|
-
/** Extension point */
|
|
1366
|
-
BladeDetail.prototype.onDeleteItem = function () {
|
|
1367
|
-
};
|
|
1368
|
-
/** Extension point */
|
|
1369
|
-
BladeDetail.prototype.onDeletedItem = function () {
|
|
1370
|
-
};
|
|
1371
|
-
// #endregion
|
|
1372
1384
|
BladeDetail.prototype.onCommandCancel = function () {
|
|
1373
1385
|
this.close();
|
|
1374
1386
|
};
|
|
@@ -1388,13 +1400,12 @@ var angularportalazure;
|
|
|
1388
1400
|
function BladeGrid($scope, portalService, path, title, subtitle, width) {
|
|
1389
1401
|
if (subtitle === void 0) { subtitle = ''; }
|
|
1390
1402
|
if (width === void 0) { width = 200; }
|
|
1391
|
-
|
|
1392
|
-
// #endregion
|
|
1393
|
-
// #region Properties
|
|
1394
|
-
_this.items = [];
|
|
1395
|
-
return _this;
|
|
1403
|
+
return _super.call(this, $scope, portalService, path, title, subtitle, width) || this;
|
|
1396
1404
|
}
|
|
1397
1405
|
// #endregion
|
|
1406
|
+
// #region Properties
|
|
1407
|
+
//items: T[] = [];
|
|
1408
|
+
// #endregion
|
|
1398
1409
|
// #region Methods
|
|
1399
1410
|
BladeGrid.prototype.loadItems = function (func) {
|
|
1400
1411
|
var _this = this;
|
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.313",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"typings": "apn.d.ts",
|
|
8
8
|
"dependencies": {
|