From d3e34cd165fa5a8f534d7acec7df4c8bd6392eae Mon Sep 17 00:00:00 2001 From: Simon Knox Date: Wed, 8 Feb 2017 19:10:04 +1100 Subject: [PATCH] appease lint --- app/assets/javascripts/task_list.js.es6 | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/app/assets/javascripts/task_list.js.es6 b/app/assets/javascripts/task_list.js.es6 index daed051c4a5..2001803fe13 100644 --- a/app/assets/javascripts/task_list.js.es6 +++ b/app/assets/javascripts/task_list.js.es6 @@ -14,29 +14,28 @@ class TaskList { init() { // Prevent duplicate event bindings this.disable(); - $(this.selector + ' .js-task-list-container').taskList('enable'); - $(document).on('tasklist:changed', this.selector + ' .js-task-list-container', this.update); + $(`${this.selector} .js-task-list-container`).taskList('enable'); + $(document).on('tasklist:changed', `${this.selector} .js-task-list-container`, this.update); } disable() { - $(this.selector + ' .js-task-list-container').taskList('disable'); - return $(document).off('tasklist:changed', this.selector + ' .js-task-list-container'); + $(`${this.selector} .js-task-list-container`).taskList('disable'); + return $(document).off('tasklist:changed', `${this.selector} .js-task-list-container`); } update(e) { - var patchData; - patchData = {}; + const patchData = {}; patchData[this.dataType] = { - 'description': $(e.target).val() + description: $(e.target).val(), }; return $.ajax({ type: 'PATCH', url: $('form.js-issuable-update').attr('action'), data: patchData, - success: function(result) { + success: (result) => { document.querySelector('#task_status').innerText = result.task_status; document.querySelector('#task_status_short').innerText = result.task_status_short; - } + }, }); } }