Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
todomvc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sven Franck
todomvc
Commits
5ace27f1
Commit
5ace27f1
authored
Jun 01, 2015
by
Arthur Verschaeve
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1327 from akudev/master
SAPUI5: remove "completed todos" count
parents
7cac72db
6d8bdfd4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
16 deletions
+1
-16
examples/sapui5/js/todo/Todo.view.js
examples/sapui5/js/todo/Todo.view.js
+1
-4
examples/sapui5/js/todo/formatters.js
examples/sapui5/js/todo/formatters.js
+0
-12
No files found.
examples/sapui5/js/todo/Todo.view.js
View file @
5ace27f1
...
...
@@ -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
...
...
examples/sapui5/js/todo/formatters.js
View file @
5ace27f1
...
...
@@ -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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment