Sha256: 9272f41d18deb187d90412eac208559027237511be92e823257e3bcb59e9813d
Contents?: true
Size: 876 Bytes
Versions: 40
Compression:
Stored size: 876 Bytes
Contents
<div class="wrapper" style="padding-top:90px;"> <div class="treeHolder"> <%= content_tag(:ul, :id => "sortable", :"data-url" => sort_path(:format => :json)) do -%> <%= render :partial => apply_scope("record"), :collection => @records %> <% end -%> </div> </div> <script type='text/javascript'> $(document).ready(function(){ window['sunrise'].storeQuery(); $("#sortable ul").sortable({ placeholder: "tree-state-shadow", handle: "a.dnd_link", items: "li", connectWith: "ul.children", delay: 400, opacity: 0.7, start: function (e, ui) { ui.placeholder.html("<div></div>"); }, update: function(event, ui) { var query = window["sunrise"].serializeTree('#sortable'); $.ajax({url: $("#sortable").data('url'), type: 'POST', dataType: 'json', data: query}); } }).disableSelection(); }); </script>
Version data entries
40 entries across 40 versions & 1 rubygems