diff --git a/.gitignore b/.gitignore index 40b878d..08da59f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -node_modules/ \ No newline at end of file +node_modules/ +.ssh \ No newline at end of file diff --git a/webapp/Component-preload.js b/webapp/Component-preload.js new file mode 100644 index 0000000..e69de29 diff --git a/webapp/controller/BaseController.js b/webapp/controller/BaseController.js index c1b5e76..7b0e834 100644 --- a/webapp/controller/BaseController.js +++ b/webapp/controller/BaseController.js @@ -1,17 +1,13 @@ -sap.ui.define([ - "sap/ui/core/mvc/Controller" -], function (Controller) { +sap.ui.define(["sap/ui/core/mvc/Controller","sap/ui/core/UIComponent"], function (Controller,UIComponent) { "use strict"; return Controller.extend("ui5.challenge.controller.BaseController", { navTo: function (psTarget, pmParameters, pbReplace) { - this.getRouter().navTo(psTarget, pmParameters, pbReplace); + const r = this.getRouter() + r.navTo(psTarget, pmParameters, pbReplace); }, getRouter: function () { return UIComponent.getRouterFor(this); - }, - onPress: function () { - } }); }); diff --git a/webapp/controller/DetailController.controller.js b/webapp/controller/DetailController.controller.js new file mode 100644 index 0000000..378df73 --- /dev/null +++ b/webapp/controller/DetailController.controller.js @@ -0,0 +1,17 @@ +sap.ui.define(["./BaseController","sap/m/Button","sap/m/Dialog"], function (Controller,Button,Dialog) { + "use strict"; + + return Controller.extend("ui5.challenge.controller.DetailController", { + showDialog: function () { + if (!this.dialog) { + this.dialog = new Dialog({ + id: "myDialog", + title:"dialog", + beginButton:new Button({text:"ok",press:()=>this.dialog.close()}) + }) + this.getView().addDependent(this.dialog) + } + this.dialog.open() + } + }); +}); \ No newline at end of file diff --git a/webapp/controller/MainController.controller.js b/webapp/controller/MainController.controller.js new file mode 100644 index 0000000..8c9a07d --- /dev/null +++ b/webapp/controller/MainController.controller.js @@ -0,0 +1,9 @@ +sap.ui.define([ "./BaseController" ], function (Controller) { + "use strict"; + + return Controller.extend("ui5.challenge.controller.MainController", { + onPress: function () { + this.navTo("Detail") + } + }); +}); \ No newline at end of file diff --git a/webapp/i18n/i18n.properties b/webapp/i18n/i18n.properties index e69de29..ed59041 100644 --- a/webapp/i18n/i18n.properties +++ b/webapp/i18n/i18n.properties @@ -0,0 +1,3 @@ +appTitle=ui5-challenge +appDescription=UI5 challenge app +mainTitleText=wdi5 rocks \ No newline at end of file diff --git a/webapp/i18n/i18n_en.properties b/webapp/i18n/i18n_en.properties new file mode 100644 index 0000000..1514bd1 --- /dev/null +++ b/webapp/i18n/i18n_en.properties @@ -0,0 +1,2 @@ +appTitle=ui5-challenge +appDescription=UI5 challenge app \ No newline at end of file diff --git a/webapp/i18n/i18n_en_GB.properties b/webapp/i18n/i18n_en_GB.properties new file mode 100644 index 0000000..1514bd1 --- /dev/null +++ b/webapp/i18n/i18n_en_GB.properties @@ -0,0 +1,2 @@ +appTitle=ui5-challenge +appDescription=UI5 challenge app \ No newline at end of file diff --git a/webapp/index.html b/webapp/index.html index 01c1bb6..d3222cd 100644 --- a/webapp/index.html +++ b/webapp/index.html @@ -1,28 +1,19 @@ +
-