@sapui5/sap.fe.core 1.96.16 → 1.96.18
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/package.json
CHANGED
package/src/sap/fe/core/.library
CHANGED
|
@@ -341,42 +341,44 @@ sap.ui.define(
|
|
|
341
341
|
var oModel = oContext.getModel(),
|
|
342
342
|
oResourceBundle,
|
|
343
343
|
draftDataContext = oModel.bindContext(oContext.getPath() + "/DraftAdministrativeData").getBoundContext();
|
|
344
|
-
|
|
345
|
-
.
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
return
|
|
376
|
-
|
|
344
|
+
if (mParameters && mParameters.oView) {
|
|
345
|
+
return mParameters.oView
|
|
346
|
+
.getModel("sap.fe.i18n")
|
|
347
|
+
.getResourceBundle()
|
|
348
|
+
.then(function(_oResourceBundle) {
|
|
349
|
+
oResourceBundle = _oResourceBundle;
|
|
350
|
+
return draftDataContext.requestObject();
|
|
351
|
+
})
|
|
352
|
+
.then(function(draftAdminData) {
|
|
353
|
+
if (draftAdminData) {
|
|
354
|
+
// remove all unbound transition messages as we show a special dialog
|
|
355
|
+
messageHandling.removeUnboundTransitionMessages();
|
|
356
|
+
var sInfo = draftAdminData.InProcessByUserDescription || draftAdminData.InProcessByUser;
|
|
357
|
+
var sEntitySet = mParameters.oView.getViewData().entitySet;
|
|
358
|
+
if (sInfo) {
|
|
359
|
+
var sLockedByUserMsg = CommonUtils.getTranslatedText(
|
|
360
|
+
"C_DRAFT_OBJECT_PAGE_DRAFT_LOCKED_BY_USER",
|
|
361
|
+
oResourceBundle,
|
|
362
|
+
sInfo,
|
|
363
|
+
sEntitySet
|
|
364
|
+
);
|
|
365
|
+
MessageBox.error(sLockedByUserMsg);
|
|
366
|
+
throw new Error(sLockedByUserMsg);
|
|
367
|
+
} else {
|
|
368
|
+
sInfo = draftAdminData.CreatedByUserDescription || draftAdminData.CreatedByUser;
|
|
369
|
+
var sUnsavedChangesMsg = CommonUtils.getTranslatedText(
|
|
370
|
+
"C_DRAFT_OBJECT_PAGE_DRAFT_UNSAVED_CHANGES",
|
|
371
|
+
oResourceBundle,
|
|
372
|
+
sInfo,
|
|
373
|
+
sEntitySet
|
|
374
|
+
);
|
|
375
|
+
return showMessageBox(sUnsavedChangesMsg).then(function() {
|
|
376
|
+
return executeDraftEditAction(oContext, false);
|
|
377
|
+
});
|
|
378
|
+
}
|
|
377
379
|
}
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
+
});
|
|
381
|
+
}
|
|
380
382
|
}
|
|
381
383
|
return Promise.reject(new Error("Draft creation aborted for document: " + oContext.getPath()));
|
|
382
384
|
}
|
|
@@ -426,9 +428,11 @@ sap.ui.define(
|
|
|
426
428
|
if (!bExecute) {
|
|
427
429
|
throw new Error("Draft creation was aborted by extension for document: " + oContext.getPath());
|
|
428
430
|
}
|
|
429
|
-
return executeDraftEditAction(oContext, bRunPreserveChangesFlow).catch(function(oResponse) {
|
|
431
|
+
return draft.executeDraftEditAction(oContext, bRunPreserveChangesFlow).catch(function(oResponse) {
|
|
430
432
|
//Only call back if error 409
|
|
431
433
|
if (bRunPreserveChangesFlow && oResponse.status === 409) {
|
|
434
|
+
messageHandling.removeBoundTransitionMessages();
|
|
435
|
+
messageHandling.removeUnboundTransitionMessages();
|
|
432
436
|
return Promise.resolve(
|
|
433
437
|
mParam.fnWhenDecisionToOverwriteDocumentIsRequired
|
|
434
438
|
? mParam.fnWhenDecisionToOverwriteDocumentIsRequired()
|
|
@@ -575,7 +579,8 @@ sap.ui.define(
|
|
|
575
579
|
var draft = {
|
|
576
580
|
createDraftFromActiveDocument: createDraftFromActiveDocument,
|
|
577
581
|
activateDocument: activateDocument,
|
|
578
|
-
deleteDraft: deleteDraft
|
|
582
|
+
deleteDraft: deleteDraft,
|
|
583
|
+
executeDraftEditAction: executeDraftEditAction
|
|
579
584
|
};
|
|
580
585
|
|
|
581
586
|
return draft;
|
|
@@ -140,7 +140,7 @@ C_COMMON_SAPFE_DATA_RECEIVED_ERROR=Nie mo\u017Cna wczyta\u0107 danych.
|
|
|
140
140
|
|
|
141
141
|
C_COMMON_APPLY_ERROR=Wyst\u0105pi\u0142 b\u0142\u0105d podczas wysy\u0142ania zmian. Przejd\u017A wstecz, aby odrzuci\u0107 zmiany, lub spr\u00F3buj wys\u0142a\u0107 je ponownie.
|
|
142
142
|
|
|
143
|
-
C_COMMON_OBJECT_PAGE_DELETE=
|
|
143
|
+
C_COMMON_OBJECT_PAGE_DELETE=Usu\u0144
|
|
144
144
|
|
|
145
145
|
C_TRANSACTION_HELPER_OBJECT_PAGE_CONFIRM_DELETE_WITH_OBJECTINFO=Usun\u0105\u0107 ten obiekt ({1} {0})?
|
|
146
146
|
|