Sha256: 7c188e2444886d8bc5c54fc80e0a4a2e5b15aa74ec443c790c323d8e20230287
Contents?: true
Size: 1.42 KB
Versions: 13
Compression:
Stored size: 1.42 KB
Contents
%ul.nav.nav-list.nav-list-panel.space-list %li = link_to wiki_pages_path, class: "space-link" do All Spaces %i.fa.fa-arrow-circle-right %li.divider - if @space.present? && @space.persisted? %li.nav-header = @space.title - @space.children.each do |page| = render 'wiki/spaces/page_list_item', page: page, end_page: @page -# %li.page-list-item{data: {page_id: page.id}} -# = link_to wiki_page_path(page) do -# - if page.has_children? -# %i.fa.fa-plus-square -# = page.title - else - Page.roots.each do |page| = render 'wiki/spaces/page_list_item', page: page, end_page: @page -# %li -# = link_to new_wiki_space_path do -# %i.fa.fa-plus :coffeescript $ -> $(document).on "click", ".page-list-item a i.fa-plus-square", -> $i = $(this) $i.toggleClass("fa-plus-square").toggleClass('fa-minus-square') page_id = $i.closest(".page-list-item").data("page-id") $.ajax method: "GET" url: "/wiki/spaces/" + page_id + "/space_list" success: (data) -> $i.closest("a").after data console.log "lalla" false $(document).on "click", ".page-list-item a i.fa-minus-square", -> $i = $(this) $i.toggleClass("fa-plus-square").toggleClass('fa-minus-square') $i.closest(".page-list-item").find("ul.nav-list-sub").remove() console.log "lalla" false
Version data entries
13 entries across 13 versions & 1 rubygems