Commit 10ba2def authored by Clement Ho's avatar Clement Ho

Fix eslint

parent 445f8afc
...@@ -52,7 +52,6 @@ import eventHub from './sidebar/event_hub'; ...@@ -52,7 +52,6 @@ import eventHub from './sidebar/event_hub';
$collapsedSidebar = $block.find('.sidebar-collapsed-user'); $collapsedSidebar = $block.find('.sidebar-collapsed-user');
$loading = $block.find('.block-loading').fadeOut(); $loading = $block.find('.block-loading').fadeOut();
const assignYourself = function () { const assignYourself = function () {
const unassignedSelected = $dropdown.closest('.selectbox') const unassignedSelected = $dropdown.closest('.selectbox')
.find(`input[name='${$dropdown.data('field-name')}'][value=0]`); .find(`input[name='${$dropdown.data('field-name')}'][value=0]`);
...@@ -76,7 +75,7 @@ import eventHub from './sidebar/event_hub'; ...@@ -76,7 +75,7 @@ import eventHub from './sidebar/event_hub';
} }
$dropdown.before(input); $dropdown.before(input);
} };
if ($block[0]) { if ($block[0]) {
$block[0].addEventListener('assignYourself', assignYourself); $block[0].addEventListener('assignYourself', assignYourself);
...@@ -85,7 +84,7 @@ import eventHub from './sidebar/event_hub'; ...@@ -85,7 +84,7 @@ import eventHub from './sidebar/event_hub';
const getSelectedUserInputs = function() { const getSelectedUserInputs = function() {
return $selectbox return $selectbox
.find(`input[name="${$dropdown.data('field-name')}"]`); .find(`input[name="${$dropdown.data('field-name')}"]`);
} };
const getSelected = function() { const getSelected = function() {
return getSelectedUserInputs() return getSelectedUserInputs()
...@@ -110,12 +109,12 @@ import eventHub from './sidebar/event_hub'; ...@@ -110,12 +109,12 @@ import eventHub from './sidebar/event_hub';
} else if (selectedUsers.length === 1) { } else if (selectedUsers.length === 1) {
return firstUser.name; return firstUser.name;
} else if (isSelected) { } else if (isSelected) {
let otherSelected = selectedUsers.filter(s => s !== selectedUser.id); const otherSelected = selectedUsers.filter(s => s !== selectedUser.id);
return `${selectedUser.name} + ${otherSelected.length} more`; return `${selectedUser.name} + ${otherSelected.length} more`;
} else { } else {
return `${firstUser.name} + ${selectedUsers.length - 1} more`; return `${firstUser.name} + ${selectedUsers.length - 1} more`;
} }
} };
$('.assign-to-me-link').on('click', (e) => { $('.assign-to-me-link').on('click', (e) => {
e.preventDefault(); e.preventDefault();
...@@ -309,7 +308,6 @@ import eventHub from './sidebar/event_hub'; ...@@ -309,7 +308,6 @@ import eventHub from './sidebar/event_hub';
eventHub.$emit('sidebar.saveAssignees'); eventHub.$emit('sidebar.saveAssignees');
} }
if (!$dropdown.data('always-show-selectbox')) { if (!$dropdown.data('always-show-selectbox')) {
$selectbox.hide(); $selectbox.hide();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment