Code: Alles auswählen.
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" charset="utf-8">
<title>Testpage</title>
<script
src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js"
id="sap-ui-bootstrap"
data-sap-ui-libs="sap.ui.commons, sap.ui.ux3, sap.ui.table, sap.m, sap.viz"
data-sap-ui-theme="sap_goldreflection">
</script>
<link rel="stylesheet" type="text/css" href="css/style.css" />
<script src="scripte/date.js"></script>
<script>
sap.ui.localResources("scripte");
var view = sap.ui.view({
id :"id_main",
viewName :"scripte.main",
type :sap.ui.core.mvc.ViewType.JS
});
</script>
</head>
<body class="sapUiBody" role="application">
<div id="content">
<div id="header"></div>
<div id="submenu"></div>
<div id="inhalt"></div>
<div id="footer"></div>
</div>
</body>
</html>
Code: Alles auswählen.
sap.ui.controller("scripte.main", {
});
Code: Alles auswählen.
sap.ui.jsview("scripte.main", {
getControllerName : function() {
return "scripte.main";
},
createContent : function(oController) {
var oMasterShell = new sap.ui.ux3.Shell("MainShell", {
// Inhalt
content : [new sap.ui.view({
id : "start",
viewName : "scripte.start",
type : sap.ui.core.mvc.ViewType.JS
})],
// Menüleiste
worksetItems : [
new sap.ui.ux3.NavigationItem
({
key : "start",
text : "Startseite",
tooltip : "Übersicht der aktuellen Projekte"
})],
worksetItemSelected : oController.worksetItemSelected,
search: [oController.search, oController]
});
return oMasterShell;
}
});
Code: Alles auswählen.
sap.ui.jsview("scripte.start", {
getControllerName : function() {
return "scripte.start";
},
createContent : function(oController) {
// Erzeugen des Untermenüs
var oSubMenubar = new sap.ui.commons.MenuBar;
var oMenubarItem1 = new sap.ui.commons.MenuItem("start-2",{
text : "Eintrag 1",
tooltip: "Kommentar zur Seite"
});
oSubMenubar.addItem(oMenubarItem1);
var oMenubarItem2 = new sap.ui.commons.MenuItem("start-3",{
text : "Eintrag 2",
tooltip: "Kommentar zur Seite"
});
oSubMenubar.addItem(oMenubarItem2);
oSubMenubar.placeAt("submenu");
}
});
Code: Alles auswählen.
sap.ui.controller("scripte.start", {
});