From 5ef8bd33d03947528979540c6f7013c2b4c2a4ce Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Wed, 29 Apr 2015 15:50:22 -0400 Subject: [PATCH] Remove taskable.js --- .../javascripts/behaviors/taskable.js.coffee | 21 ------------------- 1 file changed, 21 deletions(-) delete mode 100644 app/assets/javascripts/behaviors/taskable.js.coffee diff --git a/app/assets/javascripts/behaviors/taskable.js.coffee b/app/assets/javascripts/behaviors/taskable.js.coffee deleted file mode 100644 index ddce71c1886..00000000000 --- a/app/assets/javascripts/behaviors/taskable.js.coffee +++ /dev/null @@ -1,21 +0,0 @@ -window.updateTaskState = (taskableType) -> - objType = taskableType.data - isChecked = $(this).prop("checked") - if $(this).is(":checked") - stateEvent = "task_check" - else - stateEvent = "task_uncheck" - - taskableUrl = $("form.edit-" + objType).first().attr("action") - taskableNum = taskableUrl.match(/\d+$/) - taskNum = 0 - $("li.task-list-item input:checkbox").each( (index, e) => - if e == this - taskNum = index + 1 - ) - - $.ajax - type: "PATCH" - url: taskableUrl - data: objType + "[state_event]=" + stateEvent + - "&" + objType + "[task_num]=" + taskNum