@openui5/sap.ui.documentation 1.105.1 → 1.107.0
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/.reuse/dep5 +20 -17
- package/THIRDPARTY.txt +31 -21
- package/package.json +6 -6
- package/src/sap/ui/documentation/.library +1 -6
- package/src/sap/ui/documentation/DemokitTreeItem.js +4 -2
- package/src/sap/ui/documentation/library.js +2 -2
- package/src/sap/ui/documentation/messagebundle.properties +23 -0
- package/src/sap/ui/documentation/messagebundle_ar.properties +12 -1
- package/src/sap/ui/documentation/messagebundle_bg.properties +12 -1
- package/src/sap/ui/documentation/messagebundle_ca.properties +12 -1
- package/src/sap/ui/documentation/messagebundle_cs.properties +12 -1
- package/src/sap/ui/documentation/messagebundle_cy.properties +12 -1
- package/src/sap/ui/documentation/messagebundle_da.properties +12 -1
- package/src/sap/ui/documentation/messagebundle_de.properties +12 -1
- package/src/sap/ui/documentation/messagebundle_el.properties +12 -1
- package/src/sap/ui/documentation/messagebundle_en.properties +12 -1
- package/src/sap/ui/documentation/messagebundle_en_GB.properties +12 -1
- package/src/sap/ui/documentation/messagebundle_en_US_sappsd.properties +12 -1
- package/src/sap/ui/documentation/messagebundle_en_US_saprigi.properties +12 -1
- package/src/sap/ui/documentation/messagebundle_en_US_saptrc.properties +12 -1
- package/src/sap/ui/documentation/messagebundle_es.properties +12 -1
- package/src/sap/ui/documentation/messagebundle_es_MX.properties +12 -1
- package/src/sap/ui/documentation/messagebundle_et.properties +12 -1
- package/src/sap/ui/documentation/messagebundle_fi.properties +12 -1
- package/src/sap/ui/documentation/messagebundle_fr.properties +12 -1
- package/src/sap/ui/documentation/messagebundle_fr_CA.properties +14 -3
- package/src/sap/ui/documentation/messagebundle_hi.properties +12 -1
- package/src/sap/ui/documentation/messagebundle_hr.properties +12 -1
- package/src/sap/ui/documentation/messagebundle_hu.properties +12 -1
- package/src/sap/ui/documentation/messagebundle_id.properties +12 -1
- package/src/sap/ui/documentation/messagebundle_it.properties +12 -1
- package/src/sap/ui/documentation/messagebundle_iw.properties +12 -1
- package/src/sap/ui/documentation/messagebundle_ja.properties +12 -1
- package/src/sap/ui/documentation/messagebundle_kk.properties +12 -1
- package/src/sap/ui/documentation/messagebundle_ko.properties +12 -1
- package/src/sap/ui/documentation/messagebundle_lt.properties +12 -1
- package/src/sap/ui/documentation/messagebundle_lv.properties +12 -1
- package/src/sap/ui/documentation/messagebundle_ms.properties +12 -1
- package/src/sap/ui/documentation/messagebundle_nl.properties +12 -1
- package/src/sap/ui/documentation/messagebundle_no.properties +13 -2
- package/src/sap/ui/documentation/messagebundle_pl.properties +12 -1
- package/src/sap/ui/documentation/messagebundle_pt.properties +12 -1
- package/src/sap/ui/documentation/messagebundle_pt_PT.properties +12 -1
- package/src/sap/ui/documentation/messagebundle_ro.properties +12 -1
- package/src/sap/ui/documentation/messagebundle_ru.properties +12 -1
- package/src/sap/ui/documentation/messagebundle_sh.properties +12 -1
- package/src/sap/ui/documentation/messagebundle_sk.properties +12 -1
- package/src/sap/ui/documentation/messagebundle_sl.properties +12 -1
- package/src/sap/ui/documentation/messagebundle_sv.properties +12 -1
- package/src/sap/ui/documentation/messagebundle_th.properties +12 -1
- package/src/sap/ui/documentation/messagebundle_tr.properties +12 -1
- package/src/sap/ui/documentation/messagebundle_uk.properties +12 -1
- package/src/sap/ui/documentation/messagebundle_vi.properties +12 -1
- package/src/sap/ui/documentation/messagebundle_zh_CN.properties +12 -1
- package/src/sap/ui/documentation/messagebundle_zh_TW.properties +12 -1
- package/src/sap/ui/documentation/sdk/Component.js +4 -0
- package/src/sap/ui/documentation/sdk/controller/App.controller.js +141 -14
- package/src/sap/ui/documentation/sdk/controller/BPSupport.controller.js +75 -0
- package/src/sap/ui/documentation/sdk/controller/LiveEditor.controller.js +14 -3
- package/src/sap/ui/documentation/sdk/controller/Sample.controller.js +85 -59
- package/src/sap/ui/documentation/sdk/controller/SampleBaseController.js +1 -1
- package/src/sap/ui/documentation/sdk/controller/TopicDetail.controller.js +6 -6
- package/src/sap/ui/documentation/sdk/controller/util/ConfigUtil.js +22 -2
- package/src/sap/ui/documentation/sdk/controller/util/ControlsInfo.js +3 -0
- package/src/sap/ui/documentation/sdk/controller/util/NewsInfo.js +1 -17
- package/src/sap/ui/documentation/sdk/controller/util/XML2JSONUtils.js +7 -1
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_ar.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_bg.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_ca.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_cs.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_cy.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_da.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_de.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_el.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_en.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_en_GB.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_en_US_sappsd.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_en_US_saprigi.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_en_US_saptrc.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_es.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_es_MX.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_et.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_fi.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_fr.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_fr_CA.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_hi.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_hr.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_hu.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_id.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_it.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_iw.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_ja.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_kk.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_ko.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_lt.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_lv.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_ms.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_nl.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_no.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_pl.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_pt.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_pt_PT.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_ro.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_ru.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_sh.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_sk.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_sl.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_sv.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_th.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_tr.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_uk.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_vi.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_zh_CN.properties +0 -4
- package/src/sap/ui/documentation/sdk/cookieSettingsDialog/i18n/i18n_zh_TW.properties +0 -4
- package/src/sap/ui/documentation/sdk/css/style.css +37 -3
- package/src/sap/ui/documentation/sdk/index.html +1 -264
- package/src/sap/ui/documentation/sdk/index.js +245 -0
- package/src/sap/ui/documentation/sdk/manifest.json +14 -1
- package/src/sap/ui/documentation/sdk/model/LiveEditorData.json +1 -1
- package/src/sap/ui/documentation/sdk/model/libraryData.js +4 -3
- package/src/sap/ui/documentation/sdk/tmpl/index.html.tmpl +1 -1
- package/src/sap/ui/documentation/sdk/tmpl/indexevo.html.tmpl +1 -1
- package/src/sap/ui/documentation/sdk/util/LiveEditorOutput.js +10 -1
- package/src/sap/ui/documentation/sdk/util/Resources.js +1 -1
- package/src/sap/ui/documentation/sdk/util/liveEditorOutput.html +1 -1
- package/src/sap/ui/documentation/sdk/view/App.view.xml +12 -1
- package/src/sap/ui/documentation/sdk/view/BPSupport.view.xml +7 -0
- package/src/sap/ui/documentation/sdk/view/SurveyPopover.fragment.xml +56 -0
- package/src/sap/ui/documentation/sdk/view/Tools.view.xml +4 -16
- package/src/sap/ui/documentation/sdk/view/TopicDetail.view.xml +1 -1
- package/src/sap/ui/documentation/sdk/view/Welcome.view.xml +5 -5
- package/src/sap/ui/documentation/themes/base/Documentation.less +5 -0
- package/src/sap/ui/documentation/themes/sap_horizon/library.source.less +1 -2
- package/src/sap/ui/documentation/themes/sap_horizon_dark/library.source.less +1 -2
- package/src/sap/ui/documentation/themes/sap_horizon/SplitButton.less +0 -5
- package/src/sap/ui/documentation/themes/sap_horizon_dark/SplitButton.less +0 -5
|
@@ -66,6 +66,9 @@ sap.ui.define([
|
|
|
66
66
|
// shortcut for sap.m.SplitAppMode
|
|
67
67
|
var SplitAppMode = mobileLibrary.SplitAppMode;
|
|
68
68
|
|
|
69
|
+
// Shortcut for sap.m.URLHelper
|
|
70
|
+
var URLHelper = mobileLibrary.URLHelper;
|
|
71
|
+
|
|
69
72
|
var MAIN_WEB_PAGE_TITLE = "Demo Kit - \uFFFD SDK",
|
|
70
73
|
WEB_PAGE_TITLE = {
|
|
71
74
|
topic: "Documentation - " + MAIN_WEB_PAGE_TITLE,
|
|
@@ -152,15 +155,16 @@ sap.ui.define([
|
|
|
152
155
|
bHideTopicSection: !!window['sap-ui-documentation-hideTopicSection'],
|
|
153
156
|
bHideApiSection: !!window['sap-ui-documentation-hideApiSection'],
|
|
154
157
|
sAboutInfoSAPUI5: "Looking for the Demo Kit for a specific SAPUI5 version? " +
|
|
155
|
-
"Check at <a href = 'https://
|
|
158
|
+
"Check at <a href = 'https://ui5.sap.com/versionoverview.html'>https://ui5.sap.com/versionoverview.html</a> " +
|
|
156
159
|
"which versions are available. " +
|
|
157
160
|
"You can view the version-specific Demo Kit by adding the version number to the URL, e.g. " +
|
|
158
|
-
"<a href='https://
|
|
161
|
+
"<a href='https://ui5.sap.com/1.71.46/'>https://ui5.sap.com/1.71.46/</a>",
|
|
159
162
|
sAboutInfoOpenUI5: "Looking for the Demo Kit for a specific OpenUI5 version? " +
|
|
160
|
-
"Check at <a href = 'https://openui5.
|
|
163
|
+
"Check at <a href = 'https://sdk.openui5.org/versionoverview.html'>https://sdk.openui5.org/versionoverview.html</a> " +
|
|
161
164
|
"which versions are available. " +
|
|
162
165
|
"You can view the version-specific Demo Kit by adding the version number to the URL, e.g. " +
|
|
163
|
-
"<a href='https://openui5.
|
|
166
|
+
"<a href='https://sdk.openui5.org/1.71.46/'>https://sdk.openui5.org/1.71.46/</a>",
|
|
167
|
+
bUseFeedbackDialog: false // enable to restore previous feedback dialog and hide the Qualtrics surveys
|
|
164
168
|
});
|
|
165
169
|
|
|
166
170
|
var oComponent = this.getOwnerComponent();
|
|
@@ -270,6 +274,7 @@ sap.ui.define([
|
|
|
270
274
|
oCookieMgmtComponent.enable(oComponent.getRootControl());
|
|
271
275
|
});
|
|
272
276
|
|
|
277
|
+
this.setSurveyModelData();
|
|
273
278
|
},
|
|
274
279
|
|
|
275
280
|
_updateMessagesModel: function(oMessagesData) {
|
|
@@ -457,12 +462,17 @@ sap.ui.define([
|
|
|
457
462
|
|
|
458
463
|
handleMenuItemClick: function (oEvent) {
|
|
459
464
|
var sTargetText = oEvent.getParameter("item").getKey(),
|
|
460
|
-
sTarget = this.MENU_LINKS_MAP[sTargetText]
|
|
465
|
+
sTarget = this.MENU_LINKS_MAP[sTargetText],
|
|
466
|
+
bUseFeedbackDialog = this.getModel("appView").getProperty("/bUseFeedbackDialog");
|
|
461
467
|
|
|
462
468
|
if (sTargetText === ABOUT_TEXT) {
|
|
463
469
|
this.aboutDialogOpen();
|
|
464
470
|
} else if (sTargetText === FEEDBACK_TEXT) {
|
|
465
|
-
|
|
471
|
+
if (!bUseFeedbackDialog) {
|
|
472
|
+
this.launchSurvey(oEvent, true);
|
|
473
|
+
} else {
|
|
474
|
+
this.feedbackDialogOpen();
|
|
475
|
+
}
|
|
466
476
|
} else if (sTargetText === CHANGE_SETTINGS_TEXT) {
|
|
467
477
|
this.settingsDialogOpen();
|
|
468
478
|
} else if (sTargetText === CHANGE_COOKIE_PREFERENCES_TEXT) {
|
|
@@ -602,6 +612,16 @@ sap.ui.define([
|
|
|
602
612
|
return dialog;
|
|
603
613
|
},
|
|
604
614
|
|
|
615
|
+
openSearchPicker: function() {
|
|
616
|
+
if (!this.oPicker) {
|
|
617
|
+
this.oPicker = this.createSearchPicker();
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
if (!this.oPicker.isOpen()) {
|
|
621
|
+
this.oPicker.open();
|
|
622
|
+
}
|
|
623
|
+
},
|
|
624
|
+
|
|
605
625
|
createSearchPickerContent: function() {
|
|
606
626
|
return Fragment.load({
|
|
607
627
|
name: "sap.ui.documentation.sdk.view.GlobalSearchPicker",
|
|
@@ -1267,6 +1287,115 @@ sap.ui.define([
|
|
|
1267
1287
|
}
|
|
1268
1288
|
},
|
|
1269
1289
|
|
|
1290
|
+
/**
|
|
1291
|
+
* Opens the Qualtrics UX survey when the feedback button gets pressed.
|
|
1292
|
+
* There are two available surveys - a short one (all year round), and quarterly survey.
|
|
1293
|
+
*
|
|
1294
|
+
* Depending on the number of available surveys:
|
|
1295
|
+
* - Directly opens the short survey in a new tab.
|
|
1296
|
+
* - If a long, quarterly survey is available, opens a popover with links for both.
|
|
1297
|
+
*
|
|
1298
|
+
* @param {sap.ui.base.Event} oEvent The feedback/menu button's press event
|
|
1299
|
+
* @param {boolean} bMenu Whether the pressed button is hidden in the 'About' menu
|
|
1300
|
+
*/
|
|
1301
|
+
launchSurvey: function (oEvent, bMenu) {
|
|
1302
|
+
var oTarget = this.byId(!bMenu ? "surveyButton" : "aboutMenuButton"),
|
|
1303
|
+
oView = this.getView(),
|
|
1304
|
+
oViewModel = this.getModel("appView"),
|
|
1305
|
+
bShowLongSurvey = oViewModel.getProperty("/bShowLongSurvey");
|
|
1306
|
+
|
|
1307
|
+
if (!bShowLongSurvey) {
|
|
1308
|
+
this.shortSurveyRedirect();
|
|
1309
|
+
} else if (!this._oSurveyPopover) {
|
|
1310
|
+
Fragment.load({
|
|
1311
|
+
name: "sap.ui.documentation.sdk.view.SurveyPopover",
|
|
1312
|
+
controller: this
|
|
1313
|
+
}).then(function (oPopover) {
|
|
1314
|
+
oView.addDependent(oPopover);
|
|
1315
|
+
this._oSurveyPopover = oPopover;
|
|
1316
|
+
|
|
1317
|
+
if (Device.system.phone) {
|
|
1318
|
+
this.addSurveyPopoverCloseBtn();
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
this._oSurveyPopover.openBy(oTarget);
|
|
1322
|
+
}.bind(this));
|
|
1323
|
+
} else {
|
|
1324
|
+
this._oSurveyPopover.openBy(oTarget);
|
|
1325
|
+
}
|
|
1326
|
+
},
|
|
1327
|
+
|
|
1328
|
+
/**
|
|
1329
|
+
* Closes the survey popover on mobile.
|
|
1330
|
+
* @param {sap.ui.base.Event} oEvent The close button's press event
|
|
1331
|
+
*/
|
|
1332
|
+
closeSurveyPopover: function (oEvent) {
|
|
1333
|
+
this._oSurveyPopover.close();
|
|
1334
|
+
},
|
|
1335
|
+
|
|
1336
|
+
shortSurveyRedirect: function () {
|
|
1337
|
+
var sQueryParams = "?product=SAPUI5&product_filter=UI5&cluster=BTP",
|
|
1338
|
+
sProdURL = "https://sapinsights.eu.qualtrics.com/jfe/form/SV_2gcfdw3EYYOIz5A" + sQueryParams,
|
|
1339
|
+
sDevURL = "https://sapinsights.eu.qualtrics.com/jfe/form/SV_d3UPNymSgUHAb9Y" + sQueryParams,
|
|
1340
|
+
bProd = !this.getModel("versionData").getProperty("/isDevEnv");
|
|
1341
|
+
|
|
1342
|
+
// This survey could be displayed in a Qualtrics intercept
|
|
1343
|
+
// dialog in the future, instead of a new tab
|
|
1344
|
+
URLHelper.redirect(bProd ? sProdURL : sDevURL, true);
|
|
1345
|
+
},
|
|
1346
|
+
|
|
1347
|
+
longSurveyRedirect: function () {
|
|
1348
|
+
var sBaseURL = "https://sapinsights.eu.qualtrics.com/jfe/form/SV_7X5P63Zg5zXC5zE",
|
|
1349
|
+
sBaseQueryParams = "?product=SAPUI5&product_filter=UI5&cluster=BTP",
|
|
1350
|
+
sProdURL = sBaseURL + sBaseQueryParams,
|
|
1351
|
+
sDevURL = sBaseURL + sBaseQueryParams + "&Q_CHL=preview&Q_SurveyVersionID=current",
|
|
1352
|
+
bProd = !this.getModel("versionData").getProperty("/isDevEnv");
|
|
1353
|
+
|
|
1354
|
+
URLHelper.redirect(bProd ? sProdURL : sDevURL, true);
|
|
1355
|
+
},
|
|
1356
|
+
|
|
1357
|
+
setSurveyModelData: function () {
|
|
1358
|
+
var oViewModel = this.getModel("appView"),
|
|
1359
|
+
dCurrentDate = new Date(),
|
|
1360
|
+
iCurrentYear = dCurrentDate.getFullYear(),
|
|
1361
|
+
aDateSpans = [
|
|
1362
|
+
[new Date(iCurrentYear, 1, 1), new Date(iCurrentYear, 1, 21)], // Feb 1-21
|
|
1363
|
+
[new Date(iCurrentYear, 4, 1), new Date(iCurrentYear, 4, 21)], // May 1-21
|
|
1364
|
+
[new Date(iCurrentYear, 7, 1), new Date(iCurrentYear, 7, 21)], // Aug 1-21
|
|
1365
|
+
[new Date(iCurrentYear, 10, 1), new Date(iCurrentYear, 10, 21)] // Nov 1-21
|
|
1366
|
+
],
|
|
1367
|
+
bDateInSpan = false,
|
|
1368
|
+
sLastAvailableDate;
|
|
1369
|
+
|
|
1370
|
+
aDateSpans.forEach(function (aDateSpan) {
|
|
1371
|
+
var dMinDate = aDateSpan[0],
|
|
1372
|
+
dMaxDate = aDateSpan[1];
|
|
1373
|
+
|
|
1374
|
+
if (dCurrentDate >= dMinDate && dCurrentDate <= dMaxDate) {
|
|
1375
|
+
bDateInSpan = true;
|
|
1376
|
+
sLastAvailableDate = dMaxDate.toLocaleDateString();
|
|
1377
|
+
return;
|
|
1378
|
+
}
|
|
1379
|
+
});
|
|
1380
|
+
|
|
1381
|
+
oViewModel.setProperty("/bShowLongSurvey", bDateInSpan);
|
|
1382
|
+
|
|
1383
|
+
if (bDateInSpan) {
|
|
1384
|
+
oViewModel.setProperty("/sLongSurveyLastDate", sLastAvailableDate);
|
|
1385
|
+
}
|
|
1386
|
+
},
|
|
1387
|
+
|
|
1388
|
+
addSurveyPopoverCloseBtn: function () {
|
|
1389
|
+
var oResourceBundle = this.getModel("i18n").getResourceBundle(),
|
|
1390
|
+
fCloseBtnHandler = this.closeSurveyPopover.bind(this),
|
|
1391
|
+
oCloseButton = new Button({
|
|
1392
|
+
text: oResourceBundle.getText("SURVEY_POPOVER_CLOSE_BTN"),
|
|
1393
|
+
press: fCloseBtnHandler
|
|
1394
|
+
});
|
|
1395
|
+
|
|
1396
|
+
this._oSurveyPopover.setEndButton(oCloseButton);
|
|
1397
|
+
},
|
|
1398
|
+
|
|
1270
1399
|
/**
|
|
1271
1400
|
* Event handler for the send feedback button
|
|
1272
1401
|
*/
|
|
@@ -1420,13 +1549,7 @@ sap.ui.define([
|
|
|
1420
1549
|
sPreferencedCategory = oModel.getProperty("/preferencedCategory"),
|
|
1421
1550
|
bIncludeDeprecated = oModel.getProperty("/includeDeprecated");
|
|
1422
1551
|
|
|
1423
|
-
|
|
1424
|
-
this.oPicker = this.createSearchPicker();
|
|
1425
|
-
}
|
|
1426
|
-
|
|
1427
|
-
if (!this.oPicker.isOpen()) {
|
|
1428
|
-
this.oPicker.open();
|
|
1429
|
-
}
|
|
1552
|
+
this.openSearchPicker();
|
|
1430
1553
|
|
|
1431
1554
|
if (this.highlighter) {
|
|
1432
1555
|
this.highlighter.highlight(sQuery);
|
|
@@ -1480,7 +1603,11 @@ sap.ui.define([
|
|
|
1480
1603
|
SearchUtil.init();
|
|
1481
1604
|
|
|
1482
1605
|
setTimeout(function () {
|
|
1483
|
-
|
|
1606
|
+
if (Device.system.desktop) {
|
|
1607
|
+
this._oView.byId("searchControl").getAggregation("_searchField").getFocusDomRef().focus();
|
|
1608
|
+
} else {
|
|
1609
|
+
this.openSearchPicker();
|
|
1610
|
+
}
|
|
1484
1611
|
}.bind(this), 0);
|
|
1485
1612
|
|
|
1486
1613
|
if (bPhoneSize) {
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
sap.ui.define([
|
|
8
|
+
"sap/ui/documentation/sdk/controller/BaseController",
|
|
9
|
+
'sap/ui/model/json/JSONModel',
|
|
10
|
+
"sap/ui/documentation/sdk/util/Resources",
|
|
11
|
+
"sap/ui/thirdparty/jquery",
|
|
12
|
+
"sap/ui/model/resource/ResourceModel",
|
|
13
|
+
"sap/ui/core/HTML"
|
|
14
|
+
],
|
|
15
|
+
function (BaseController, JSONModel, ResourcesUtil, jQuery, ResourceModel, HTML) {
|
|
16
|
+
'use strict';
|
|
17
|
+
|
|
18
|
+
return BaseController.extend('sap.ui.documentation.sdk.controller.BPSupport', {
|
|
19
|
+
onInit: function() {
|
|
20
|
+
this.getRouter().getRoute("BPSupport").attachPatternMatched(this._onMatched, this);
|
|
21
|
+
|
|
22
|
+
this._oModel = new JSONModel();
|
|
23
|
+
this.setModel(this._oModel);
|
|
24
|
+
|
|
25
|
+
if (!this._oMessageBundle) {
|
|
26
|
+
this._oMessageBundle = new ResourceModel({
|
|
27
|
+
bundleName: "sap.ui.documentation.messagebundle"
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
this.setModel(this._oMessageBundle, "i18n");
|
|
31
|
+
this.oConfigUtil = this.getOwnerComponent().getConfigUtil();
|
|
32
|
+
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
_requestContentPage: function(oConfigPath) {
|
|
36
|
+
return new Promise(function(resolve, reject) {
|
|
37
|
+
jQuery.ajax(ResourcesUtil.getResourceOriginPath(oConfigPath["browserSupportPath"]), {
|
|
38
|
+
dataType: "text"
|
|
39
|
+
}).done(function (oData) {
|
|
40
|
+
resolve(oData);
|
|
41
|
+
}).fail(function (jqXHR, sTextStatus, sError) {
|
|
42
|
+
reject();
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
},
|
|
46
|
+
/**
|
|
47
|
+
* Handles "BPSupport" routing
|
|
48
|
+
* @function
|
|
49
|
+
* @private
|
|
50
|
+
*/
|
|
51
|
+
_onMatched: function () {
|
|
52
|
+
try {
|
|
53
|
+
this.hideMasterSide();
|
|
54
|
+
} catch (e) {
|
|
55
|
+
// try-catch due to a bug in UI5 SplitApp, CL 1898264 should fix it
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
this.oConfigUtil._requireConfigJSON()
|
|
59
|
+
.then(this._requestContentPage)
|
|
60
|
+
.then(function(oData){
|
|
61
|
+
this._oHTML = new HTML({
|
|
62
|
+
id : "BPSupportContent",
|
|
63
|
+
content : '<div id="d4h5-main-container" class="bpsupport">' + oData + '</div>'
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
this.byId("BPSupportPage").removeAllContent();
|
|
67
|
+
this.byId("BPSupportPage").addContent(this._oHTML);
|
|
68
|
+
|
|
69
|
+
}.bind(this))
|
|
70
|
+
.catch(function(oErr) {
|
|
71
|
+
this.onRouteNotFound();
|
|
72
|
+
}.bind(this));
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
});
|
|
@@ -8,8 +8,9 @@ sap.ui.define([
|
|
|
8
8
|
"sap/ui/documentation/sdk/controller/BaseController",
|
|
9
9
|
"sap/ui/model/json/JSONModel",
|
|
10
10
|
"sap/ui/thirdparty/URI",
|
|
11
|
-
"sap/uxap/ThrottledTaskHelper"
|
|
12
|
-
|
|
11
|
+
"sap/uxap/ThrottledTaskHelper",
|
|
12
|
+
"sap/ui/core/Core"
|
|
13
|
+
], function (BaseController, JSONModel, URI, ThrottledTask, Core) {
|
|
13
14
|
"use strict";
|
|
14
15
|
|
|
15
16
|
var SRC_FILE_NAMES = {
|
|
@@ -75,6 +76,15 @@ sap.ui.define([
|
|
|
75
76
|
// additional performance optimization:
|
|
76
77
|
// throttle the output of src changes
|
|
77
78
|
this._oThrottledTask = null;
|
|
79
|
+
|
|
80
|
+
this.bus = Core.getEventBus();
|
|
81
|
+
this.bus.subscribe("themeChanged", "onDemoKitThemeChanged", this.onDemoKitThemeChanged, this);
|
|
82
|
+
},
|
|
83
|
+
|
|
84
|
+
onDemoKitThemeChanged: function (sChannelId, sEventId, oData) {
|
|
85
|
+
// clean throttled task to reload iFrame with new theme
|
|
86
|
+
this._oThrottledTask = null;
|
|
87
|
+
this.requestExecuteCurrentSrc();
|
|
78
88
|
},
|
|
79
89
|
|
|
80
90
|
onSrcLiveChange: function(oEvent) {
|
|
@@ -157,7 +167,8 @@ sap.ui.define([
|
|
|
157
167
|
|
|
158
168
|
return {
|
|
159
169
|
src: oModulesToPost,
|
|
160
|
-
moduleNameToRequire: sInitModuleName
|
|
170
|
+
moduleNameToRequire: sInitModuleName,
|
|
171
|
+
activeTheme: Core.getConfiguration().getTheme().toLowerCase()
|
|
161
172
|
};
|
|
162
173
|
},
|
|
163
174
|
|
|
@@ -21,7 +21,8 @@ sap.ui.define([
|
|
|
21
21
|
"sap/ui/core/Fragment",
|
|
22
22
|
"sap/ui/documentation/sdk/util/Resources",
|
|
23
23
|
"./config/sampleForwardingConfig",
|
|
24
|
-
"sap/base/strings/capitalize"
|
|
24
|
+
"sap/base/strings/capitalize",
|
|
25
|
+
"sap/ui/core/Configuration"
|
|
25
26
|
], function(
|
|
26
27
|
SampleBaseController,
|
|
27
28
|
JSONModel,
|
|
@@ -38,7 +39,8 @@ sap.ui.define([
|
|
|
38
39
|
Fragment,
|
|
39
40
|
ResourcesUtil,
|
|
40
41
|
sampleForwardingConfig,
|
|
41
|
-
capitalize
|
|
42
|
+
capitalize,
|
|
43
|
+
Configuration
|
|
42
44
|
) {
|
|
43
45
|
"use strict";
|
|
44
46
|
|
|
@@ -56,7 +58,7 @@ sap.ui.define([
|
|
|
56
58
|
/* =========================================================== */
|
|
57
59
|
|
|
58
60
|
onInit: function () {
|
|
59
|
-
var oConfiguration =
|
|
61
|
+
var oConfiguration = Configuration;
|
|
60
62
|
SampleBaseController.prototype.onInit.call(this);
|
|
61
63
|
|
|
62
64
|
this.getRouter().getRoute("sample").attachPatternMatched(this._onSampleMatched, this);
|
|
@@ -80,7 +82,7 @@ sap.ui.define([
|
|
|
80
82
|
this.setDefaultSampleTheme();
|
|
81
83
|
this.bus.subscribe("themeChanged", "onDemoKitThemeChanged", this.onDemoKitThemeChanged, this);
|
|
82
84
|
|
|
83
|
-
this.getOwnerComponent()._sSampleIframeOrigin = ResourcesUtil.getConfig() !== "." ? ResourcesUtil.
|
|
85
|
+
this.getOwnerComponent()._sSampleIframeOrigin = ResourcesUtil.getConfig() !== "." ? ResourcesUtil.getResourceOrigin() : window.origin;
|
|
84
86
|
},
|
|
85
87
|
|
|
86
88
|
/* =========================================================== */
|
|
@@ -133,6 +135,8 @@ sap.ui.define([
|
|
|
133
135
|
|
|
134
136
|
// we need this property to navigate to API reference
|
|
135
137
|
this.entityId = this._sEntityId ? this._sEntityId : oSample.entityId;
|
|
138
|
+
// we need the lib name in order to fetch dependencies for the sample
|
|
139
|
+
this._sLib = oSample.library;
|
|
136
140
|
|
|
137
141
|
oModelData.sEntityId = this.entityId;
|
|
138
142
|
|
|
@@ -198,7 +202,7 @@ sap.ui.define([
|
|
|
198
202
|
this.getView().byId("apiRefButton").setVisible(bHasAPIReference);
|
|
199
203
|
}.bind(this));
|
|
200
204
|
|
|
201
|
-
this.oModel.setData(oModelData);
|
|
205
|
+
this.oModel.setData(oModelData, true);
|
|
202
206
|
this.appendPageTitle(this.getModel().getProperty("/name"));
|
|
203
207
|
}.bind(this))
|
|
204
208
|
.catch(function (oError) {
|
|
@@ -229,7 +233,7 @@ sap.ui.define([
|
|
|
229
233
|
* @private
|
|
230
234
|
*/
|
|
231
235
|
_initIframeURL : function () {
|
|
232
|
-
var sSampleOrigin = (
|
|
236
|
+
var sSampleOrigin = ResourcesUtil.getConfig(),
|
|
233
237
|
sSampleVersion = ResourcesUtil.getResourcesVersion(),
|
|
234
238
|
sSampleSearchParams = "";
|
|
235
239
|
|
|
@@ -242,6 +246,7 @@ sap.ui.define([
|
|
|
242
246
|
|
|
243
247
|
sSampleSearchParams = (sSampleSearchParams === "" ? "?" : sSampleSearchParams + "&") +
|
|
244
248
|
"sap-ui-xx-sample-id=" + this._sId
|
|
249
|
+
+ "&sap-ui-xx-sample-lib=" + (this._sLib || "")
|
|
245
250
|
+ "&sap-ui-xx-sample-origin=" + sSampleOrigin + sSampleVersion
|
|
246
251
|
+ "&sap-ui-xx-dk-origin=" + window.location.origin;
|
|
247
252
|
|
|
@@ -341,7 +346,7 @@ sap.ui.define([
|
|
|
341
346
|
|
|
342
347
|
_saveLocalSettings: function(sTheme, sDensityMode, bRTL) {
|
|
343
348
|
var sDensityMode = this._presetDensity(sDensityMode);
|
|
344
|
-
this.
|
|
349
|
+
this.oModel.setData({
|
|
345
350
|
theme: sTheme,
|
|
346
351
|
rtl: bRTL,
|
|
347
352
|
density: sDensityMode
|
|
@@ -407,7 +412,7 @@ sap.ui.define([
|
|
|
407
412
|
URLHelper.redirect(this.sIFrameUrl, true);
|
|
408
413
|
return;
|
|
409
414
|
}
|
|
410
|
-
|
|
415
|
+
|
|
411
416
|
this.loadSampleSettings(function(eMessage){
|
|
412
417
|
this._applySearchParamValueToIframeURL('sap-ui-theme', eMessage.data.data.theme);
|
|
413
418
|
this._applySearchParamValueToIframeURL('sap-ui-rtl', eMessage.data.data.RTL);
|
|
@@ -476,14 +481,6 @@ sap.ui.define([
|
|
|
476
481
|
|
|
477
482
|
_createIframe : function () {
|
|
478
483
|
return new Promise(function (resolve, reject) {
|
|
479
|
-
var sSampleId,
|
|
480
|
-
sIframePath = "",
|
|
481
|
-
rExtractFilename = /\/([^\/]*)$/,// extracts everything after the last slash (e.g. some/path/index.html -> index.html)
|
|
482
|
-
rStripUI5Ending = /\..+$/,// removes everything after the first dot in the filename (e.g. someFile.qunit.html -> .qunit.html)
|
|
483
|
-
aFileNameMatches,
|
|
484
|
-
sFileName,
|
|
485
|
-
sFileEnding,
|
|
486
|
-
vIframe;
|
|
487
484
|
|
|
488
485
|
this.fResolve = resolve;
|
|
489
486
|
this.fReject = reject;
|
|
@@ -494,55 +491,18 @@ sap.ui.define([
|
|
|
494
491
|
this._oHtmlControl.destroy();
|
|
495
492
|
}
|
|
496
493
|
|
|
497
|
-
var fnMessage = function (eMessage) {
|
|
498
|
-
var oSettingsData = this.getView().getModel().getData();
|
|
499
|
-
if (eMessage.data.type === "INIT") {
|
|
500
|
-
if (eMessage.data.config && eMessage.data.config.sample && eMessage.data.config.sample.iframe) {
|
|
501
|
-
sSampleId = this._sId;
|
|
502
|
-
vIframe = eMessage.data.config.sample.iframe;
|
|
503
|
-
sIframePath = this._resolveIframePath(sSampleId, vIframe);
|
|
504
|
-
|
|
505
|
-
//vlaid only for samples that contains own index.html
|
|
506
|
-
// strip the file extension to be able to use jQuery.sap.getModulePath
|
|
507
|
-
aFileNameMatches = rExtractFilename.exec(vIframe);
|
|
508
|
-
sFileName = (aFileNameMatches && aFileNameMatches.length > 1 ? aFileNameMatches[1] : vIframe);
|
|
509
|
-
sFileEnding = rStripUI5Ending.exec(sFileName)[0];
|
|
510
|
-
var sIframeWithoutUI5Ending = sFileName.replace(rStripUI5Ending, "");
|
|
511
|
-
|
|
512
|
-
// combine namespace with the file name again
|
|
513
|
-
this.sIFrameUrl = (sap.ui.require.toUrl((sIframePath + "/" + sIframeWithoutUI5Ending).replace(/\./g, "/")) + sFileEnding || ".html")
|
|
514
|
-
+ "?sap-ui-theme=" + sap.ui.getCore().getConfiguration().getTheme();
|
|
515
|
-
this._oHtmlControl.getDomRef().src = this.sIFrameUrl;
|
|
516
|
-
}
|
|
517
|
-
this._oHtmlControl.getDomRef().contentWindow.postMessage({
|
|
518
|
-
type: "SETTINGS",
|
|
519
|
-
reason: "set",
|
|
520
|
-
data: {
|
|
521
|
-
"density": oSettingsData.density,
|
|
522
|
-
"RTL": oSettingsData.rtl,
|
|
523
|
-
"theme": oSettingsData.theme
|
|
524
|
-
}
|
|
525
|
-
}, this.getOwnerComponent()._sSampleIframeOrigin);
|
|
526
|
-
this.fResolve(eMessage.data.config.sample);
|
|
527
|
-
} else if (eMessage.data.type === "ERR") {
|
|
528
|
-
this.fReject(eMessage.data.data.msg);
|
|
529
|
-
} else if (eMessage.data.type === "RTA") {
|
|
530
|
-
this._loadRTA.call(this);
|
|
531
|
-
}
|
|
532
|
-
}.bind(this);
|
|
533
|
-
|
|
534
494
|
this._oHtmlControl = new HTML({
|
|
535
495
|
id : "sampleFrame",
|
|
536
496
|
content : '<iframe src="' + this.sIFrameUrl + '" id="sampleFrame" frameBorder="0"></iframe>'
|
|
537
497
|
}).addEventDelegate({
|
|
538
498
|
onBeforeRendering: function () {
|
|
539
|
-
window.removeEventListener("message",
|
|
540
|
-
}
|
|
499
|
+
window.removeEventListener("message", this.onMessage.bind(this));
|
|
500
|
+
}.bind(this)
|
|
541
501
|
})
|
|
542
502
|
.addEventDelegate({
|
|
543
503
|
onAfterRendering: function () {
|
|
544
|
-
window.addEventListener("message",
|
|
545
|
-
}
|
|
504
|
+
window.addEventListener("message",this.onMessage.bind(this));
|
|
505
|
+
}.bind(this)
|
|
546
506
|
});
|
|
547
507
|
|
|
548
508
|
this.byId("page").removeAllContent();
|
|
@@ -551,6 +511,72 @@ sap.ui.define([
|
|
|
551
511
|
}.bind(this));
|
|
552
512
|
},
|
|
553
513
|
|
|
514
|
+
onMessage: function(eMessage) {
|
|
515
|
+
if (eMessage.origin !== this.getOwnerComponent()._sSampleIframeOrigin) {
|
|
516
|
+
return;
|
|
517
|
+
}
|
|
518
|
+
if (eMessage.source !== this._oHtmlControl.getDomRef().contentWindow) {
|
|
519
|
+
return;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
if (eMessage.data.type === "INIT") {
|
|
523
|
+
this.fnMessageInit(eMessage);
|
|
524
|
+
} else if (eMessage.data.type === "ERR") {
|
|
525
|
+
this.fnMessageError(eMessage);
|
|
526
|
+
} else if (eMessage.data.type === "LOAD") {
|
|
527
|
+
this.fnMessageLoad(eMessage);
|
|
528
|
+
} else if (eMessage.data.type === "RTA") {
|
|
529
|
+
this._loadRTA.call(this);
|
|
530
|
+
}
|
|
531
|
+
},
|
|
532
|
+
|
|
533
|
+
fnMessageInit: function(eMessage) {
|
|
534
|
+
var sSampleId,
|
|
535
|
+
sIframePath = "",
|
|
536
|
+
rExtractFilename = /\/([^\/]*)$/,// extracts everything after the last slash (e.g. some/path/index.html -> index.html)
|
|
537
|
+
rStripUI5Ending = /\..+$/,// removes everything after the first dot in the filename (e.g. someFile.qunit.html -> .qunit.html)
|
|
538
|
+
aFileNameMatches,
|
|
539
|
+
sFileName,
|
|
540
|
+
sFileEnding,
|
|
541
|
+
vIframe,
|
|
542
|
+
oSettingsData = this.oModel.getData();
|
|
543
|
+
|
|
544
|
+
if (eMessage.data.config && eMessage.data.config.sample && eMessage.data.config.sample.iframe) {
|
|
545
|
+
sSampleId = this._sId;
|
|
546
|
+
vIframe = eMessage.data.config.sample.iframe;
|
|
547
|
+
sIframePath = this._resolveIframePath(sSampleId, vIframe);
|
|
548
|
+
|
|
549
|
+
//vlaid only for samples that contains own index.html
|
|
550
|
+
// strip the file extension to be able to use jQuery.sap.getModulePath
|
|
551
|
+
aFileNameMatches = rExtractFilename.exec(vIframe);
|
|
552
|
+
sFileName = (aFileNameMatches && aFileNameMatches.length > 1 ? aFileNameMatches[1] : vIframe);
|
|
553
|
+
sFileEnding = rStripUI5Ending.exec(sFileName)[0];
|
|
554
|
+
var sIframeWithoutUI5Ending = sFileName.replace(rStripUI5Ending, "");
|
|
555
|
+
|
|
556
|
+
// combine namespace with the file name again
|
|
557
|
+
this.sIFrameUrl = (sap.ui.require.toUrl((sIframePath + "/" + sIframeWithoutUI5Ending).replace(/\./g, "/")) + sFileEnding || ".html")
|
|
558
|
+
+ "?sap-ui-theme=" + Configuration.getTheme();
|
|
559
|
+
this._oHtmlControl.getDomRef().src = this.sIFrameUrl;
|
|
560
|
+
}
|
|
561
|
+
this._oHtmlControl.getDomRef().contentWindow.postMessage({
|
|
562
|
+
type: "SETTINGS",
|
|
563
|
+
reason: "set",
|
|
564
|
+
data: {
|
|
565
|
+
"density": oSettingsData.density,
|
|
566
|
+
"RTL": oSettingsData.rtl,
|
|
567
|
+
"theme": oSettingsData.theme
|
|
568
|
+
}
|
|
569
|
+
}, this.getOwnerComponent()._sSampleIframeOrigin);
|
|
570
|
+
this.fResolve(eMessage.data.config.sample);
|
|
571
|
+
},
|
|
572
|
+
fnMessageLoad: function() {
|
|
573
|
+
Log.info("Sample Iframe for sample " + this._sId + " is loaded");
|
|
574
|
+
},
|
|
575
|
+
|
|
576
|
+
fnMessageError: function(eMessage) {
|
|
577
|
+
this.fReject(eMessage.data.data.msg);
|
|
578
|
+
},
|
|
579
|
+
|
|
554
580
|
_createComponent : function () {
|
|
555
581
|
|
|
556
582
|
// create component only once
|
|
@@ -577,7 +603,7 @@ sap.ui.define([
|
|
|
577
603
|
setDefaultSampleTheme: function() {
|
|
578
604
|
var sSampleVersion = ResourcesUtil.getResourcesVersion();
|
|
579
605
|
this._sDefaultSampleTheme = sSampleVersion && parseInt(sSampleVersion.slice(3,5)) < 68 ?
|
|
580
|
-
"sap_belize" :
|
|
606
|
+
"sap_belize" : Configuration.getTheme();
|
|
581
607
|
},
|
|
582
608
|
|
|
583
609
|
onDemoKitThemeChanged: function(sChannelId, sEventId, oData) {
|
|
@@ -627,7 +653,7 @@ sap.ui.define([
|
|
|
627
653
|
|
|
628
654
|
oModelData.rtaLoaded = true;
|
|
629
655
|
|
|
630
|
-
this.oModel.setData(oModelData);
|
|
656
|
+
this.oModel.setData(oModelData, true);
|
|
631
657
|
|
|
632
658
|
this.getRouter().attachRouteMatched(function () {
|
|
633
659
|
if (this._oRTA) {
|
|
@@ -238,7 +238,7 @@ sap.ui.define([
|
|
|
238
238
|
|
|
239
239
|
_formatMockFile: function (sMockData) {
|
|
240
240
|
var sWrongPath = "test-resources/sap/ui/documentation/sdk/images/",
|
|
241
|
-
sCorrectPath = "https://openui5.
|
|
241
|
+
sCorrectPath = "https://sdk.openui5.org/test-resources/sap/ui/documentation/sdk/images/",
|
|
242
242
|
oRegExp = new RegExp(sWrongPath, "g");
|
|
243
243
|
|
|
244
244
|
return sMockData.replace(oRegExp, sCorrectPath);
|
|
@@ -22,7 +22,8 @@ sap.ui.define([
|
|
|
22
22
|
"sap/m/Button",
|
|
23
23
|
"sap/m/MessageToast",
|
|
24
24
|
"sap/ui/dom/includeStylesheet",
|
|
25
|
-
"sap/ui/dom/includeScript"
|
|
25
|
+
"sap/ui/dom/includeScript",
|
|
26
|
+
"sap/ui/util/openWindow"
|
|
26
27
|
],
|
|
27
28
|
function (
|
|
28
29
|
jQuery,
|
|
@@ -42,7 +43,8 @@ sap.ui.define([
|
|
|
42
43
|
Button,
|
|
43
44
|
MessageToast,
|
|
44
45
|
includeStylesheet,
|
|
45
|
-
includeScript
|
|
46
|
+
includeScript,
|
|
47
|
+
openWindow
|
|
46
48
|
) {
|
|
47
49
|
"use strict";
|
|
48
50
|
|
|
@@ -511,10 +513,7 @@ sap.ui.define([
|
|
|
511
513
|
},
|
|
512
514
|
|
|
513
515
|
onEditGitHubPress: function(oEvent) {
|
|
514
|
-
|
|
515
|
-
sTitle = this.jsonDefModel.getProperty("/topictitle1"),
|
|
516
|
-
sGitHubUrl = this._formatToGitHubUrl(sUrl, sTitle);
|
|
517
|
-
window.open(sGitHubUrl, "_blank");
|
|
516
|
+
openWindow(this.jsonDefModel.getProperty("/mdEditLink"));
|
|
518
517
|
},
|
|
519
518
|
|
|
520
519
|
/**
|
|
@@ -531,6 +530,7 @@ sap.ui.define([
|
|
|
531
530
|
* @param {string} sTitle the title of the file
|
|
532
531
|
* @returns {string} the url of the file in the GitHub repo
|
|
533
532
|
* @private
|
|
533
|
+
* @deprecated since v1.107.0
|
|
534
534
|
*/
|
|
535
535
|
_formatToGitHubUrl: function(sUrl, sTitle) {
|
|
536
536
|
var sGitHubFileName = sTitle.trim()
|
|
@@ -7,8 +7,11 @@
|
|
|
7
7
|
/* Utility class that facilitates route configuration handling */
|
|
8
8
|
sap.ui.define([
|
|
9
9
|
"sap/ui/base/Object",
|
|
10
|
-
"sap/base/strings/capitalize"
|
|
11
|
-
|
|
10
|
+
"sap/base/strings/capitalize",
|
|
11
|
+
"sap/ui/thirdparty/jquery",
|
|
12
|
+
"sap/ui/documentation/sdk/util/Resources",
|
|
13
|
+
"sap/base/Log"
|
|
14
|
+
], function (BaseObject, capitalize, jQuery, ResourcesUtil, Log) {
|
|
12
15
|
"use strict";
|
|
13
16
|
|
|
14
17
|
return BaseObject.extend("sap.ui.documentation.sdk.controller.util.ConfigUtil", {
|
|
@@ -107,6 +110,23 @@ sap.ui.define([
|
|
|
107
110
|
destroy: function () {
|
|
108
111
|
this._oComponent = null;
|
|
109
112
|
return BaseObject.prototype.destroy.apply(this, arguments);
|
|
113
|
+
},
|
|
114
|
+
|
|
115
|
+
// Require the configuration file for static pages paths
|
|
116
|
+
_requireConfigJSON: function() {
|
|
117
|
+
return new Promise(function (resolve) {
|
|
118
|
+
jQuery.ajax(ResourcesUtil.getResourceOriginPath("/news-config.json"), {
|
|
119
|
+
type: "GET",
|
|
120
|
+
dataType: "JSON",
|
|
121
|
+
success : function(oResult) {
|
|
122
|
+
resolve(oResult);
|
|
123
|
+
},
|
|
124
|
+
error : function () {
|
|
125
|
+
Log.error("failed to load news-config.json");
|
|
126
|
+
resolve();
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
});
|
|
110
130
|
}
|
|
111
131
|
});
|
|
112
132
|
});
|