Skip to content

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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Conversation

eroslyakov
Copy link

No description provided.

</header>
<section class="todo-list">
<div class="tasks-container">
<!--<section class="task task-checked" id="idx-%ID%">
Copy link

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?

Copy link
Author

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

Copy link
Author

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()];
Copy link

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

Copy link
Author

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


// sort by deadline
sortByDeadline: function (deadline) {
var sortedArr = allTasks.filter(function (task) {
Copy link

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.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will)


// sort by done / undone
sortByDone: function (done) {
var sortedArr = allTasks.filter(function (task) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

Copy link
Author

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

deleteButton: 'task-delete',
checkButton: 'task-check',
tasksContainer: '.tasks-container',
sortDayBtn: '.sort-tomorrow',
Copy link

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

<span>deadline:</span>
<ul class="radio-wrapper">
<li>
<label><input type="radio" class="new-task__deadline" name="set-deadline" value="none">none</label>
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants