Moving habits.js.coffee stuff into backbone, deleting habits.js.coffee

This commit is contained in:
Tyler Renelle
2012-02-13 10:27:38 -05:00
parent 56aa9ddf31
commit 601474c958
2 changed files with 14 additions and 20 deletions
@@ -65,4 +65,18 @@ class HabitTracker.Views.Habits.IndexView extends Backbone.View
@addAll()
@$("#habits-todos").tabs()
@updateStats()
$.each ['#habits', '#daily', '#one-offs'], (index, list_id) ->
$(list_id).sortable
axis: "y"
dropOnEmpty: false
cursor: "move"
items: "li"
opacity: 0.4
scroll: true
update: ->
$.ajax
type: "post"
url: "/habits/sort"
data: $(list_id).sortable("serialize")
dataType: "script"
return this