ps-toolkit-ui 0.0.6 → 0.0.10
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/bundles/ps-toolkit-ui.umd.js +15 -9
- package/bundles/ps-toolkit-ui.umd.js.map +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js.map +1 -1
- package/esm2015/lib/classes/helper.class.js +4 -1
- package/esm2015/lib/components/table/row/table.row.component.js +11 -5
- package/esm2015/lib/components/table/table.component.js +3 -5
- package/fesm2015/ps-toolkit-ui.js +15 -8
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/classes/helper.class.d.ts +1 -0
- package/lib/components/table/table.component.d.ts +1 -1
- package/package.json +1 -1
- package/ps-toolkit-ui.metadata.json +1 -1
|
@@ -982,6 +982,9 @@
|
|
|
982
982
|
var v = e.find(function (x) { return x.Value === dt; });
|
|
983
983
|
return "<span class=\"status " + v.Class + "\">" + l(v.Name) + '</span>';
|
|
984
984
|
};
|
|
985
|
+
HelperClass.getNow = function () {
|
|
986
|
+
return moment__namespace();
|
|
987
|
+
};
|
|
985
988
|
HelperClass.getDateRemain = function (l, dt) {
|
|
986
989
|
var d = parseInt(dt.substring(6, dt.length - 2), 10);
|
|
987
990
|
var now = moment.now();
|
|
@@ -2412,8 +2415,6 @@
|
|
|
2412
2415
|
_this.table.form.onSuccessBase = function () {
|
|
2413
2416
|
_this.table.modal.hide();
|
|
2414
2417
|
if (_this.table.childrenAutoLoad) {
|
|
2415
|
-
console.log(11111);
|
|
2416
|
-
console.log(_this.row.ParentId);
|
|
2417
2418
|
_this.loadParent.emit(_this.row.ParentId);
|
|
2418
2419
|
}
|
|
2419
2420
|
else {
|
|
@@ -2444,7 +2445,14 @@
|
|
|
2444
2445
|
_this.changeRows.emit(_this.row);
|
|
2445
2446
|
}
|
|
2446
2447
|
else {
|
|
2447
|
-
_this.confirmShow.emit(_this.row.Id)
|
|
2448
|
+
_this.confirmShow.emit({ id: _this.row.Id, accept: function () {
|
|
2449
|
+
if (_this.table.hasChildren && _this.table.childrenAutoLoad && _this.row.ParentId != null) {
|
|
2450
|
+
_this.loadParent.emit(_this.row.ParentId);
|
|
2451
|
+
}
|
|
2452
|
+
else {
|
|
2453
|
+
_this.table.load();
|
|
2454
|
+
}
|
|
2455
|
+
} });
|
|
2448
2456
|
}
|
|
2449
2457
|
};
|
|
2450
2458
|
if (this.table.sortable) {
|
|
@@ -2495,7 +2503,8 @@
|
|
|
2495
2503
|
TableRowComponent.prototype.getOptions = function () {
|
|
2496
2504
|
var _this = this;
|
|
2497
2505
|
return (this.addChildren !== null && (this.table.level === null || this.table.level > this.level) ? [this.addChildren] : [])
|
|
2498
|
-
.concat(this.table.options.filter(function (x) { return x.condition == null ||
|
|
2506
|
+
.concat(this.table.options.filter(function (x) { return x.condition == null ||
|
|
2507
|
+
(x.condition.startsWith('!') ? !_this.row[x.condition.substring(1)] : _this.row[x.condition]); }).map(function (o) {
|
|
2499
2508
|
var i = HelperClass.clone(o);
|
|
2500
2509
|
if (i.url) {
|
|
2501
2510
|
i.url = i.url.replace('{}', _this.row.Id);
|
|
@@ -2784,11 +2793,8 @@
|
|
|
2784
2793
|
TableComponent.prototype.onChangeRows = function (e) {
|
|
2785
2794
|
return this.changeRows.emit(e);
|
|
2786
2795
|
};
|
|
2787
|
-
TableComponent.prototype.onConfirmShow = function (
|
|
2788
|
-
|
|
2789
|
-
this.confirm.show(this.table.l('DeleteMessage'), this.table.url + 'Delete/' + rowId, null, function () {
|
|
2790
|
-
_this.table.load(null);
|
|
2791
|
-
});
|
|
2796
|
+
TableComponent.prototype.onConfirmShow = function (e) {
|
|
2797
|
+
this.confirm.show(this.table.l('DeleteMessage'), this.table.url + 'Delete/' + e.id, null, e.accept);
|
|
2792
2798
|
};
|
|
2793
2799
|
TableComponent.prototype.changeSort = function (e, s) {
|
|
2794
2800
|
if ($__namespace(e.target).closest('.header-search').hasClass('header-search')) {
|