summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorKenton Hamaluik <kenton@hamaluik.com>2015-10-03 16:53:45 -0600
committerKenton Hamaluik <kenton@hamaluik.com>2015-10-03 16:53:45 -0600
commit429686ef480a56039e0d1a6da0a8668755b2bfa5 (patch)
tree20417134451e1ce5012886ded52eab5aeb9f4be4 /client
parent8010ed8d6d15d8735aeec7a16b6e942c4bedd9dd (diff)
downloadwekan-429686ef480a56039e0d1a6da0a8668755b2bfa5.tar.gz
wekan-429686ef480a56039e0d1a6da0a8668755b2bfa5.tar.bz2
wekan-429686ef480a56039e0d1a6da0a8668755b2bfa5.zip
Made eslinter happy.
Diffstat (limited to 'client')
-rw-r--r--client/components/lists/listBody.js24
1 files changed, 12 insertions, 12 deletions
diff --git a/client/components/lists/listBody.js b/client/components/lists/listBody.js
index 8bc828fb..a96e964c 100644
--- a/client/components/lists/listBody.js
+++ b/client/components/lists/listBody.js
@@ -42,10 +42,10 @@ BlazeComponent.extendComponent({
// Find all @-mentioned usernames, collect a list of their IDs and strip
// their mention out of the title.
- let foundUserIds = [];
- currentBoard.members.forEach(member => {
+ let foundUserIds = []; // eslint-disable-line prefer-const
+ currentBoard.members.forEach((member) => {
const username = Users.findOne(member.userId).username;
- let nameNdx = title.indexOf('@' + username);
+ const nameNdx = title.indexOf(`@${username}!`);
if(nameNdx !== -1) {
foundUserIds.push(member.userId);
title = title.substr(0, nameNdx)
@@ -55,11 +55,11 @@ BlazeComponent.extendComponent({
// Find all #-mentioned labels (based on their colour or name), collect a
// list of their IDs, and strip their mention out of the title.
- let foundLabelIds = [];
- currentBoard.labels.forEach(label => {
- const labelName = (!label.name || label.name === "")
+ let foundLabelIds = []; // eslint-disable-line prefer-const
+ currentBoard.labels.forEach((label) => {
+ const labelName = (!label.name || label.name === '')
? label.color : label.name;
- let labelNdx = title.indexOf('#' + labelName);
+ const labelNdx = title.indexOf(`#${labelName}`);
if(labelNdx !== -1) {
foundLabelIds.push(label._id);
title = title.substr(0, labelNdx)
@@ -141,7 +141,7 @@ BlazeComponent.extendComponent({
pressKey(evt) {
// Don't do anything if the drop down is showing
- if(dropDownIsOpened) {
+ if(dropdownMenuIsOpened) {
return;
}
@@ -181,7 +181,7 @@ BlazeComponent.extendComponent({
},
onCreated() {
- dropDownIsOpened = false;
+ dropdownMenuIsOpened = false;
},
onRendered() {
@@ -212,7 +212,7 @@ BlazeComponent.extendComponent({
search(term, callback) {
const currentBoard = Boards.findOne(Session.get('currentBoard'));
callback($.map(currentBoard.labels, (label) => {
- const labelName = (!label.name || label.name === "") ? label.color : label.name;
+ const labelName = (!label.name || label.name === '') ? label.color : label.name;
return labelName.indexOf(term) === 0 ? labelName : null;
}));
},
@@ -229,11 +229,11 @@ BlazeComponent.extendComponent({
// customize hooks for dealing with the dropdowns
$textarea.on({
'textComplete:show'() {
- dropDownIsOpened = true;
+ dropdownMenuIsOpened = true;
},
'textComplete:hide'() {
Tracker.afterFlush(() => {
- dropDownIsOpened = false;
+ dropdownMenuIsOpened = false;
});
},
});