Commit 6d8bdfd4 authored by Andreas Kunz's avatar Andreas Kunz

SAPUI5: remove "completed todos" count

As per request in https://github.com/tastejs/todomvc/issues/1234
parent 08da3733
......@@ -138,10 +138,7 @@
clearCompleted = new sap.ui.commons.Button({
id: 'clear-completed',
lite: true,
text: {
path: '/todos/',
formatter: todo.formatters.completedTodoCountFormatter
},
text: 'Clear Completed',
visible: {
path: '/todos/',
formatter: todo.formatters.hasCompletedTodosFormatter
......
......@@ -25,18 +25,6 @@
return 'false';
},
// Counts the number of closed todos
completedTodoCountFormatter: function (aTodos) {
var numberOfCompletedItems = 0;
aTodos.forEach(function (todo) {
if (todo.done === true) {
numberOfCompletedItems++;
}
});
return 'Clear completed (' + numberOfCompletedItems + ')';
},
// Returns whether a completed todo is available
hasCompletedTodosFormatter: function (aTodos) {
return aTodos.some(function (element, index, array) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment