Skip to content
This repository was archived by the owner on Nov 1, 2017. It is now read-only.

Commit 5a85af5

Browse files
committed
🔥 crema dep, pageUpdate hook
1 parent 3b587d2 commit 5a85af5

1 file changed

Lines changed: 3 additions & 11 deletions

File tree

app/assets/javascripts/task_lists.coffee

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#= provides tasklist:change
66
#= provides tasklist:changed
77
#
8-
#= require crema/events/pageupdate
8+
#= require jquery
99
#
1010
# Enables Task List update behavior.
1111
#
@@ -39,7 +39,7 @@
3939
# TaskList updates trigger `tasklist:change` events. If the change is
4040
# successful, `tasklist:changed` is fired. The change can be canceled.
4141
#
42-
# jQuery and crema are required.
42+
# jQuery is required.
4343
#
4444
# ### Methods
4545
#
@@ -92,11 +92,7 @@
9292
# ### NOTE
9393
#
9494
# Task list checkboxes are rendered as disabled by default because rendered
95-
# user content is cached without regard for the viewer. We enable checkboxes
96-
# on `pageUpdate` if the container has a `(textarea).js-task-list-field`.
97-
#
98-
# To automatically enable TaskLists, add the `js-task-list-enable` class to the
99-
# `js-task-list-container`.
95+
# user content is cached without regard for the viewer.
10096

10197
incomplete = "[ ]"
10298
complete = "[x]"
@@ -214,7 +210,3 @@ $.fn.taskList = (method) ->
214210
disable: disableTaskLists
215211

216212
methods[method || 'enable']($container)
217-
218-
# When the page is updated, enable new TaskList containers.
219-
$.pageUpdate ->
220-
$('.js-task-list-container.js-task-list-enable').taskList()

0 commit comments

Comments
 (0)