Sha256: ee436592f008a3b9e2d446655967840fb26689c4cb54ffcd8f2c3b5e3e8f6cdc

Contents?: true

Size: 560 Bytes

Versions: 13

Compression:

Stored size: 560 Bytes

Contents

:javascript
  function sortable_tree(item_id, parent_id, prev_id, next_id){
    jQuery.ajax({
      type:       'POST',
      dataType:   'script',
      url:        '#{url_for(:controller => opts[:klass].pluralize, :action => :rebuild)}',
      data:       { id: item_id, parent_id: parent_id, prev_id: prev_id, next_id: next_id },

      beforeSend: function(xhr){ $('.nested_set i.handle').hide() },
      success:    function(data, status, xhr){ $('.nested_set i.handle').show() },
      error:      function(xhr, status, error){ alert(error) }
    });
  }

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
the_sortable_tree_mongoid-1.8.5.1 app/views/the_sortable_tree/_js_rebuild_ajax.html.haml
the_sortable_tree_mongoid-1.8.5 app/views/the_sortable_tree/_js_rebuild_ajax.html.haml
the_sortable_tree-1.9.0 app/views/sortable/base/_js_rebuild_ajax.html.haml
the_sortable_tree-1.8.6 app/views/the_sortable_tree/_js_rebuild_ajax.html.haml
the_sortable_tree-1.8.5 app/views/the_sortable_tree/_js_rebuild_ajax.html.haml
the_sortable_tree-1.8.0 app/views/the_sortable_tree/_js_rebuild_ajax.html.haml
the_sortable_tree-1.7.1 app/views/the_sortable_tree/_js_rebuild_ajax.html.haml
the_sortable_tree-1.7.0 app/views/the_sortable_tree/_js_rebuild_ajax.html.haml
the_sortable_tree-1.6.0 app/views/the_sortable_tree/_js_rebuild_ajax.html.haml
the_sortable_tree-1.5.0 app/views/the_sortable_tree/_js_rebuild_ajax.html.haml
the_sortable_tree-1.4.8 app/views/the_sortable_tree/_js_rebuild_ajax.html.haml
the_sortable_tree-1.4.7 app/views/the_sortable_tree/_js_rebuild_ajax.html.haml
the_sortable_tree-1.4.6 app/views/the_sortable_tree/_js_rebuild_ajax.html.haml