Sha256: ecb2161a4c677d326ef0b9a6c65e5aef29ccf6a6c18f35494d1d149ed80c9ba0

Contents?: true

Size: 519 Bytes

Versions: 16

Compression:

Stored size: 519 Bytes

Contents

// TODO: Extract this so the server only renders the HTML.
var li = $('li#comfy_cms_page_<%=@page.id%>');
li.find('.item .toggle').first().toggleClass('open');

<% if session[:cms_page_tree].member?(@page.id.to_s) %>
  if(!li.find('ul.children')[0]) {
    li.append('<ul class="children sortable pl-md-3"><%= escape_javascript(render partial: "index_branch", collection: @page.children) %></ul>');
    CMS.sortableList.dispose();
    CMS.sortableList.init();
  }
<% else %>
  li.find('ul.children').remove();
<% end %>

Version data entries

16 entries across 16 versions & 7 rubygems

Version Path
comfortable_media_surfer-3.1.0 app/views/comfy/admin/cms/pages/toggle_branch.js.erb
comfortable_media_surfer-3.0.0 app/views/comfy/admin/cms/pages/toggle_branch.js.erb
comfortable_mexican_sofa-2.0.19 app/views/comfy/admin/cms/pages/toggle_branch.js.erb
PixelForce_ETS-0.0.2 app/views/comfy/admin/cms/pages/toggle_branch.js.erb
PixelForce_ETS-0.0.1 app/views/comfy/admin/cms/pages/toggle_branch.js.erb
kcyEtsTest2-0.0.4 app/views/comfy/admin/cms/pages/toggle_branch.js.erb
kcyEtsTest2-0.0.3 app/views/comfy/admin/cms/pages/toggle_branch.js.erb
kcyEtsTest2-0.0.2 app/views/comfy/admin/cms/pages/toggle_branch.js.erb
kcyEtsTest2-0.0.1 app/views/comfy/admin/cms/pages/toggle_branch.js.erb
kcyEtsTest-0.0.1 app/views/comfy/admin/cms/pages/toggle_branch.js.erb
kcyEtsTest-2.2.19 app/views/comfy/admin/cms/pages/toggle_branch.js.erb
ComfortableMexicanSofa-2.0.18 app/views/comfy/admin/cms/pages/toggle_branch.js.erb
kcy1-1.0 app/views/comfy/admin/cms/pages/toggle_branch.js.erb
comfortable_mexican_sofa-2.0.18 app/views/comfy/admin/cms/pages/toggle_branch.js.erb
comfortable_mexican_sofa-2.0.17 app/views/comfy/admin/cms/pages/toggle_branch.js.erb
comfortable_mexican_sofa-2.0.16 app/views/comfy/admin/cms/pages/toggle_branch.js.erb