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
Eugene Shen
todomvc
Commits
828b6d1c
Commit
828b6d1c
authored
Oct 11, 2015
by
Pascal Hartig
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1466 from davidrunger/remove-unneeded-logic
Backbone: remove unneeded logic in todo View
parents
1567e60e
9e16caf8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
9 deletions
+0
-9
examples/backbone/js/views/todo-view.js
examples/backbone/js/views/todo-view.js
+0
-9
No files found.
examples/backbone/js/views/todo-view.js
View file @
828b6d1c
...
@@ -91,15 +91,6 @@ var app = app || {};
...
@@ -91,15 +91,6 @@ var app = app || {};
if
(
trimmedValue
)
{
if
(
trimmedValue
)
{
this
.
model
.
save
({
title
:
trimmedValue
});
this
.
model
.
save
({
title
:
trimmedValue
});
if
(
value
!==
trimmedValue
)
{
// Model values changes consisting of whitespaces only are
// not causing change to be triggered Therefore we've to
// compare untrimmed version with a trimmed one to check
// whether anything changed
// And if yes, we've to trigger change event ourselves
this
.
model
.
trigger
(
'
change
'
);
}
}
else
{
}
else
{
this
.
clear
();
this
.
clear
();
}
}
...
...
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