using .sortable for lists, seems to work but still need to double check

This commit is contained in:
Tyler Renelle
2012-02-13 12:38:23 -05:00
parent 601474c958
commit 5f93ec95fa
2 changed files with 19 additions and 20 deletions
@@ -65,18 +65,17 @@ 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
@$(".sortable").sortable
axis: "y"
dropOnEmpty: false
cursor: "move"
items: "li"
opacity: 0.4
scroll: true
update: ->
$.ajax
type: "post"
url: "/habits/sort"
data: $(this).sortable("serialize")
dataType: "script"
return this