<li data-reorder-id='<%= node.id %>'>
  <%= simple_form_for [main_app, node], remote: true do |f| %>
    <div class="panel panel-default">
      <div class="panel-heading">
        <div class="order-title">
          <%= f.input :title, as: :string, input_html: { name: "#{f.object.model_name.singular}[title][]", class: "title" }, value: node.to_s, label: false %>
        </div>
        <div class="file-set-link pull-right">
          <%= link_to polymorphic_path([main_app, node]), title: "Edit file" do %>
            <span class="glyphicon glyphicon-edit" aria-hidden="true"></span>
          <% end %>
        </div>
        <% if node.respond_to?(:page_title) %>
          <div class="order-filename">
            <em title="<%= node.page_title %>">(<%= truncate(node.page_title, length: 29) %>)</em>
          </div>
        <% end %>
      </div>
      <div class="panel-body">
        <div class="text-center thumbnail">
          <%= render "file_manager_thumbnail", node: node %>
        </div>
        <div class="attributes">
          <%= render "file_manager_attributes", node: node, f: f%>
        </div>
        <div class="spacer">
        </div>
      </div>
    </div>
  <% end %>
</li>

<li data-reorder-id='<%= node.id %>'>
  <%= simple_form_for [main_app, node], remote: true, html: {'data-type': 'json'} do |f| %>
    <div class="panel panel-default">
      <div class="panel-heading">
        <div class="order-title">
          <%= f.input :title, as: :string, input_html: { name: "#{f.object.model_name.singular}[title][]", class: "title" }, value: node.to_s, label: false %>
        </div>
        <div class="file-set-link pull-right">
          <%= link_to polymorphic_path([main_app, node]), title: "Edit file" do %>
            <span class="glyphicon glyphicon-edit" aria-hidden="true"></span>
          <% end %>
        </div>
        <% if node.respond_to?(:page_title) %>
          <div class="order-filename">
            <em title="<%= node.page_title %>">(<%= truncate(node.page_title, length: 29) %>)</em>
          </div>
        <% end %>
      </div>
      <div class="panel-body">
        <div class="text-center thumbnail">
          <%= render "file_manager_thumbnail", node: node %>
        </div>
        <div class="attributes">
          <%= render "file_manager_attributes", node: node, f: f%>
        </div>
        <div class="spacer">
        </div>
      </div>
    </div>
  <% end %>
</li>

Send remote requests as JSON in FM.
Send remote requests as JSON in FM.

Makes the responses MUCH faster.
