diff options
31 files changed, 193 insertions, 196 deletions
diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index f5f0733a..00000000 --- a/.eslintrc +++ /dev/null @@ -1,129 +0,0 @@ -ecmaFeatures: - experimentalObjectRestSpread: true - -rules: - strict: 0 - no-undef: 2 - accessor-pairs: 2 - comma-dangle: [2, 'always-multiline'] - consistent-return: 2 - dot-notation: 2 - eqeqeq: 2 - indent: [2, 2] - no-cond-assign: 2 - no-constant-condition: 2 - no-eval: 2 - no-inner-declarations: [0] - no-unneeded-ternary: 2 - radix: 2 - semi: [2, always] - - # Stylistic Issues - camelcase: 2 - comma-spacing: 2 - comma-style: 2 - eol-last: 2 - linebreak-style: [2, unix] - new-parens: 2 - no-lonely-if: 2 - no-multiple-empty-lines: 2 - no-nested-ternary: 2 - no-spaced-func: 2 - no-trailing-spaces: 2 - operator-linebreak: 2 - quotes: [2, single] - semi-spacing: 2 - space-unary-ops: 2 - spaced-comment: [2, always, markers: ['/']] - - # ECMAScript 6 - arrow-parens: 2 - arrow-spacing: 2 - no-class-assign: 2 - no-dupe-class-members: 2 - no-var: 2 - object-shorthand: 2 - prefer-const: 2 - prefer-spread: 2 - prefer-template: 2 - -globals: - # Meteor globals - Meteor: false - Session: false - HTML: false - check: false - Tracker: false - Blaze: false - Accounts: false - Match: false - Mongo: false - Random: false - ReactiveVar: false - Email: false - Template: false - - # Exported by packages we use - '$': false - _: false - autosize: false - Avatar: true - Avatars: true - BlazeComponent: false - BlazeLayout: false - DocHead: false - ESSearchResults: false - FastRender: false - FlowRouter: false - FS: false - getSlug: false - Migrations: false - moment: false - Mousetrap: false - Picker: false - Presence: true - presences: true - Ps: true - ReactiveTabs: false - Restivus: false - SimpleSchema: false - SubsManager: false - T9n: false - TAPi18n: false - - # Our collections - AccountsTemplates: true - Activities: true - Attachments: true - Boards: true - CardComments: true - Cards: true - Lists: true - UnsavedEditCollection: true - Users: true - - # Our objects - CSSEvents: true - EscapeActions: true - Filter: true - Mixins: true - Modal: true - MultiSelection: true - Popup: true - Sidebar: true - Utils: true - InlinedForm: true - UnsavedEdits: true - Notifications: true - - # XXX Temp, we should remove these - allowIsBoardAdmin: true - allowIsBoardMember: true - Emoji: true - -env: - es6: true - node: true - browser: true - -extends: 'eslint:recommended' diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 00000000..939f7b46 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,121 @@ +{ + "extends": "eslint:recommended", + "env": { + "es6": true, + "node": true, + "browser": true + }, + "parserOptions": { + "ecmaVersion": 6, + "sourceType": "module", + "ecmaFeatures": { + "experimentalObjectRestSpread": true + } + }, + "rules": { + "strict": 0, + "no-undef": 2, + "accessor-pairs": 2, + "comma-dangle": [2, "always-multiline"], + "consistent-return": 2, + "dot-notation": 2, + "eqeqeq": 2, + "indent": [2, 2], + "no-cond-assign": 2, + "no-constant-condition": 2, + "no-eval": 2, + "no-inner-declarations": [0], + "no-unneeded-ternary": 2, + "radix": 2, + "semi": [2, "always"], + "camelcase": 2, + "comma-spacing": 2, + "comma-style": 2, + "eol-last": 2, + "linebreak-style": [2, "unix"], + "new-parens": 2, + "no-lonely-if": 2, + "no-multiple-empty-lines": 2, + "no-nested-ternary": 2, + "no-spaced-func": 2, + "no-trailing-spaces": 2, + "operator-linebreak": 2, + "quotes": [2, "single"], + "semi-spacing": 2, + "space-unary-ops": 2, + "arrow-parens": 2, + "arrow-spacing": 2, + "no-class-assign": 2, + "no-dupe-class-members": 2, + "no-var": 2, + "object-shorthand": 2, + "prefer-const": 2, + "prefer-spread": 2, + "prefer-template": 2 + }, + "globals": { + "Meteor": false, + "Session": false, + "HTML": false, + "check": false, + "Tracker": false, + "Blaze": false, + "Accounts": false, + "Match": false, + "Mongo": false, + "Random": false, + "ReactiveVar": false, + "Email": false, + "Template": false, + "$": false, + "_": false, + "autosize": false, + "Avatar": true, + "Avatars": true, + "BlazeComponent": false, + "BlazeLayout": false, + "DocHead": false, + "ESSearchResults": false, + "FastRender": false, + "FlowRouter": false, + "FS": false, + "getSlug": false, + "Migrations": false, + "moment": false, + "Mousetrap": false, + "Picker": false, + "Presence": true, + "presences": true, + "Ps": true, + "ReactiveTabs": false, + "Restivus": false, + "SimpleSchema": false, + "SubsManager": false, + "T9n": false, + "TAPi18n": false, + "AccountsTemplates": true, + "Activities": true, + "Attachments": true, + "Boards": true, + "CardComments": true, + "Cards": true, + "Lists": true, + "UnsavedEditCollection": true, + "Users": true, + "CSSEvents": true, + "EscapeActions": true, + "Filter": true, + "Mixins": true, + "Modal": true, + "MultiSelection": true, + "Popup": true, + "Sidebar": true, + "Utils": true, + "InlinedForm": true, + "UnsavedEdits": true, + "Notifications": true, + "allowIsBoardAdmin": true, + "allowIsBoardMember": true, + "Emoji": true + } +} diff --git a/CHANGELOG.md b/CHANGELOG.md index 0714a5f4..629b7fee 100644..100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -98,8 +98,8 @@ the popover was new). New features includes: * Assign and unassign members to cards; * Archive cards (though restoration is not yet possible); * Board stars; -* Markdown and emojies support in comments and card description; -* Emojies auto-completion in the text editor; +* Markdown and emoji support in comments and card description; +* Emoji auto-completion in the text editor; * Some keyboard shortcuts (eg `Ctrl`+`Enter` to submit a multi-line input). We also introduced basic support for the [Sandstorm](https://sandstorm.io) diff --git a/client/components/lists/listBody.js b/client/components/lists/listBody.js index 907c2157..34c2dcd6 100644 --- a/client/components/lists/listBody.js +++ b/client/components/lists/listBody.js @@ -208,11 +208,12 @@ BlazeComponent.extendComponent({ label.color.indexOf(term) > -1) { return label; } + return null; })); }, template(label) { return Blaze.toHTMLWithData(Template.autocompleteLabelLine, { - hasNoName: !Boolean(label.name), + hasNoName: !label.name, colorName: label.color, labelName: label.name || label.color, }); @@ -233,6 +234,7 @@ BlazeComponent.extendComponent({ evt.stopPropagation(); return commands.KEY_ENTER; } + return null; }, }); }, diff --git a/client/components/main/editor.js b/client/components/main/editor.js index a30a5e1d..da66bb74 100644..100755 --- a/client/components/main/editor.js +++ b/client/components/main/editor.js @@ -4,7 +4,7 @@ Template.editor.onRendered(() => { autosize($textarea); $textarea.escapeableTextComplete([ - // Emojies + // Emoji { match: /\B:([\-+\w]*)$/, search(term, callback) { @@ -45,7 +45,7 @@ Template.editor.onRendered(() => { }); // XXX I believe we should compute a HTML rendered field on the server that -// would handle markdown, emojies and user mentions. We can simply have two +// would handle markdown, emoji and user mentions. We can simply have two // fields, one source, and one compiled version (in HTML) and send only the // compiled version to most users -- who don't need to edit. // In the meantime, all the transformation are done on the client using the @@ -61,18 +61,20 @@ Blaze.Template.registerHelper('mentions', new Template('mentions', function() { const mentionRegex = /\B@(\w*)/gi; let content = Blaze.toHTML(view.templateContentBlock); - let currentMention, knowedUser, linkClass, linkValue, link; - while (Boolean(currentMention = mentionRegex.exec(content))) { - - knowedUser = _.findWhere(knowedUsers, { username: currentMention[1] }); - if (!knowedUser) + let currentMention; + while ((currentMention = mentionRegex.exec(content)) !== null) { + const [fullMention, username] = currentMention; + const knowedUser = _.findWhere(knowedUsers, { username }); + if (!knowedUser) { continue; + } - linkValue = [' ', at, knowedUser.username]; - linkClass = 'atMention js-open-member'; - if (knowedUser.userId === Meteor.userId()) + const linkValue = [' ', at, knowedUser.username]; + let linkClass = 'atMention js-open-member'; + if (knowedUser.userId === Meteor.userId()) { linkClass += ' me'; - link = HTML.A({ + } + const link = HTML.A({ 'class': linkClass, // XXX Hack. Since we stringify this render function result below with // `Blaze.toHTML` we can't rely on blaze data contexts to pass the @@ -81,7 +83,7 @@ Blaze.Template.registerHelper('mentions', new Template('mentions', function() { 'data-userId': knowedUser.userId, }, linkValue); - content = content.replace(currentMention[0], Blaze.toHTML(link)); + content = content.replace(fullMention, Blaze.toHTML(link)); } return HTML.Raw(content); diff --git a/client/components/sidebar/sidebarFilters.js b/client/components/sidebar/sidebarFilters.js index 0a57f02c..f02d3a4a 100644 --- a/client/components/sidebar/sidebarFilters.js +++ b/client/components/sidebar/sidebarFilters.js @@ -68,7 +68,7 @@ BlazeComponent.extendComponent({ const popup = Popup.open('disambiguateMultiLabel'); // XXX We need to have a better integration between the popup and the // UI components systems. - return popup.call(this.currentData(), evt); + popup.call(this.currentData(), evt); } }, 'click .js-toggle-member-multiselection'(evt) { @@ -82,7 +82,7 @@ BlazeComponent.extendComponent({ const popup = Popup.open('disambiguateMultiMember'); // XXX We need to have a better integration between the popup and the // UI components systems. - return popup.call(this.currentData(), evt); + popup.call(this.currentData(), evt); } }, 'click .js-move-selection': Popup.open('moveSelection'), diff --git a/client/config/blazeHelpers.js b/client/config/blazeHelpers.js index f3a1757f..ef075907 100644 --- a/client/config/blazeHelpers.js +++ b/client/config/blazeHelpers.js @@ -2,6 +2,8 @@ Blaze.registerHelper('currentBoard', () => { const boardId = Session.get('currentBoard'); if (boardId) { return Boards.findOne(boardId); + } else { + return null; } }); @@ -9,6 +11,8 @@ Blaze.registerHelper('currentCard', () => { const cardId = Session.get('currentCard'); if (cardId) { return Cards.findOne(cardId); + } else { + return null; } }); diff --git a/client/lib/cssEvents.js b/client/lib/cssEvents.js index 39c3fb90..04f5707e 100644 --- a/client/lib/cssEvents.js +++ b/client/lib/cssEvents.js @@ -15,6 +15,7 @@ function whichTransitionEvent() { return transitions[t]; } } + return null; } function whichAnimationEvent() { @@ -32,6 +33,7 @@ function whichAnimationEvent() { return transitions[t]; } } + return null; } CSSEvents = { diff --git a/client/lib/escapeActions.js b/client/lib/escapeActions.js index f2dc3dcb..49b80422 100644 --- a/client/lib/escapeActions.js +++ b/client/lib/escapeActions.js @@ -64,6 +64,7 @@ EscapeActions = { clickExecute(target, maxLabel) { if (this._nextclickPrevented) { this._nextclickPrevented = false; + return false; } else { return this._execute({ maxLabel, diff --git a/client/lib/keyboard.js b/client/lib/keyboard.js index f8212c9b..ff18738b 100644..100755 --- a/client/lib/keyboard.js +++ b/client/lib/keyboard.js @@ -88,7 +88,7 @@ Template.keyboardShortcuts.helpers({ action: 'shortcut-autocomplete-members', }, { keys: [':'], - action: 'shortcut-autocomplete-emojies', + action: 'shortcut-autocomplete-emoji', }, { keys: ['SPACE'], action: 'shortcut-assign-self', diff --git a/client/lib/multiSelection.js b/client/lib/multiSelection.js index eeb2015d..30577fd4 100644 --- a/client/lib/multiSelection.js +++ b/client/lib/multiSelection.js @@ -109,12 +109,11 @@ MultiSelection = { toggleRange(cardId) { const selectedCards = this._selectedCards.get(); - let startRange; this.reset(); if (!this.isActive() || selectedCards.length === 0) { this.toggle(cardId); } else { - startRange = selectedCards[selectedCards.length - 1]; + const startRange = selectedCards[selectedCards.length - 1]; this.toggle(getCardsBetween(startRange, cardId)); } }, diff --git a/client/lib/popup.js b/client/lib/popup.js index 7cceaa4f..3166ca30 100644 --- a/client/lib/popup.js +++ b/client/lib/popup.js @@ -38,7 +38,8 @@ window.Popup = new class { if (self.isOpen()) { const previousOpenerElement = self._getTopStack().openerElement; if (previousOpenerElement === evt.currentTarget) { - return self.close(); + self.close(); + return; } else { $(previousOpenerElement).removeClass('is-active'); } diff --git a/client/lib/textComplete.js b/client/lib/textComplete.js index 3e69d07f..69820514 100644 --- a/client/lib/textComplete.js +++ b/client/lib/textComplete.js @@ -14,6 +14,7 @@ $.fn.escapeableTextComplete = function(strategies, options, ...otherArgs) { evt.stopPropagation(); return commands.KEY_ENTER; } + return null; }, ...options, }; diff --git a/i18n/ar.i18n.json b/i18n/ar.i18n.json index 109707fc..225b0975 100644..100755 --- a/i18n/ar.i18n.json +++ b/i18n/ar.i18n.json @@ -234,7 +234,7 @@ "search": "بحث", "select-color": "اختيار لون", "shortcut-assign-self": "Assign yourself to current card", - "shortcut-autocomplete-emojies": "الإكمال التلقائي للرموز التعبيرية", + "shortcut-autocomplete-emoji": "الإكمال التلقائي للرموز التعبيرية", "shortcut-autocomplete-members": "الإكمال التلقائي لأسماء الأعضاء", "shortcut-clear-filters": "مسح التصفيات", "shortcut-close-dialog": "غلق النافذة", @@ -260,4 +260,4 @@ "view-it": "شاهدها", "warn-list-archived": "انتبه : هذه البطاقة في أرشيف القائمات", "what-to-do": "ماذا تريد أن تنجز?" -}
\ No newline at end of file +} diff --git a/i18n/ca.i18n.json b/i18n/ca.i18n.json index 86ed4599..fa223d02 100644..100755 --- a/i18n/ca.i18n.json +++ b/i18n/ca.i18n.json @@ -234,7 +234,7 @@ "search": "Cerca", "select-color": "Selecciona un color", "shortcut-assign-self": "Assigna't la ftixa actual", - "shortcut-autocomplete-emojies": "Autocompleta emojies", + "shortcut-autocomplete-emoji": "Autocompleta emoji", "shortcut-autocomplete-members": "Autocompleta membres", "shortcut-clear-filters": "Elimina tots els filters", "shortcut-close-dialog": "Tanca el diàleg", @@ -260,4 +260,4 @@ "view-it": "Vist", "warn-list-archived": "Avís: aquesta fitxa està en una llista arxivada", "what-to-do": "Què vols fer?" -}
\ No newline at end of file +} diff --git a/i18n/de.i18n.json b/i18n/de.i18n.json index d0c57523..43e12d88 100644..100755 --- a/i18n/de.i18n.json +++ b/i18n/de.i18n.json @@ -234,7 +234,7 @@ "search": "Suchen", "select-color": "Wähle eine Farbe aus", "shortcut-assign-self": "Assign yourself to current card", - "shortcut-autocomplete-emojies": "Autovervollständige Emojis", + "shortcut-autocomplete-emoji": "Autovervollständige Emojis", "shortcut-autocomplete-members": "Autovervollständige Nutzer", "shortcut-clear-filters": "Alle Filter entfernen", "shortcut-close-dialog": "Dialog schließen", @@ -260,4 +260,4 @@ "view-it": "Ansehen", "warn-list-archived": "Warnung: Diese Karte befindet sich in einer archivierten Liste", "what-to-do": "Was willst du tun?" -}
\ No newline at end of file +} diff --git a/i18n/en.i18n.json b/i18n/en.i18n.json index f495c148..310e7a23 100644..100755 --- a/i18n/en.i18n.json +++ b/i18n/en.i18n.json @@ -262,7 +262,7 @@ "search": "Search", "select-color": "Select a color", "shortcut-assign-self": "Assign yourself to current card", - "shortcut-autocomplete-emojies": "Autocomplete emojies", + "shortcut-autocomplete-emoji": "Autocomplete emoji", "shortcut-autocomplete-members": "Autocomplete members", "shortcut-clear-filters": "Clear all filters", "shortcut-close-dialog": "Close Dialog", diff --git a/i18n/es.i18n.json b/i18n/es.i18n.json index 9980bf66..b4af8f5a 100644..100755 --- a/i18n/es.i18n.json +++ b/i18n/es.i18n.json @@ -234,7 +234,7 @@ "search": "Buscar", "select-color": "Selecciona un color", "shortcut-assign-self": "Assign yourself to current card", - "shortcut-autocomplete-emojies": "Autocomplete emojies", + "shortcut-autocomplete-emoji": "Autocomplete emoji", "shortcut-autocomplete-members": "Autocomplete members", "shortcut-clear-filters": "Clear all filters", "shortcut-close-dialog": "Close Dialog", @@ -260,4 +260,4 @@ "view-it": "View it", "warn-list-archived": "warning: this card is in an archived list", "what-to-do": "What do you want to do?" -}
\ No newline at end of file +} diff --git a/i18n/fi.i18n.json b/i18n/fi.i18n.json index 10515ce2..caab4faf 100644..100755 --- a/i18n/fi.i18n.json +++ b/i18n/fi.i18n.json @@ -234,7 +234,7 @@ "search": "Etsi", "select-color": "Valitse väri", "shortcut-assign-self": "Valitse itsesi nykyiselle kortille", - "shortcut-autocomplete-emojies": "Automaattinen täydennys emojille", + "shortcut-autocomplete-emoji": "Automaattinen täydennys emojille", "shortcut-autocomplete-members": "Automaattinen täydennys jäsenille", "shortcut-clear-filters": "Poista kaikki suodattimet", "shortcut-close-dialog": "Sulje valintaikkuna", @@ -260,4 +260,4 @@ "view-it": "Näytä se", "warn-list-archived": "varoitus: tämä kortti on arkistoitujen listalla", "what-to-do": "Mitä haluat tehdä?" -}
\ No newline at end of file +} diff --git a/i18n/fr.i18n.json b/i18n/fr.i18n.json index 0572c00d..0642308c 100644..100755 --- a/i18n/fr.i18n.json +++ b/i18n/fr.i18n.json @@ -228,7 +228,7 @@ "search": "Chercher", "select-color": "Choisissez une couleur", "shortcut-assign-self": "Assign yourself to current card", - "shortcut-autocomplete-emojies": "Auto-complétion des emojies", + "shortcut-autocomplete-emoji": "Auto-complétion des emoji", "shortcut-autocomplete-members": "Auto-complétion des membres", "shortcut-clear-filters": "Retirer tous les filtres", "shortcut-close-dialog": "Fermer le dialogue", diff --git a/i18n/it.i18n.json b/i18n/it.i18n.json index 37452fae..07026fd4 100644..100755 --- a/i18n/it.i18n.json +++ b/i18n/it.i18n.json @@ -234,7 +234,7 @@ "search": "Search", "select-color": "Select a color", "shortcut-assign-self": "Assign yourself to current card", - "shortcut-autocomplete-emojies": "Autocomplete emojies", + "shortcut-autocomplete-emoji": "Autocomplete emoji", "shortcut-autocomplete-members": "Autocomplete members", "shortcut-clear-filters": "Clear all filters", "shortcut-close-dialog": "Close Dialog", @@ -260,4 +260,4 @@ "view-it": "View it", "warn-list-archived": "warning: this card is in an archived list", "what-to-do": "What do you want to do?" -}
\ No newline at end of file +} diff --git a/i18n/ja.i18n.json b/i18n/ja.i18n.json index da1e89d3..6cde68c6 100644..100755 --- a/i18n/ja.i18n.json +++ b/i18n/ja.i18n.json @@ -234,7 +234,7 @@ "search": "検索", "select-color": "色を選択", "shortcut-assign-self": "Assign yourself to current card", - "shortcut-autocomplete-emojies": "Autocomplete emojies", + "shortcut-autocomplete-emoji": "Autocomplete emoji", "shortcut-autocomplete-members": "Autocomplete members", "shortcut-clear-filters": "Clear all filters", "shortcut-close-dialog": "Close Dialog", @@ -260,4 +260,4 @@ "view-it": "View it", "warn-list-archived": "warning: this card is in an archived list", "what-to-do": "What do you want to do?" -}
\ No newline at end of file +} diff --git a/i18n/ko.i18n.json b/i18n/ko.i18n.json index a6af2de7..823a221d 100644..100755 --- a/i18n/ko.i18n.json +++ b/i18n/ko.i18n.json @@ -234,7 +234,7 @@ "search": "검색", "select-color": "색 선택", "shortcut-assign-self": "Assign yourself to current card", - "shortcut-autocomplete-emojies": "Autocomplete emojies", + "shortcut-autocomplete-emoji": "Autocomplete emoji", "shortcut-autocomplete-members": "Autocomplete members", "shortcut-clear-filters": "Clear all filters", "shortcut-close-dialog": "Close Dialog", @@ -260,4 +260,4 @@ "view-it": "View it", "warn-list-archived": "warning: this card is in an archived list", "what-to-do": "What do you want to do?" -}
\ No newline at end of file +} diff --git a/i18n/pt-BR.i18n.json b/i18n/pt-BR.i18n.json index 417e4ede..51c62f5b 100644..100755 --- a/i18n/pt-BR.i18n.json +++ b/i18n/pt-BR.i18n.json @@ -234,7 +234,7 @@ "search": "Buscar", "select-color": "Selecione uma cor", "shortcut-assign-self": "Assign yourself to current card", - "shortcut-autocomplete-emojies": "Preenchimento automático de emojies", + "shortcut-autocomplete-emoji": "Preenchimento automático de emoji", "shortcut-autocomplete-members": "Preenchimento automático de membros", "shortcut-clear-filters": "Limpar todos filtros", "shortcut-close-dialog": "Fechar dialogo", @@ -260,4 +260,4 @@ "view-it": "Visualizar", "warn-list-archived": "aviso: este cartão está em uma lista arquivada", "what-to-do": "O que você gostaria de fazer?" -}
\ No newline at end of file +} diff --git a/i18n/ru.i18n.json b/i18n/ru.i18n.json index 73c85175..a2319a27 100644..100755 --- a/i18n/ru.i18n.json +++ b/i18n/ru.i18n.json @@ -231,7 +231,7 @@ "search": "Поиск", "select-color": "Выбрать цвет", "shortcut-assign-self": "Связать себя с текущей карточкой", - "shortcut-autocomplete-emojies": "Автозаполнение emojies", + "shortcut-autocomplete-emoji": "Автозаполнение emoji", "shortcut-autocomplete-members": "Автозаполнение пользователей", "shortcut-clear-filters": "Сбросить все фильтры", "shortcut-close-dialog": "Закрыть диалог", diff --git a/i18n/tr.i18n.json b/i18n/tr.i18n.json index bcec0834..c05833bb 100644..100755 --- a/i18n/tr.i18n.json +++ b/i18n/tr.i18n.json @@ -234,7 +234,7 @@ "search": "Search", "select-color": "Bir renk seç", "shortcut-assign-self": "Assign yourself to current card", - "shortcut-autocomplete-emojies": "Autocomplete emojies", + "shortcut-autocomplete-emoji": "Autocomplete emoji", "shortcut-autocomplete-members": "Autocomplete members", "shortcut-clear-filters": "Clear all filters", "shortcut-close-dialog": "Close Dialog", @@ -260,4 +260,4 @@ "view-it": "View it", "warn-list-archived": "warning: this card is in an archived list", "what-to-do": "What do you want to do?" -}
\ No newline at end of file +} diff --git a/i18n/zh-CN.i18n.json b/i18n/zh-CN.i18n.json index d622cef5..32eb1516 100644..100755 --- a/i18n/zh-CN.i18n.json +++ b/i18n/zh-CN.i18n.json @@ -234,7 +234,7 @@ "search": "搜索", "select-color": "选择颜色", "shortcut-assign-self": "分配当前卡片给自己", - "shortcut-autocomplete-emojies": "自动补全表情", + "shortcut-autocomplete-emoji": "自动补全表情", "shortcut-autocomplete-members": "自动补全成员", "shortcut-clear-filters": "清空全部过滤器", "shortcut-close-dialog": "关闭对话框", @@ -260,4 +260,4 @@ "view-it": "查看", "warn-list-archived": "警告: 该卡片位于已删除的清单中", "what-to-do": "要做什么?" -}
\ No newline at end of file +} diff --git a/meta/t9n-changelog/fr.md b/meta/t9n-changelog/fr.md index dd966fbb..fed1fbe6 100644..100755 --- a/meta/t9n-changelog/fr.md +++ b/meta/t9n-changelog/fr.md @@ -39,9 +39,9 @@ Les nouvelles fonctionnalités incluent: * Assigner et retirer l’assignation de membres aux cartes; * Archiver des cartes (bien que la restauration ne soit pas encore possible); * Tableaux favoris -* Support du markdown et des emojies dans les commentaires et la description des +* Support du markdown et des emoji dans les commentaires et la description des cartes; -* Auto-complétion des emojies dans l'éditeur de texte; +* Auto-complétion des emoji dans l'éditeur de texte; * Quelques raccourcis clavier (ex `Ctrl`+`Enter` pour envoyer une entrée multi-lignes). diff --git a/models/boards.js b/models/boards.js index 64d6df62..52272cce 100644 --- a/models/boards.js +++ b/models/boards.js @@ -201,6 +201,7 @@ Boards.mutations({ const _id = Random.id(6); return { $push: {labels: { _id, name, color }}}; } + return {}; }, editLabel(labelId, name, color) { @@ -213,6 +214,7 @@ Boards.mutations({ }, }; } + return {}; }, removeLabel(labelId) { @@ -397,8 +399,9 @@ if (Meteor.isServer) { if (!_.contains(fieldNames, 'labels') || !modifier.$pull || !modifier.$pull.labels || - !modifier.$pull.labels._id) + !modifier.$pull.labels._id) { return; + } const removedLabelId = modifier.$pull.labels._id; Cards.update( @@ -414,8 +417,9 @@ if (Meteor.isServer) { // Add a new activity if we add or remove a member to the board Boards.after.update((userId, doc, fieldNames, modifier) => { - if (!_.contains(fieldNames, 'members')) + if (!_.contains(fieldNames, 'members')) { return; + } let memberId; diff --git a/models/import.js b/models/import.js index fecc5c4d..86ef75b3 100644 --- a/models/import.js +++ b/models/import.js @@ -397,8 +397,7 @@ class TrelloCreator { parseActions(trelloActions) { trelloActions.forEach((action) => { - switch (action.type) { - case 'addAttachmentToCard': + if (action.type === 'addAttachmentToCard') { // We have to be cautious, because the attachment could have been removed later. // In that case Trello still reports its addition, but removes its 'url' field. // So we test for that @@ -412,30 +411,22 @@ class TrelloCreator { } this.attachments[trelloCardId].push(trelloAttachment); } - break; - case 'commentCard': + } else if (action.type === 'commentCard') { const id = action.data.card.id; if (this.comments[id]) { this.comments[id].push(action); } else { this.comments[id] = [action]; } - break; - case 'createBoard': + } else if (action.type === 'createBoard') { this.createdAt.board = action.date; - break; - case 'createCard': + } else if (action.type === 'createCard') { const cardId = action.data.card.id; this.createdAt.cards[cardId] = action.date; this.createdBy.cards[cardId] = action.idMemberCreator; - break; - case 'createList': + } else if (action.type === 'createList') { const listId = action.data.list.id; this.createdAt.lists[listId] = action.date; - break; - default: - // do nothing - break; } }); } diff --git a/package.json b/package.json index e844c9ec..dcf7cbb2 100644 --- a/package.json +++ b/package.json @@ -17,8 +17,6 @@ }, "homepage": "https://wekan.io", "devDependencies": { - "babel-eslint": "4.1.3", - "eslint": "1.7.3", - "eslint-plugin-meteor": "1.7.0" + "eslint": "^2.0.0" } } |