-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(framework): support older OpenUI5 getThemeRoot API (#7202)
Theming.getThemeRoot is recently added OpenUI5 API, but not released yet (available on nightly snapshot). To support currently released OpenUI5 versions we need to use the older API "Configuration#getThemeRoot". - Fetch Theming only for OpenUi5 versions since 1.116.0 and onward - For OpenUi5 versions prior to 1.116.0 use Configuration#getThemeRoot API - For the version processing, use the global util "sap/base/util/Version" Fixes: #7199
- Loading branch information
Showing
3 changed files
with
102 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> | ||
<meta charset="utf-8"> | ||
|
||
<title>OpenUI5 Nightly + UI5 Web Components</title> | ||
|
||
<script id='sap-ui-bootstrap' | ||
src='https://openui5nightly.hana.ondemand.com/resources/sap-ui-core.js' | ||
data-sap-ui-theme='sap_belize_hcb' | ||
data-sap-ui-libs='sap.m, sap.ui.core' | ||
data-sap-ui-preload="async" | ||
></script> | ||
|
||
<script> | ||
sap.ui.getCore().attachInit(function() { | ||
const dialog = new sap.m.Dialog({ | ||
content: [ | ||
new sap.ui.core.HTML({ | ||
content: '<ui5-date-picker id="myDatepicker" value="Aug 14, 2018" data-sap-ui-integration-popup-content></ui5-date-picker>' | ||
}), | ||
] | ||
}); | ||
|
||
const dialog2 = new sap.m.Dialog({ | ||
content: [ | ||
new sap.ui.core.HTML({ | ||
content: '<ui5-calendar id="myCalendar" value="Aug 14, 2018"></ui5-calendar>' | ||
}), | ||
] | ||
}); | ||
|
||
const btn = new sap.m.Button({ | ||
text: "DialogWithDatePicker", | ||
press: function() { | ||
dialog.open(); | ||
}, | ||
}); | ||
|
||
const btn2 = new sap.m.Button({ | ||
text: "DialogWithCalendar", | ||
press: function() { | ||
dialog2.open(); | ||
}, | ||
}); | ||
|
||
const page = new sap.m.Page({ | ||
content: [ | ||
dialog, dialog2, btn, btn2 | ||
], | ||
}); | ||
|
||
page.placeAt('content'); | ||
}); | ||
</script> | ||
|
||
<script data-ui5-config type="application/json"> | ||
{ | ||
"language": "de", | ||
"noConflict": { | ||
"events": ["click"] | ||
}, | ||
"compactSize": true, | ||
"calendarType": "Islamic" | ||
} | ||
</script> | ||
|
||
<script src="../../bundle.esm.js" type="module"></script> | ||
|
||
<link rel="stylesheet" type="text/css" href="./styles/OpenUI5.css"> | ||
</head> | ||
|
||
<body class="openui51auto"> | ||
|
||
<ui5-button icon="download">Web Component</ui5-button> | ||
<ui5-datepicker></ui5-datepicker> | ||
|
||
<div id='content'></div> | ||
</body> | ||
</html> |