var oHTML = new sap.ui.core.HTML("HOME",{content:'
'+
''+'
'});
oText = new sap.ui.commons.TextView("myText",{
text: "In the conten area you can place any SAPUI5 control or a control hierarchy.\n You can use a layout to create complex structures."
});
oButton= new sap.ui.commons.Button("myButton",{
text: "Click me!",
tooltip: "please click me",
press: function(oEvent){alert("Thank you for clicking me!");}
});
oImage= new sap.ui.commons.Image("myImage",{
src: "images/SAPLogo.gif",
width: "100%",
alt: "Hete should be an image.",
tooltip: "This is an image",
decorative: false
});
var oAPI = new sap.ui.core.HTML("API",{
content: '
'+
''+'
'
});
var oShell = new sap.ui.ux3.Shell("myShell", {
appIconTooltip: "SAP logo",
showLogoutButton: true,
showSearchTool: true,
showInspectorTool: true,
showFeederTool: true,
worksetItems: [new sap.ui.ux3.NavigationItem("WI_home",{key:"wi_home",text:"Monitor"}),
new sap.ui.ux3.NavigationItem("WI_1",{key:"wi_1",text:"Examples", subItems:[
new sap.ui.ux3.NavigationItem("WI_1_1",{key:"wi_1_1",text:"Text"}),
new sap.ui.ux3.NavigationItem("WI_1_2",{key:"wi_1_2",text:"Button"}),
new sap.ui.ux3.NavigationItem("WI_1_3",{key:"wi_1_3",text:"Image"})]}),
new sap.ui.ux3.NavigationItem("WI_API",{key:"wi_api",text:"API Documentation"})],
headerItems: [new sap.ui.commons.TextView({text:"User Name",tooltip:"U.Name"}),
new sap.ui.commons.Button({text:"Personalize",tooltip:"Personalize",press:function(oEvent){alert("Here could open an personalize dialog");}}),
new sap.ui.commons.MenuButton({
text: "Help",
tooltip: "Help Menu",
menu: new sap.ui.commons.Menu("menu1",{items:[
new sap.ui.commons.MenuItem("menuitem1",{text:"Help"}),
new sap.ui.commons.MenuItem("menuitem2",{text:"Report Incident"}),
new sap.ui.commons.MenuItem("menuitem3",{text:"About"})]})
})],
worksetItemSelected: function(oEvent){
var sId = oEvent.getParameter("id");
var oShell = oEvent.oSource;
switch (sId) {
case "WI_home":
oShell.setContent(oHTML);
break;
case "WI_1_1":
oShell.setContent(oText);
break;
case "WI_1_2":
oShell.setContent(oButton);
break;
case "WI_1_3":
oShell.setContent(oImage);
break;
case "WI_API":
oShell.setContent(oAPI);
break;
default:
break;
}
},
paneBarItemSelected: function(oEvent){
var sKey = oEvent.getParameter("key");
var oShell = oEvent.oSource;
switch (sKey) {
case "pi_date":
var oDate = new Date();
oShell.setPaneContent(new sap.ui.commons.TextView({text:oDate.toLocaleString()}), true);
break;
case "pi_browser":
oShell.setPaneContent(new sap.ui.commons.TextView({text:"You browser provides the following information:\n"+navigator.userAgent}), true);
break;
default:
break;
}
},
logout:function(){
alert("Logout Button has been clicked.\nThe application can now do whatever is required.");
},
search:function(oEvent){
alert("Search triggered: " + oEvent.getParameter("text"));
},
feedSubmit:function(oEvent){
alert("Feed entry submitted: " + oEvent.getParameter("text"));
},
paneClosed : function(oEvent) {
alert("Pane has been closed: " + oEvent.getParameter("id"));
}
}).placeAt("content");
dsPieChart(dataset);
/************************************************** VIEW *************************/
sap.ui.localResources("delaware_pimonitor");
var view = sap.ui.view({
id : "idmonitor1",
viewName : "delaware_pimonitor.monitor",
type : sap.ui.core.mvc.ViewType.JS
});
var viewDashboard = sap.ui.view({
id : "iddashboard1",
viewName : "delaware_pimonitor.Dashboard",
type : sap.ui.core.mvc.ViewType.JS
});
/*
// create the button instance
var myButton = new sap.ui.commons.Button("btn");
// set properties, e.g. the text (there is also a shorter way of setting several properties)
myButton.setText("Hello World!");
// attach an action to the button's "press" event (use jQuery to fade out the button)
myButton.attachPress(function() {
$("#btn").fadeOut()
});
// place the button into the HTML element defined below
myButton.placeAt("uiArea"); */