File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ sap.ui.define([
3838 /**
3939 * Removes all completed items from the todo list.
4040 */
41- clearCompleted ( ) {
41+ onClearCompleted ( ) {
4242 const oModel = this . getView ( ) . getModel ( ) ;
4343 const aTodos = oModel . getProperty ( "/todos" ) . map ( ( oTodo ) => Object . assign ( { } , oTodo ) ) ;
4444
Original file line number Diff line number Diff line change 55 "type" : " application"
66 },
77 "sap.ui5" : {
8+ "commands" : {
9+ "Clear" : {
10+ "shortcut" : " Ctrl+Y"
11+ }
12+ },
813 "dependencies" : {
914 "minUI5Version" : " 1.121.0" ,
1015 "libs" : {
Original file line number Diff line number Diff line change 11<mvc : View xmlns : mvc =" sap.ui.core.mvc" xmlns : core =" sap.ui.core" xmlns =" sap.m" xmlns : f =" sap.f" controllerName =" sap.ui.demo.todo.controller.App" displayBlock =" true" >
22 <App >
33 <Page >
4+ <dependents >
5+ <core : CommandExecution id =" CE_CLEAR_COMPLETED" command =" Clear" enabled =" true" execute =" .onClearCompleted" />
6+ </dependents >
47 <customHeader >
58 <f : ShellBar core : require =" { Helper: 'sap/ui/demo/todo/util/Helper' }" title =" {i18n>TITLE}" homeIcon =" {:= Helper.resolvePath('./img/logo_ui5.png') }" />
69 </customHeader >
3134 <SegmentedButtonItem text =" {i18n>LABEL_COMPLETED}" key =" completed" />
3235 </items >
3336 </SegmentedButton >
34- <Button id =" clearCompleted" enabled =" {/itemsRemovable}" icon =" sap-icon://delete" text =" {i18n>CLEAR_COMPLETED}" press =" .clearCompleted " />
37+ <Button id =" clearCompleted" enabled =" {/itemsRemovable}" icon =" sap-icon://delete" text =" {i18n>CLEAR_COMPLETED}" press =" cmd:Clear " />
3538 </OverflowToolbar >
3639 </headerToolbar >
3740 <infoToolbar >
6871 </items >
6972 </SegmentedButton >
7073 <ToolbarSpacer />
71- <Button id =" clearCompleted-footer" enabled =" {/itemsRemovable}" icon =" sap-icon://delete" text =" {i18n>CLEAR_COMPLETED}" press =" .clearCompleted " />
74+ <Button id =" clearCompleted-footer" enabled =" {/itemsRemovable}" icon =" sap-icon://delete" text =" {i18n>CLEAR_COMPLETED}" press =" cmd:Clear " />
7275 </OverflowToolbar >
7376 </footer >
7477
You can’t perform that action at this time.
0 commit comments