Skip to content

Commit

Permalink
no ";" - fix versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
Giona Righini committed Oct 19, 2019
1 parent 496c469 commit 341f490
Show file tree
Hide file tree
Showing 10 changed files with 500 additions and 497 deletions.
28 changes: 14 additions & 14 deletions Component.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sap.ui.define([
"Wstat/model/models",
"sap/ui/model/json/JSONModel"
], function (UIComponent, Device, models, JSONModel) {
"use strict";
"use strict"
return UIComponent.extend("Wstat.Component", {
metadata: {
//manifest: "json",
Expand Down Expand Up @@ -72,26 +72,26 @@ sap.ui.define([
*/
init: function () {

var mConfig = this.getMetadata().getConfig();
var mConfig = this.getMetadata().getConfig()
// set the i18n model
this.setModel(models.createResourceModel(mConfig.i18nBundle), "i18n");
this.setModel(models.createResourceModel(mConfig.i18nBundle), "i18n")
// call the base component's init function
jQuery.sap.require("jquery.sap.storage");
jQuery.sap.require("jquery.sap.storage")

sap.ui.getCore().getConfiguration().setLanguage("en");
sap.ui.getCore().getConfiguration().setLanguage("en")

var oModel = new sap.ui.model.json.JSONModel({});
var oModel = new sap.ui.model.json.JSONModel({})
//oModel.setSizeLimit(1000);
this.setModel(oModel);
this.setModel(oModel)

var oModelJSON = new sap.ui.model.json.JSONModel({});
oModelJSON.setSizeLimit(1000);
this.setModel(oModelJSON, "global");
var oModelJSON = new sap.ui.model.json.JSONModel({})
oModelJSON.setSizeLimit(1000)
this.setModel(oModelJSON, "global")

UIComponent.prototype.init.apply(this, arguments);
this.getRouter().initialize();
UIComponent.prototype.init.apply(this, arguments)
this.getRouter().initialize()
// create the views based on the url/hash

}
});
});
})
})
56 changes: 28 additions & 28 deletions application.js
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
}
};
}
Loading

0 comments on commit 341f490

Please sign in to comment.