Skip to content
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

eslint に怒られているところを修正した #66

Merged
merged 4 commits into from
Apr 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions ember/todo-app/app/components/todo-item/form-modal.js
Expand Up @@ -38,9 +38,10 @@ export default Component.extend({
},

save () {
this.item.save().then((response) => {
this.item.save().then(() => {
this.close();
}).catch(function (error) {
}).catch(function () {
alert('System Error!')
});
return false;
}
Expand Down
6 changes: 3 additions & 3 deletions ember/todo-app/app/controllers/todo-items.js
Expand Up @@ -49,14 +49,14 @@ export default Controller.extend({
this.set('hiddenCompleted', false);
} else { // to Hide
this.set('hidingCompleted', true);
const targetItems = $('.p-todo-item__completed');
const targetItems = this.element.querySelectorAll('.p-todo-item__completed');
const hidingClass = 'p-todo-item--hiding';

targetItems.addClass(hidingClass);
targetItems.forEach(item => item.classList.add(hidingClass));
later(() => {
this.set('hiddenCompleted', true);
this.set('hidingCompleted', false);
targetItems.removeClass(hidingClass);
targetItems.forEach(item => item.classList.remove(hidingClass));
}, 300);
}
},
Expand Down
4 changes: 2 additions & 2 deletions ember/todo-app/app/templates/components/todo-item.hbs
@@ -1,13 +1,13 @@
{{mg-checkbox checked=item.isCompleted click=(action "toggle")}}
{{#if item.body}}
<details class="p-todo-item__details">
<summary title="{{item.name}}" class="p-todo-item__name p-todo-item__name--summary">{{item.name}}</summary>
<summary title={{item.name}} class="p-todo-item__name p-todo-item__name--summary">{{item.name}}</summary>
<div class="p-todo-item__body">
{{item.body}}
</div>
</details>
{{else}}
<div title="{{item.name}}" class="p-todo-item__name">{{item.name}}</div>
<div title={{item.name}} class="p-todo-item__name">{{item.name}}</div>
{{/if}}
{{mg-button text="Edit" click=(action "edit")}}
{{mg-button text="Delete" isDanger=true click=(action "delete")}}
Expand Up @@ -10,7 +10,7 @@
</div>
<div class="form-group">
<label for="todo-item-form__body">Body</label>
{{textarea value=item.body id="todo-item-form__body" class='form-control'}}
{{textarea value=item.body id="todo-item-form__body" class="form-control"}}
</div>
{{/modal.body}}
{{#modal.footer}}
Expand Down
2 changes: 1 addition & 1 deletion ember/todo-app/app/templates/todo-items.hbs
Expand Up @@ -2,7 +2,7 @@
<div class="p-todo-list__actions">
{{mg-button text="Create" click=(action "build")}}
{{mg-button text="Delete Completed Items" disabled=hiddenOrHidingCompleted isDanger=true click=(action "deleteCompletedItems")}}
{{mg-toggle-switch label='Hide completed items?' offLabel='Show' onLabel='Hide' enabled=hiddenOrHidingCompleted click=(action "toggleHiddenCompletedItems")}}
{{mg-toggle-switch label="Hide completed items?" offLabel="Show" onLabel="Hide" enabled=hiddenOrHidingCompleted click=(action "toggleHiddenCompletedItems")}}
</div>
<ul class="p-todo-list">
{{#each listedTodoItems as |todoItem| }}
Expand Down