app/assets/javascripts/para/admin/tree.coffee in para-0.5.4 vs app/assets/javascripts/para/admin/tree.coffee in para-0.6.2
- old
+ new
@@ -36,18 +36,18 @@
buildOrderedData: ->
data = {}
$(".node").each (index) ->
$this = $(this)
- data[index] = {
- id: $this.data("id"),
- position: index,
- parent_id: $this.parent().parent().data("id")
+ data[index] = {
+ id: $this.data("id"),
+ position: index,
+ parent_id: $this.parent().parent().data("id")
}
data
orderUpdated: ->
# TODO: Add flash message to display ordering success
-$(document).on 'page:change', ->
+$(document).on 'page:change turbolinks:load', ->
$('.root-tree').each (i, el) ->
new Para.ResourceTree($(el))