diff --git a/src/sap.m/test/sap/m/demokit/docuindex.json b/src/sap.m/test/sap/m/demokit/docuindex.json index f439b57b5a5b..d7c62a9c0bed 100644 --- a/src/sap.m/test/sap/m/demokit/docuindex.json +++ b/src/sap.m/test/sap/m/demokit/docuindex.json @@ -97,11 +97,11 @@ "icon": "learning-assistant", "text": "Walkthrough", "desc": "Created with the 'Walkthrough' tutorial, showing all major development paradigms", - "ref" : "test-resources/sap/m/demokit/tutorial/walkthrough/38/webapp/test/mockServer.html", + "ref" : "test-resources/sap/m/demokit/tutorial/walkthrough/37/webapp/test/mockServer.html", "links": { "View Tutorial": "#docs/guide/3da5f4be63264db99f2e5b04c5e853db.html", - "Run Integration Tests": "test-resources/sap/m/demokit/tutorial/walkthrough/38/webapp/test/integration/opaTests.qunit.html", - "Run Unit Tests": "test-resources/sap/m/demokit/tutorial/walkthrough/38/webapp/test/unit/unitTests.qunit.html" + "Run Integration Tests": "test-resources/sap/m/demokit/tutorial/walkthrough/37/webapp/test/integration/opaTests.qunit.html", + "Run Unit Tests": "test-resources/sap/m/demokit/tutorial/walkthrough/37/webapp/test/unit/unitTests.qunit.html" }, "category": "Tutorial", "config": "test-resources/sap/m/demokit/tutorial/walkthrough/demoapp.json" @@ -1568,7 +1568,6 @@ "Dialogs and Fragments", "Fragment Callbacks", "Icons", - "Reuse Dialogs", "Aggregation Binding", "Data Types", "Expression Binding", diff --git a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/02/webapp/index.html b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/02/webapp/index.html index 0150d4120875..a79f6816f7dc 100644 --- a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/02/webapp/index.html +++ b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/02/webapp/index.html @@ -5,7 +5,7 @@ SAPUI5 Walkthrough + + + + + + + + + + + + +
+
+ + diff --git a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/38/webapp/test/unit/unitTests.qunit.js b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/27/webapp/test/unit/unitTests.qunit.js similarity index 100% rename from src/sap.m/test/sap/m/demokit/tutorial/walkthrough/38/webapp/test/unit/unitTests.qunit.js rename to src/sap.m/test/sap/m/demokit/tutorial/walkthrough/27/webapp/test/unit/unitTests.qunit.js diff --git a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/27/webapp/view/HelloPanel.view.xml b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/27/webapp/view/HelloPanel.view.xml index fb38371c2d3d..a4da35ae2885 100644 --- a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/27/webapp/view/HelloPanel.view.xml +++ b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/27/webapp/view/HelloPanel.view.xml @@ -5,7 +5,7 @@ + width="auto">
"); } }); diff --git a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/33/webapp/controller/App.controller.js b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/33/webapp/controller/App.controller.js index 82e5e3ea0d1b..80f7ab049755 100644 --- a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/33/webapp/controller/App.controller.js +++ b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/33/webapp/controller/App.controller.js @@ -5,9 +5,6 @@ sap.ui.define([ return Controller.extend("sap.ui.demo.walkthrough.controller.App", { - onOpenDialog : function () { - this.getOwnerComponent().openHelloDialog(); - } }); }); \ No newline at end of file diff --git a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/33/webapp/controller/Detail.controller.js b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/33/webapp/controller/Detail.controller.js index 73a00b427c1c..dbdee1e4559b 100644 --- a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/33/webapp/controller/Detail.controller.js +++ b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/33/webapp/controller/Detail.controller.js @@ -1,7 +1,8 @@ sap.ui.define([ "sap/ui/core/mvc/Controller", - "sap/ui/core/routing/History" -], function (Controller, History) { + "sap/ui/core/routing/History", + "sap/m/MessageToast" +], function (Controller, History, MessageToast) { "use strict"; return Controller.extend("sap.ui.demo.walkthrough.controller.Detail", { @@ -12,6 +13,7 @@ sap.ui.define([ }, _onObjectMatched: function (oEvent) { + this.byId("rating").reset(); this.getView().bindElement({ path: "/" + window.decodeURIComponent(oEvent.getParameter("arguments").invoicePath), model: "invoice" @@ -28,6 +30,13 @@ sap.ui.define([ var oRouter = this.getOwnerComponent().getRouter(); oRouter.navTo("overview", {}, true); } + }, + + onRatingChange: function (oEvent) { + var fValue = oEvent.getParameter("value"); + var oResourceBundle = this.getView().getModel("i18n").getResourceBundle(); + + MessageToast.show(oResourceBundle.getText("ratingConfirmation", [fValue])); } }); }); \ No newline at end of file diff --git a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/33/webapp/controller/HelloDialog.js b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/33/webapp/controller/HelloDialog.js deleted file mode 100644 index ed26bc10184b..000000000000 --- a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/33/webapp/controller/HelloDialog.js +++ /dev/null @@ -1,45 +0,0 @@ -sap.ui.define([ - "sap/ui/base/ManagedObject", - "sap/ui/core/Fragment" -], function (ManagedObject, Fragment) { - "use strict"; - - return ManagedObject.extend("sap.ui.demo.walkthrough.controller.HelloDialog", { - - constructor : function (oView) { - this._oView = oView; - }, - - exit : function () { - delete this._oView; - }, - - open : function () { - var oView = this._oView; - - // create dialog lazily - if (!this.pDialog) { - var oFragmentController = { - onCloseDialog : function () { - oView.byId("helloDialog").close(); - } - }; - // load asynchronous XML fragment - this.pDialog = Fragment.load({ - id: oView.getId(), - name: "sap.ui.demo.walkthrough.view.HelloDialog", - controller: oFragmentController - }).then(function (oDialog) { - // connect dialog to the root view of this component (models, lifecycle) - oView.addDependent(oDialog); - return oDialog; - }); - } - this.pDialog.then(function(oDialog) { - oDialog.open(); - }); - } - - }); - -}); \ No newline at end of file diff --git a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/33/webapp/controller/HelloPanel.controller.js b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/33/webapp/controller/HelloPanel.controller.js index 362ba5a0a55b..45c0aa4b3112 100644 --- a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/33/webapp/controller/HelloPanel.controller.js +++ b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/33/webapp/controller/HelloPanel.controller.js @@ -17,7 +17,22 @@ sap.ui.define([ }, onOpenDialog : function () { - this.getOwnerComponent().openHelloDialog(); + // create dialog lazily + if (!this.pDialog) { + this.pDialog = this.loadFragment({ + name: "sap.ui.demo.walkthrough.view.HelloDialog" + }); + } + + this.pDialog.then(function(oDialog) { + oDialog.open(); + }); + }, + + onCloseDialog : function () { + // note: We don't need to chain to the pDialog promise, since this event-handler + // is only called from within the loaded dialog itself. + this.byId("helloDialog").close(); } }); diff --git a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/33/webapp/css/style.css b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/33/webapp/css/style.css index 9cc474bfde57..f72e069aa015 100644 --- a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/33/webapp/css/style.css +++ b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/33/webapp/css/style.css @@ -10,3 +10,12 @@ html[dir="rtl"] .myAppDemoWT .myCustomButton.sapMBtn { display: inline-block; font-weight: bold; } + +/* ProductRating */ +.myAppDemoWTProductRating { + padding: 0.75rem; +} + +.myAppDemoWTProductRating .sapMRI { + vertical-align: initial; +} diff --git a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/33/webapp/i18n/i18n.properties b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/33/webapp/i18n/i18n.properties index 175324ab16b1..bd1666affbc8 100644 --- a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/33/webapp/i18n/i18n.properties +++ b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/33/webapp/i18n/i18n.properties @@ -18,3 +18,10 @@ invoiceStatusC=Done # Detail Page detailPageTitle=SAPUI5 Walkthrough - Details +ratingConfirmation=You have rated this product with {0} stars + +# Product Rating +productRatingLabelInitial=Please rate this product +productRatingLabelIndicator=Your rating: {0} out of {1} +productRatingLabelFinal=Thank you for your rating! +productRatingButton=Rate diff --git a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/33/webapp/index.html b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/33/webapp/index.html index e688fcbf5ea2..1c2ad2d573e0 100644 --- a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/33/webapp/index.html +++ b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/33/webapp/index.html @@ -6,7 +6,7 @@ SAPUI5 Walkthrough - + - - + + diff --git a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/33/webapp/test/mockServer.html b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/33/webapp/test/mockServer.html index 9ec2ba03fad6..7ceb29ab9144 100644 --- a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/33/webapp/test/mockServer.html +++ b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/33/webapp/test/mockServer.html @@ -6,7 +6,7 @@ SAPUI5 Walkthrough - + - - - - - + + + + + diff --git a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/33/webapp/view/Detail.view.xml b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/33/webapp/view/Detail.view.xml index ee5105e877e9..e922e1e1ef1b 100644 --- a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/33/webapp/view/Detail.view.xml +++ b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/33/webapp/view/Detail.view.xml @@ -1,7 +1,8 @@ + xmlns:mvc="sap.ui.core.mvc" + xmlns:wt="sap.ui.demo.walkthrough.control"> + diff --git a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/34/Component.js b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/34/Component.js index 2bb90bfd5571..05967a35a8e1 100644 --- a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/34/Component.js +++ b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/34/Component.js @@ -13,7 +13,6 @@ sap.ui.define(['sap/ui/core/UIComponent'], "webapp/control/ProductRating.js", "webapp/controller/App.controller.js", "webapp/controller/Detail.controller.js", - "webapp/controller/HelloDialog.js", "webapp/controller/HelloPanel.controller.js", "webapp/controller/InvoiceList.controller.js", "webapp/css/style.css", diff --git a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/34/package.json b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/34/package.json index 2118497e0ac3..5b0162a64385 100644 --- a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/34/package.json +++ b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/34/package.json @@ -4,9 +4,11 @@ "version": "1.0.0", "author": "SAP SE", "description": "UI5 Demo App - Walkthrough Tutorial", - "dependencies": { - "@openui5/sap.m": "^1", - "@openui5/sap.ui.core": "^1", - "@openui5/themelib_sap_fiori_3": "^1" + "scripts": { + "start": "ui5 serve", + "build": "ui5 build" + }, + "devDependencies": { + "@ui5/cli": "^2.0.0" } -} +} \ No newline at end of file diff --git a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/34/ui5.yaml b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/34/ui5.yaml index 316df920c567..3b8ea0568c4a 100644 --- a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/34/ui5.yaml +++ b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/34/ui5.yaml @@ -1,4 +1,11 @@ -specVersion: '0.1' +specVersion: '2.5' metadata: name: WalkthroughTutorial type: application +framework: + name: OpenUI5 + version: 1.93.0 + libraries: + - name: sap.ui.core + - name: sap.m + - name: themelib_sap_fiori_3 \ No newline at end of file diff --git a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/34/webapp/Component.js b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/34/webapp/Component.js index f86631ef1854..80c943b4be2a 100644 --- a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/34/webapp/Component.js +++ b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/34/webapp/Component.js @@ -1,8 +1,7 @@ sap.ui.define([ "sap/ui/core/UIComponent", - "sap/ui/model/json/JSONModel", - "./controller/HelloDialog" -], function (UIComponent, JSONModel, HelloDialog) { + "sap/ui/model/json/JSONModel" +], function (UIComponent, JSONModel) { "use strict"; return UIComponent.extend("sap.ui.demo.walkthrough.Component", { @@ -24,27 +23,9 @@ sap.ui.define([ }; var oModel = new JSONModel(oData); this.setModel(oModel); - - // set dialog - this.rootControlLoaded().then(function() { - this._helloDialog = new HelloDialog(this.getRootControl()); - }.bind(this)); - // create the views based on the url/hash this.getRouter().initialize(); - }, - - exit : function () { - if (this._helloDialog) { - this._helloDialog.destroy(); - delete this._helloDialog; - } - }, - - openHelloDialog : function () { - this._helloDialog.open(); } - }); }); \ No newline at end of file diff --git a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/34/webapp/controller/App.controller.js b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/34/webapp/controller/App.controller.js index 82e5e3ea0d1b..80f7ab049755 100644 --- a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/34/webapp/controller/App.controller.js +++ b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/34/webapp/controller/App.controller.js @@ -5,9 +5,6 @@ sap.ui.define([ return Controller.extend("sap.ui.demo.walkthrough.controller.App", { - onOpenDialog : function () { - this.getOwnerComponent().openHelloDialog(); - } }); }); \ No newline at end of file diff --git a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/34/webapp/controller/HelloDialog.js b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/34/webapp/controller/HelloDialog.js deleted file mode 100644 index ed26bc10184b..000000000000 --- a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/34/webapp/controller/HelloDialog.js +++ /dev/null @@ -1,45 +0,0 @@ -sap.ui.define([ - "sap/ui/base/ManagedObject", - "sap/ui/core/Fragment" -], function (ManagedObject, Fragment) { - "use strict"; - - return ManagedObject.extend("sap.ui.demo.walkthrough.controller.HelloDialog", { - - constructor : function (oView) { - this._oView = oView; - }, - - exit : function () { - delete this._oView; - }, - - open : function () { - var oView = this._oView; - - // create dialog lazily - if (!this.pDialog) { - var oFragmentController = { - onCloseDialog : function () { - oView.byId("helloDialog").close(); - } - }; - // load asynchronous XML fragment - this.pDialog = Fragment.load({ - id: oView.getId(), - name: "sap.ui.demo.walkthrough.view.HelloDialog", - controller: oFragmentController - }).then(function (oDialog) { - // connect dialog to the root view of this component (models, lifecycle) - oView.addDependent(oDialog); - return oDialog; - }); - } - this.pDialog.then(function(oDialog) { - oDialog.open(); - }); - } - - }); - -}); \ No newline at end of file diff --git a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/34/webapp/controller/HelloPanel.controller.js b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/34/webapp/controller/HelloPanel.controller.js index 362ba5a0a55b..45c0aa4b3112 100644 --- a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/34/webapp/controller/HelloPanel.controller.js +++ b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/34/webapp/controller/HelloPanel.controller.js @@ -17,7 +17,22 @@ sap.ui.define([ }, onOpenDialog : function () { - this.getOwnerComponent().openHelloDialog(); + // create dialog lazily + if (!this.pDialog) { + this.pDialog = this.loadFragment({ + name: "sap.ui.demo.walkthrough.view.HelloDialog" + }); + } + + this.pDialog.then(function(oDialog) { + oDialog.open(); + }); + }, + + onCloseDialog : function () { + // note: We don't need to chain to the pDialog promise, since this event-handler + // is only called from within the loaded dialog itself. + this.byId("helloDialog").close(); } }); diff --git a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/34/webapp/i18n/i18n.properties b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/34/webapp/i18n/i18n.properties index bd1666affbc8..ac5d126c083d 100644 --- a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/34/webapp/i18n/i18n.properties +++ b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/34/webapp/i18n/i18n.properties @@ -15,6 +15,11 @@ invoiceListTitle=Invoices invoiceStatusA=New invoiceStatusB=In Progress invoiceStatusC=Done +columnQuantity=Quantity +columnName=Name +columnSupplier=Supplier +columnStatus=Status +columnPrice=Price # Detail Page detailPageTitle=SAPUI5 Walkthrough - Details diff --git a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/34/webapp/index.html b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/34/webapp/index.html index e688fcbf5ea2..1c2ad2d573e0 100644 --- a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/34/webapp/index.html +++ b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/34/webapp/index.html @@ -6,7 +6,7 @@ SAPUI5 Walkthrough - + - - + + diff --git a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/34/webapp/test/mockServer.html b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/34/webapp/test/mockServer.html index 9ec2ba03fad6..7ceb29ab9144 100644 --- a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/34/webapp/test/mockServer.html +++ b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/34/webapp/test/mockServer.html @@ -6,7 +6,7 @@ SAPUI5 Walkthrough - + - - - - - + + + + + diff --git a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/34/webapp/view/InvoiceList.view.xml b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/34/webapp/view/InvoiceList.view.xml index 10f99992b79c..46f7bba1c33a 100644 --- a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/34/webapp/view/InvoiceList.view.xml +++ b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/34/webapp/view/InvoiceList.view.xml @@ -2,7 +2,7 @@ controllerName="sap.ui.demo.walkthrough.controller.InvoiceList" xmlns="sap.m" xmlns:mvc="sap.ui.core.mvc"> - + + + + + + + + + + + + + + + + + - - - Quantity}" emphasized="false"/> + + - - + + + + - - + + \ No newline at end of file diff --git a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/Component.js b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/Component.js index a63ce6a71540..187167b5ecf4 100644 --- a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/Component.js +++ b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/Component.js @@ -13,7 +13,6 @@ sap.ui.define(['sap/ui/core/UIComponent'], "webapp/control/ProductRating.js", "webapp/controller/App.controller.js", "webapp/controller/Detail.controller.js", - "webapp/controller/HelloDialog.js", "webapp/controller/HelloPanel.controller.js", "webapp/controller/InvoiceList.controller.js", "webapp/css/style.css", diff --git a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/package.json b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/package.json index 2118497e0ac3..5b0162a64385 100644 --- a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/package.json +++ b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/package.json @@ -4,9 +4,11 @@ "version": "1.0.0", "author": "SAP SE", "description": "UI5 Demo App - Walkthrough Tutorial", - "dependencies": { - "@openui5/sap.m": "^1", - "@openui5/sap.ui.core": "^1", - "@openui5/themelib_sap_fiori_3": "^1" + "scripts": { + "start": "ui5 serve", + "build": "ui5 build" + }, + "devDependencies": { + "@ui5/cli": "^2.0.0" } -} +} \ No newline at end of file diff --git a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/ui5.yaml b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/ui5.yaml index 316df920c567..3b8ea0568c4a 100644 --- a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/ui5.yaml +++ b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/ui5.yaml @@ -1,4 +1,11 @@ -specVersion: '0.1' +specVersion: '2.5' metadata: name: WalkthroughTutorial type: application +framework: + name: OpenUI5 + version: 1.93.0 + libraries: + - name: sap.ui.core + - name: sap.m + - name: themelib_sap_fiori_3 \ No newline at end of file diff --git a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/webapp/Component.js b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/webapp/Component.js index f86631ef1854..2474fa23b54a 100644 --- a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/webapp/Component.js +++ b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/webapp/Component.js @@ -1,8 +1,8 @@ sap.ui.define([ "sap/ui/core/UIComponent", "sap/ui/model/json/JSONModel", - "./controller/HelloDialog" -], function (UIComponent, JSONModel, HelloDialog) { + "sap/ui/Device" +], function (UIComponent, JSONModel, Device) { "use strict"; return UIComponent.extend("sap.ui.demo.walkthrough.Component", { @@ -25,26 +25,13 @@ sap.ui.define([ var oModel = new JSONModel(oData); this.setModel(oModel); - // set dialog - this.rootControlLoaded().then(function() { - this._helloDialog = new HelloDialog(this.getRootControl()); - }.bind(this)); - + // set device model + var oDeviceModel = new JSONModel(Device); + oDeviceModel.setDefaultBindingMode("OneWay"); + this.setModel(oDeviceModel, "device"); // create the views based on the url/hash this.getRouter().initialize(); - }, - - exit : function () { - if (this._helloDialog) { - this._helloDialog.destroy(); - delete this._helloDialog; - } - }, - - openHelloDialog : function () { - this._helloDialog.open(); } - }); }); \ No newline at end of file diff --git a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/webapp/controller/App.controller.js b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/webapp/controller/App.controller.js index 82e5e3ea0d1b..80f7ab049755 100644 --- a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/webapp/controller/App.controller.js +++ b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/webapp/controller/App.controller.js @@ -5,9 +5,6 @@ sap.ui.define([ return Controller.extend("sap.ui.demo.walkthrough.controller.App", { - onOpenDialog : function () { - this.getOwnerComponent().openHelloDialog(); - } }); }); \ No newline at end of file diff --git a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/webapp/controller/Detail.controller.js b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/webapp/controller/Detail.controller.js index dbdee1e4559b..c1f57bd1d3b9 100644 --- a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/webapp/controller/Detail.controller.js +++ b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/webapp/controller/Detail.controller.js @@ -1,13 +1,19 @@ sap.ui.define([ "sap/ui/core/mvc/Controller", "sap/ui/core/routing/History", - "sap/m/MessageToast" -], function (Controller, History, MessageToast) { + "sap/m/MessageToast", + "sap/ui/model/json/JSONModel" +], function (Controller, History, MessageToast, JSONModel) { "use strict"; return Controller.extend("sap.ui.demo.walkthrough.controller.Detail", { onInit: function () { + var oViewModel = new JSONModel({ + currency: "EUR" + }); + this.getView().setModel(oViewModel, "view"); + var oRouter = this.getOwnerComponent().getRouter(); oRouter.getRoute("detail").attachPatternMatched(this._onObjectMatched, this); }, diff --git a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/webapp/controller/HelloDialog.js b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/webapp/controller/HelloDialog.js deleted file mode 100644 index ed26bc10184b..000000000000 --- a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/webapp/controller/HelloDialog.js +++ /dev/null @@ -1,45 +0,0 @@ -sap.ui.define([ - "sap/ui/base/ManagedObject", - "sap/ui/core/Fragment" -], function (ManagedObject, Fragment) { - "use strict"; - - return ManagedObject.extend("sap.ui.demo.walkthrough.controller.HelloDialog", { - - constructor : function (oView) { - this._oView = oView; - }, - - exit : function () { - delete this._oView; - }, - - open : function () { - var oView = this._oView; - - // create dialog lazily - if (!this.pDialog) { - var oFragmentController = { - onCloseDialog : function () { - oView.byId("helloDialog").close(); - } - }; - // load asynchronous XML fragment - this.pDialog = Fragment.load({ - id: oView.getId(), - name: "sap.ui.demo.walkthrough.view.HelloDialog", - controller: oFragmentController - }).then(function (oDialog) { - // connect dialog to the root view of this component (models, lifecycle) - oView.addDependent(oDialog); - return oDialog; - }); - } - this.pDialog.then(function(oDialog) { - oDialog.open(); - }); - } - - }); - -}); \ No newline at end of file diff --git a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/webapp/controller/HelloPanel.controller.js b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/webapp/controller/HelloPanel.controller.js index 362ba5a0a55b..45c0aa4b3112 100644 --- a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/webapp/controller/HelloPanel.controller.js +++ b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/webapp/controller/HelloPanel.controller.js @@ -17,7 +17,22 @@ sap.ui.define([ }, onOpenDialog : function () { - this.getOwnerComponent().openHelloDialog(); + // create dialog lazily + if (!this.pDialog) { + this.pDialog = this.loadFragment({ + name: "sap.ui.demo.walkthrough.view.HelloDialog" + }); + } + + this.pDialog.then(function(oDialog) { + oDialog.open(); + }); + }, + + onCloseDialog : function () { + // note: We don't need to chain to the pDialog promise, since this event-handler + // is only called from within the loaded dialog itself. + this.byId("helloDialog").close(); } }); diff --git a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/webapp/css/style.css b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/webapp/css/style.css index 3bf60de42e83..f72e069aa015 100644 --- a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/webapp/css/style.css +++ b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/webapp/css/style.css @@ -6,7 +6,6 @@ html[dir="rtl"] .myAppDemoWT .myCustomButton.sapMBtn { margin-left: 0.125rem } - .myAppDemoWT .myCustomText { display: inline-block; font-weight: bold; diff --git a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/webapp/i18n/i18n.properties b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/webapp/i18n/i18n.properties index ac5d126c083d..93474c9553ba 100644 --- a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/webapp/i18n/i18n.properties +++ b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/webapp/i18n/i18n.properties @@ -24,6 +24,8 @@ columnPrice=Price # Detail Page detailPageTitle=SAPUI5 Walkthrough - Details ratingConfirmation=You have rated this product with {0} stars +dateTitle=Order date +quantityTitle=Quantity # Product Rating productRatingLabelInitial=Please rate this product diff --git a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/webapp/index.html b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/webapp/index.html index e688fcbf5ea2..1c2ad2d573e0 100644 --- a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/webapp/index.html +++ b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/webapp/index.html @@ -6,7 +6,7 @@ SAPUI5 Walkthrough - + - - + + diff --git a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/webapp/test/mockServer.html b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/webapp/test/mockServer.html index 9ec2ba03fad6..7ceb29ab9144 100644 --- a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/webapp/test/mockServer.html +++ b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/webapp/test/mockServer.html @@ -6,7 +6,7 @@ SAPUI5 Walkthrough - + - - - - - + + + + + diff --git a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/webapp/view/Detail.view.xml b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/webapp/view/Detail.view.xml index e922e1e1ef1b..0b7b38f6451b 100644 --- a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/webapp/view/Detail.view.xml +++ b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/webapp/view/Detail.view.xml @@ -8,8 +8,33 @@ showNavButton="true" navButtonPress=".onNavBack"> + title="{invoice>ProductName}"> + + + + + + diff --git a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/webapp/view/HelloPanel.view.xml b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/webapp/view/HelloPanel.view.xml index a4da35ae2885..ed0a46e9c7b3 100644 --- a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/webapp/view/HelloPanel.view.xml +++ b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/35/webapp/view/HelloPanel.view.xml @@ -5,14 +5,16 @@ + width="auto" + expandable="{device>/system/phone}" + expanded="{= !${device>/system/phone} }">
"); } }); diff --git a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/37/webapp/controller/App.controller.js b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/37/webapp/controller/App.controller.js index 1c660efe75ea..d9d161f3e04b 100644 --- a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/37/webapp/controller/App.controller.js +++ b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/37/webapp/controller/App.controller.js @@ -7,11 +7,8 @@ sap.ui.define([ onInit: function () { this.getView().addStyleClass(this.getOwnerComponent().getContentDensityClass()); - }, - - onOpenDialog : function () { - this.getOwnerComponent().openHelloDialog(); } + }); }); \ No newline at end of file diff --git a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/37/webapp/controller/HelloPanel.controller.js b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/37/webapp/controller/HelloPanel.controller.js index 362ba5a0a55b..45c0aa4b3112 100644 --- a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/37/webapp/controller/HelloPanel.controller.js +++ b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/37/webapp/controller/HelloPanel.controller.js @@ -17,7 +17,22 @@ sap.ui.define([ }, onOpenDialog : function () { - this.getOwnerComponent().openHelloDialog(); + // create dialog lazily + if (!this.pDialog) { + this.pDialog = this.loadFragment({ + name: "sap.ui.demo.walkthrough.view.HelloDialog" + }); + } + + this.pDialog.then(function(oDialog) { + oDialog.open(); + }); + }, + + onCloseDialog : function () { + // note: We don't need to chain to the pDialog promise, since this event-handler + // is only called from within the loaded dialog itself. + this.byId("helloDialog").close(); } }); diff --git a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/37/webapp/i18n/i18n.properties b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/37/webapp/i18n/i18n.properties index 93474c9553ba..82b61872f068 100644 --- a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/37/webapp/i18n/i18n.properties +++ b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/37/webapp/i18n/i18n.properties @@ -26,9 +26,27 @@ detailPageTitle=SAPUI5 Walkthrough - Details ratingConfirmation=You have rated this product with {0} stars dateTitle=Order date quantityTitle=Quantity +Detail_rootLabel=Detail Page +Detail_headerLabel=Header +Detail_contentLabel=Page Content +ratingTitle=Rate the Product # Product Rating +ratingIndicatorLabel=Rating indicator +ratingIndicatorDescription=Rate this product +rateButtonLabel=Button +rateButtonDescription=Submit your rating productRatingLabelInitial=Please rate this product productRatingLabelIndicator=Your rating: {0} out of {1} productRatingLabelFinal=Thank you for your rating! productRatingButton=Rate + +#Overview Page +Overview_rootLabel=Overview Page +Overview_headerLabel=Header +Overview_contentLabel=Page Content +Detail_rootLabel=Detail Page +Detail_headerLabel=Header +Detail_contentLabel=Page Content +ratingTitle=Rate the Product + diff --git a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/37/webapp/index.html b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/37/webapp/index.html index e688fcbf5ea2..1c2ad2d573e0 100644 --- a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/37/webapp/index.html +++ b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/37/webapp/index.html @@ -6,7 +6,7 @@ SAPUI5 Walkthrough - + - - + + @@ -27,4 +27,4 @@
- + \ No newline at end of file diff --git a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/37/webapp/test/mockServer.html b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/37/webapp/test/mockServer.html index 9ec2ba03fad6..7ceb29ab9144 100644 --- a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/37/webapp/test/mockServer.html +++ b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/37/webapp/test/mockServer.html @@ -6,7 +6,7 @@ SAPUI5 Walkthrough - + - - - - - + + + + + diff --git a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/37/webapp/view/Detail.view.xml b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/37/webapp/view/Detail.view.xml index 0b7b38f6451b..9912705ba18f 100644 --- a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/37/webapp/view/Detail.view.xml +++ b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/37/webapp/view/Detail.view.xml @@ -7,6 +7,15 @@ title="{i18n>detailPageTitle}" showNavButton="true" navButtonPress=".onNavBack"> + + + - + + + - diff --git a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/37/webapp/view/HelloDialog.fragment.xml b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/37/webapp/view/HelloDialog.fragment.xml index cbf190b98590..856b112bf490 100644 --- a/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/37/webapp/view/HelloDialog.fragment.xml +++ b/src/sap.m/test/sap/m/demokit/tutorial/walkthrough/37/webapp/view/HelloDialog.fragment.xml @@ -5,10 +5,12 @@ id="helloDialog" title="Hello {/recipient/name}"> - + + +