@sapui5/sap.fe.templates 1.96.5 → 1.96.8
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
|
@@ -52,6 +52,14 @@ sap.ui.define(
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
function getShareUrl() {
|
|
55
|
+
var sShareUrl;
|
|
56
|
+
var sHash = HashChanger.getInstance().getHash();
|
|
57
|
+
var sBasePath = HashChanger.getInstance().hrefForAppSpecificHash ? HashChanger.getInstance().hrefForAppSpecificHash("") : "";
|
|
58
|
+
sShareUrl = sHash ? sBasePath + sHash : window.location.hash;
|
|
59
|
+
return sShareUrl;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function getShareEmailUrl() {
|
|
55
63
|
var oUShellContainer = sap.ushell && sap.ushell.Container;
|
|
56
64
|
if (oUShellContainer) {
|
|
57
65
|
return oUShellContainer
|
|
@@ -128,8 +136,15 @@ sap.ui.define(
|
|
|
128
136
|
Log.error(error);
|
|
129
137
|
});
|
|
130
138
|
|
|
131
|
-
|
|
132
|
-
|
|
139
|
+
Promise.resolve(getShareUrl())
|
|
140
|
+
.then(function(sUrl) {
|
|
141
|
+
oShareMetadata.url = sUrl;
|
|
142
|
+
})
|
|
143
|
+
.catch(function(error) {
|
|
144
|
+
Log.error(error);
|
|
145
|
+
});
|
|
146
|
+
return Promise.resolve(getShareEmailUrl()).then(function(sFLPUrl) {
|
|
147
|
+
oShareMetadata.email.url = sFLPUrl;
|
|
133
148
|
return oShareMetadata;
|
|
134
149
|
});
|
|
135
150
|
}
|
|
@@ -238,7 +238,18 @@ sap.ui.define(
|
|
|
238
238
|
// * @protected
|
|
239
239
|
// * @static
|
|
240
240
|
// */
|
|
241
|
-
function getShareUrl() {
|
|
241
|
+
function getShareUrl(sEditMode, bIsStickySupported, aActiveContextPaths) {
|
|
242
|
+
var sShareUrl;
|
|
243
|
+
var sHash = HashChanger.getInstance().getHash();
|
|
244
|
+
var sBasePath = HashChanger.getInstance().hrefForAppSpecificHash ? HashChanger.getInstance().hrefForAppSpecificHash("") : "";
|
|
245
|
+
if (sEditMode === "Editable" && !bIsStickySupported && aActiveContextPaths) {
|
|
246
|
+
sShareUrl = sBasePath + aActiveContextPaths.join("/");
|
|
247
|
+
} else {
|
|
248
|
+
sShareUrl = sHash ? sBasePath + sHash : window.location.hash;
|
|
249
|
+
}
|
|
250
|
+
return sShareUrl;
|
|
251
|
+
}
|
|
252
|
+
function getShareEmailUrl() {
|
|
242
253
|
var oUShellContainer = sap.ushell && sap.ushell.Container;
|
|
243
254
|
if (oUShellContainer) {
|
|
244
255
|
return oUShellContainer
|
|
@@ -294,6 +305,7 @@ sap.ui.define(
|
|
|
294
305
|
._getPageTitleInformation()
|
|
295
306
|
);
|
|
296
307
|
aPromises.push(getJamUrl(sEditMode, bIsStickySupported, aActiveContextPaths));
|
|
308
|
+
aPromises.push(getShareEmailUrl());
|
|
297
309
|
Promise.all(aPromises)
|
|
298
310
|
.then(function(oData) {
|
|
299
311
|
var oPageTitleInfo = oData[0];
|
|
@@ -310,6 +322,7 @@ sap.ui.define(
|
|
|
310
322
|
oShareMetadata.email.title = sTitle;
|
|
311
323
|
oShareMetadata.title = sTitle;
|
|
312
324
|
oShareMetadata.jam.url = sJamUrl;
|
|
325
|
+
oShareMetadata.email.url = oData[2];
|
|
313
326
|
})
|
|
314
327
|
.catch(function(error) {
|
|
315
328
|
Log.error(error);
|