-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Giona Righini
committed
Oct 19, 2019
1 parent
496c469
commit 341f490
Showing
10 changed files
with
500 additions
and
497 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,51 @@ | ||
oApplication = { // Application is an object | ||
load: function (src, id, libs, theme, callback) { | ||
setTimeout(() => { | ||
this.loadSAPUI5(src, id, libs, theme, callback); | ||
}, 0); | ||
this.loadSAPUI5(src, id, libs, theme, callback) | ||
}, 0) | ||
}, | ||
loadSAPUI5: function (src, id, libs, theme, callback) { | ||
var s, r, t; | ||
r = false; | ||
s = document.createElement('script'); | ||
s.type = 'text/javascript'; | ||
s.src = src; | ||
s.id = id; | ||
s.setAttribute("data-sap-ui-libs", libs); | ||
s.setAttribute("data-sap-ui-theme", theme); | ||
s.setAttribute("data-sap-ui-resourceroots", '{"Wstat": ""}'); | ||
s.setAttribute("data-sap-ui-compatVersion", "edge"); | ||
var s, r, t | ||
r = false | ||
s = document.createElement('script') | ||
s.type = 'text/javascript' | ||
s.src = src | ||
s.id = id | ||
s.setAttribute("data-sap-ui-libs", libs) | ||
s.setAttribute("data-sap-ui-theme", theme) | ||
s.setAttribute("data-sap-ui-resourceroots", '{"Wstat": ""}') | ||
s.setAttribute("data-sap-ui-compatVersion", "edge") | ||
s.onload = s.onreadystatechange = function () { | ||
//console.log( this.readyState ); //uncomment this line to see which ready states are called. | ||
if (!r && (!this.readyState || this.readyState == 'complete')) { | ||
r = true; | ||
callback(); | ||
r = true | ||
callback() | ||
} | ||
}; | ||
t = document.getElementsByTagName('script')[0]; | ||
t.parentElement.insertBefore(s, t); | ||
} | ||
t = document.getElementsByTagName('script')[0] | ||
t.parentElement.insertBefore(s, t) | ||
}, | ||
onSAPUI5Loaded: function () { | ||
var shell = oApplication.initializeUI5(); | ||
var shell = oApplication.initializeUI5() | ||
$("#fade").fadeOut("slow", function () { | ||
$("#content").empty(); | ||
$("#content").removeAttr('style'); | ||
$(".title").fadeIn("slow"); | ||
shell.placeAt("content"); | ||
$("#content").empty() | ||
$("#content").removeAttr('style') | ||
$(".title").fadeIn("slow") | ||
shell.placeAt("content") | ||
//$(this).fadeIn("slow"); | ||
}); | ||
}) | ||
}, | ||
initializeUI5: function () { | ||
var shell; | ||
var shell | ||
sap.ui.getCore().attachInit(function () { | ||
shell = new sap.m.Shell({ | ||
app: new sap.ui.core.ComponentContainer({ | ||
height: "100%", | ||
name: "Wstat", | ||
componentCreated: function () {} | ||
}) | ||
}); | ||
}); | ||
return shell; | ||
}) | ||
}) | ||
return shell | ||
} | ||
}; | ||
} |
Oops, something went wrong.