Commit 968c281f authored by Robert Speicher's avatar Robert Speicher

Make notes JS require its dependencies

parent a10d8100
#= require autosave
#= require bootstrap
#= require dropzone
#= require dropzone_input
#= require gfm_auto_complete
#= require jquery.atwho
#= require task_list
class @Notes class @Notes
@interval: null @interval: null
...@@ -487,12 +495,12 @@ class @Notes ...@@ -487,12 +495,12 @@ class @Notes
form.find('.js-note-target-reopen').text('Reopen') form.find('.js-note-target-reopen').text('Reopen')
form.find('.js-note-target-close').text('Close') form.find('.js-note-target-close').text('Close')
enableTaskList: ->
$('.note .js-task-list-container').taskList('enable')
initTaskList: -> initTaskList: ->
@enableTaskList() @enableTaskList()
$(document).on 'tasklist:changed', '.note .js-task-list-container', @updateTaskList $(document).on 'tasklist:changed', '.note .js-task-list-container', @updateTaskList
enableTaskList: ->
$('.note .js-task-list-container').taskList('enable')
updateTaskList: -> updateTaskList: ->
$('form', this).submit() $('form', this).submit()
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