-
Notifications
You must be signed in to change notification settings - Fork 9
ToDo list app #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Roslyakov Evgeny/index.html
Outdated
</header> | ||
<section class="todo-list"> | ||
<div class="tasks-container"> | ||
<!--<section class="task task-checked" id="idx-%ID%"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need this commented code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
of course not, this is just for developing purposes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
must be deleted
id = (allTasks.length) ? allTasks[allTasks.length - 1].id + 1 : 0; | ||
|
||
// create the task date | ||
var thisMonth = months[(new Date()).getMonth()]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
normally we don't use 'this' in naming, not forbidden, just could be strange
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought that reserved words are not forbidden as parts of consistent names. I will be careful
Roslyakov Evgeny/main.js
Outdated
|
||
// sort by deadline | ||
sortByDeadline: function (deadline) { | ||
var sortedArr = allTasks.filter(function (task) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks more like filtering, not sorting. Please be careful with naming.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will)
Roslyakov Evgeny/main.js
Outdated
|
||
// sort by done / undone | ||
sortByDone: function (done) { | ||
var sortedArr = allTasks.filter(function (task) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will rename those functions
Roslyakov Evgeny/main.js
Outdated
deleteButton: 'task-delete', | ||
checkButton: 'task-check', | ||
tasksContainer: '.tasks-container', | ||
sortDayBtn: '.sort-tomorrow', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the same here and below
Roslyakov Evgeny/index.html
Outdated
<span>deadline:</span> | ||
<ul class="radio-wrapper"> | ||
<li> | ||
<label><input type="radio" class="new-task__deadline" name="set-deadline" value="none">none</label> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I so that this value is set as default in js part, what do you think about putting here checked attribute to show the user that it is a default?
No description provided.