@azrico/webobject 1.4.92 → 1.4.94
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.
|
@@ -509,7 +509,7 @@ var WebObject = /*#__PURE__*/function (_SimpleObject, _setMetaValue, _Save, _Del
|
|
|
509
509
|
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
510
510
|
while (1) switch (_context9.prev = _context9.next) {
|
|
511
511
|
case 0:
|
|
512
|
-
this.isDeleted = true;
|
|
512
|
+
if (this.isSaved) this.isDeleted = true;
|
|
513
513
|
for (_len = _args9.length, p = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
514
514
|
p[_key] = _args9[_key];
|
|
515
515
|
}
|
|
@@ -109,29 +109,31 @@ var WebObjectManager = /*#__PURE__*/function (_ObjectManager, _setMetaValue, _ge
|
|
|
109
109
|
}, _callee2);
|
|
110
110
|
})));
|
|
111
111
|
_this.event_add("on_delete", "on_delete-sendmsg", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
112
|
+
var srType;
|
|
112
113
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
113
114
|
while (1) switch (_context3.prev = _context3.next) {
|
|
114
115
|
case 0:
|
|
115
|
-
|
|
116
|
-
_context3.
|
|
116
|
+
srType = _this.getSaveResultType();
|
|
117
|
+
_context3.t0 = srType;
|
|
118
|
+
_context3.next = _context3.t0 === "normal" ? 4 : 7;
|
|
117
119
|
break;
|
|
118
|
-
case
|
|
119
|
-
_context3.next =
|
|
120
|
+
case 4:
|
|
121
|
+
_context3.next = 6;
|
|
120
122
|
return _global.gfunc.run_action("show_message", {
|
|
121
123
|
message: "Deleted",
|
|
122
124
|
type: "success"
|
|
123
125
|
});
|
|
124
|
-
case 5:
|
|
125
|
-
return _context3.abrupt("return", _context3.sent);
|
|
126
126
|
case 6:
|
|
127
|
-
_context3.
|
|
127
|
+
return _context3.abrupt("return", _context3.sent);
|
|
128
|
+
case 7:
|
|
129
|
+
_context3.next = 9;
|
|
128
130
|
return _global.gfunc.run_action("show_message", {
|
|
129
|
-
message: "Not deleted",
|
|
131
|
+
message: "Not deleted (".concat(srType, ")"),
|
|
130
132
|
type: "error"
|
|
131
133
|
});
|
|
132
|
-
case 8:
|
|
133
|
-
return _context3.abrupt("return", _context3.sent);
|
|
134
134
|
case 9:
|
|
135
|
+
return _context3.abrupt("return", _context3.sent);
|
|
136
|
+
case 10:
|
|
135
137
|
case "end":
|
|
136
138
|
return _context3.stop();
|
|
137
139
|
}
|
|
@@ -331,17 +333,14 @@ var WebObjectManager = /*#__PURE__*/function (_ObjectManager, _setMetaValue, _ge
|
|
|
331
333
|
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
332
334
|
while (1) switch (_context9.prev = _context9.next) {
|
|
333
335
|
case 0:
|
|
334
|
-
|
|
335
|
-
this.obj.isDeleted = true;
|
|
336
|
-
}
|
|
337
|
-
_context9.next = 3;
|
|
336
|
+
_context9.next = 2;
|
|
338
337
|
return this.event_run("on_delete");
|
|
339
|
-
case
|
|
340
|
-
_context9.next =
|
|
338
|
+
case 2:
|
|
339
|
+
_context9.next = 4;
|
|
341
340
|
return this.event_run("on_after_delete");
|
|
342
|
-
case
|
|
341
|
+
case 4:
|
|
343
342
|
return _context9.abrupt("return", true);
|
|
344
|
-
case
|
|
343
|
+
case 5:
|
|
345
344
|
case "end":
|
|
346
345
|
return _context9.stop();
|
|
347
346
|
}
|
|
@@ -355,17 +354,14 @@ var WebObjectManager = /*#__PURE__*/function (_ObjectManager, _setMetaValue, _ge
|
|
|
355
354
|
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
356
355
|
while (1) switch (_context10.prev = _context10.next) {
|
|
357
356
|
case 0:
|
|
358
|
-
|
|
359
|
-
this.obj.isArchived = true;
|
|
360
|
-
}
|
|
361
|
-
_context10.next = 3;
|
|
357
|
+
_context10.next = 2;
|
|
362
358
|
return this.event_run("on_archive");
|
|
363
|
-
case
|
|
364
|
-
_context10.next =
|
|
359
|
+
case 2:
|
|
360
|
+
_context10.next = 4;
|
|
365
361
|
return this.event_run("on_after_archive");
|
|
366
|
-
case
|
|
362
|
+
case 4:
|
|
367
363
|
return _context10.abrupt("return", true);
|
|
368
|
-
case
|
|
364
|
+
case 5:
|
|
369
365
|
case "end":
|
|
370
366
|
return _context10.stop();
|
|
371
367
|
}
|
|
@@ -379,17 +375,14 @@ var WebObjectManager = /*#__PURE__*/function (_ObjectManager, _setMetaValue, _ge
|
|
|
379
375
|
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
380
376
|
while (1) switch (_context11.prev = _context11.next) {
|
|
381
377
|
case 0:
|
|
382
|
-
|
|
383
|
-
this.obj.isArchived = false;
|
|
384
|
-
}
|
|
385
|
-
_context11.next = 3;
|
|
378
|
+
_context11.next = 2;
|
|
386
379
|
return this.event_run("on_unarchive");
|
|
387
|
-
case
|
|
388
|
-
_context11.next =
|
|
380
|
+
case 2:
|
|
381
|
+
_context11.next = 4;
|
|
389
382
|
return this.event_run("on_after_unarchive");
|
|
390
|
-
case
|
|
383
|
+
case 4:
|
|
391
384
|
return _context11.abrupt("return", true);
|
|
392
|
-
case
|
|
385
|
+
case 5:
|
|
393
386
|
case "end":
|
|
394
387
|
return _context11.stop();
|
|
395
388
|
}
|