Commit 5ace27f1 authored by Arthur Verschaeve's avatar Arthur Verschaeve

Merge pull request #1327 from akudev/master

SAPUI5: remove "completed todos" count
parents 7cac72db 6d8bdfd4
......@@ -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