From 87ab65361a03224f2c6e0931c4738edc0e87946c Mon Sep 17 00:00:00 2001 From: Florian Vogt Date: Wed, 16 Oct 2024 09:20:24 +0200 Subject: [PATCH] [DEMO] Use keyboard shortcuts --- webapp/controller/App.controller.js | 2 +- webapp/manifest.json | 5 +++++ webapp/view/App.view.xml | 7 +++++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/webapp/controller/App.controller.js b/webapp/controller/App.controller.js index b8ed5d0cc..4f4be48d3 100644 --- a/webapp/controller/App.controller.js +++ b/webapp/controller/App.controller.js @@ -38,7 +38,7 @@ sap.ui.define([ /** * Removes all completed items from the todo list. */ - clearCompleted() { + onClearCompleted() { const oModel = this.getView().getModel(); const aTodos = oModel.getProperty("/todos").map((oTodo) => Object.assign({}, oTodo)); diff --git a/webapp/manifest.json b/webapp/manifest.json index 1f6c7739a..224d30755 100644 --- a/webapp/manifest.json +++ b/webapp/manifest.json @@ -5,6 +5,11 @@ "type": "application" }, "sap.ui5": { + "commands": { + "Clear": { + "shortcut": "Ctrl+Y" + } + }, "dependencies": { "minUI5Version": "1.121.0", "libs": { diff --git a/webapp/view/App.view.xml b/webapp/view/App.view.xml index 9edb53710..e72a8ceb4 100644 --- a/webapp/view/App.view.xml +++ b/webapp/view/App.view.xml @@ -1,6 +1,9 @@ + + + @@ -31,7 +34,7 @@ -