Fix some lint errors.

This commit is contained in:
Lauri Ojansivu 2017-06-02 18:48:04 +03:00
parent 89537700e3
commit 3b6c1baff3
3 changed files with 68 additions and 67 deletions

View file

@ -1,72 +1,73 @@
BlazeComponent.extendComponent({ BlazeComponent.extendComponent({
editTitle(evt) { editTitle(evt) {
evt.preventDefault(); evt.preventDefault();
const newTitle = this.childComponents('inlinedForm')[0].getValue().trim(); const newTitle = this.childComponents('inlinedForm')[0].getValue().trim();
const list = this.currentData(); const list = this.currentData();
if (newTitle) { if (newTitle) {
list.rename(newTitle.trim()); list.rename(newTitle.trim());
} }
}, },
isWatching() { isWatching() {
const list = this.currentData(); const list = this.currentData();
return list.findWatcher(Meteor.userId()); return list.findWatcher(Meteor.userId());
}, },
limitToShowCardsCount() { limitToShowCardsCount() {
return Meteor.user().getLimitToShowCardsCount(); return Meteor.user().getLimitToShowCardsCount();
}, },
showCardsCountForList(count) { showCardsCountForList(count) {
return count > this.limitToShowCardsCount(); return count > this.limitToShowCardsCount();
}, },
events() { events() {
return [{ return [{
'click .js-open-list-menu': Popup.open('listAction'), 'click .js-open-list-menu': Popup.open('listAction'),
submit: this.editTitle, submit: this.editTitle,
}]; }];
}, },
}).register('listHeader'); }).register('listHeader');
Template.listActionPopup.helpers({ Template.listActionPopup.helpers({
isWatching() { isWatching() {
return this.findWatcher(Meteor.userId()); return this.findWatcher(Meteor.userId());
}, },
}); });
Template.listActionPopup.events({ Template.listActionPopup.events({
'click .js-add-card' () { 'click .js-add-card' () {
const listDom = document.getElementById(`js-list-${this._id}`); const listDom = document.getElementById(`js-list-${this._id}`);
const listComponent = BlazeComponent.getComponentForElement(listDom); const listComponent = BlazeComponent.getComponentForElement(listDom);
listComponent.openForm({ position: 'top' }); listComponent.openForm({ position: 'top' });
Popup.close(); Popup.close();
}, },
'click .js-list-subscribe' () {}, 'click .js-list-subscribe' () {},
'click .js-select-cards' () { 'click .js-select-cards' () {
const cardIds = this.allCards().map((card) => card._id); const cardIds = this.allCards().map((card) => card._id);
MultiSelection.add(cardIds); MultiSelection.add(cardIds);
Popup.close(); Popup.close();
}, },
'click .js-toggle-watch-list' () { 'click .js-toggle-watch-list' () {
const currentList = this; const currentList = this;
const level = currentList.findWatcher(Meteor.userId()) ? null : 'watching'; const level = currentList.findWatcher(Meteor.userId()) ? null : 'watching';
Meteor.call('watch', 'list', currentList._id, level, (err, ret) => { Meteor.call('watch', 'list', currentList._id, level, (err, ret) => {
if (!err && ret) Popup.close(); if (!err && ret) Popup.close();
}); });
}, },
'click .js-close-list' (evt) { 'click .js-close-list' (evt) {
evt.preventDefault(); evt.preventDefault();
this.archive(); this.archive();
Popup.close(); Popup.close();
}, },
'click .js-more': Popup.open('listMore'), 'click .js-more': Popup.open('listMore'),
}); });
Template.listMorePopup.events({ Template.listMorePopup.events({
'click .js-delete': Popup.afterConfirm('listDelete', function() { 'click .js-delete': Popup.afterConfirm('listDelete', function() {
Popup.close(); Popup.close();
Lists.remove(this._id); Lists.remove(this._id);
Utils.goBoardId(this.boardId); Utils.goBoardId(this.boardId);
}), }),
}); });

View file

@ -231,9 +231,9 @@
"listActionPopup-title": "Listaa toimet", "listActionPopup-title": "Listaa toimet",
"listImportCardPopup-title": "Tuo Trello kortti", "listImportCardPopup-title": "Tuo Trello kortti",
"listMorePopup-title": "Lisää", "listMorePopup-title": "Lisää",
"link-list": "Link to this list", "link-list": "Linkki tähän listaan",
"list-delete-pop": "All actions will be removed from the activity feed and you won't be able to recover the list. There is no undo.", "list-delete-pop": "Kaikki toimet poistetaan toimintasyötteestä ja listan poistaminen on lopullista. Tätä ei pysty peruuttamaan.",
"list-delete-suggest-archive": "You can archive a list to remove it from the board and preserve the activity.", "list-delete-suggest-archive": "Voit arkistoida listan jolloin sen voi palauttaa sisältöineen.",
"lists": "Listat", "lists": "Listat",
"log-out": "Kirjaudu ulos", "log-out": "Kirjaudu ulos",
"log-in": "Kirjaudu sisään", "log-in": "Kirjaudu sisään",
@ -279,7 +279,7 @@
"remove-cover": "Poista kansi", "remove-cover": "Poista kansi",
"remove-from-board": "Poista taululta", "remove-from-board": "Poista taululta",
"remove-label": "Poista tunniste", "remove-label": "Poista tunniste",
"listDeletePopup-title": "Delete List ?", "listDeletePopup-title": "Poista lista ?",
"remove-member": "Poista jäsen", "remove-member": "Poista jäsen",
"remove-member-from-card": "Poista kortilta", "remove-member-from-card": "Poista kortilta",
"remove-member-pop": "Poista __name__ (__username__) taululta __boardTitle__? Jäsen poistetaan kaikilta taulun korteilta. Heille lähetetään ilmoitus.", "remove-member-pop": "Poista __name__ (__username__) taululta __boardTitle__? Jäsen poistetaan kaikilta taulun korteilta. Heille lähetetään ilmoitus.",

View file

@ -231,9 +231,9 @@
"listActionPopup-title": "Actions sur la liste", "listActionPopup-title": "Actions sur la liste",
"listImportCardPopup-title": "Importer une carte Trello", "listImportCardPopup-title": "Importer une carte Trello",
"listMorePopup-title": "Plus", "listMorePopup-title": "Plus",
"link-list": "Link to this list", "link-list": "Lien vers cette liste",
"list-delete-pop": "All actions will be removed from the activity feed and you won't be able to recover the list. There is no undo.", "list-delete-pop": "Toutes les actions seront supprimées du fil d'activité et il ne sera plus possible de les récupérer. Cette action ne peut pas être annulée.",
"list-delete-suggest-archive": "You can archive a list to remove it from the board and preserve the activity.", "list-delete-suggest-archive": "Vous pouvez archiver une liste pour la supprimer d'un tableau et conserver son activité.",
"lists": "Listes", "lists": "Listes",
"log-out": "Déconnexion", "log-out": "Déconnexion",
"log-in": "Connexion", "log-in": "Connexion",
@ -278,8 +278,8 @@
"quick-access-description": "Ajouter un tableau à vos favoris pour créer un raccourci dans cette barre.", "quick-access-description": "Ajouter un tableau à vos favoris pour créer un raccourci dans cette barre.",
"remove-cover": "Enlever la page de présentation", "remove-cover": "Enlever la page de présentation",
"remove-from-board": "Retirer du tableau", "remove-from-board": "Retirer du tableau",
"remove-label": "Retirer une étiquette", "remove-label": "Retirer l'étiquette",
"listDeletePopup-title": "Delete List ?", "listDeletePopup-title": "Supprimer la liste ?",
"remove-member": "Supprimer le membre", "remove-member": "Supprimer le membre",
"remove-member-from-card": "Supprimer de la carte", "remove-member-from-card": "Supprimer de la carte",
"remove-member-pop": "Supprimer __name__ (__username__) de __boardTitle__ ? Ce membre sera supprimé de toutes les cartes du tableau et recevra une notification.", "remove-member-pop": "Supprimer __name__ (__username__) de __boardTitle__ ? Ce membre sera supprimé de toutes les cartes du tableau et recevra une notification.",