diff --git a/app/assets/stylesheets/admin/treeview.sass b/app/assets/stylesheets/admin/treeview.sass index 2c33e867ce3e75b926f884f64c58257fd814a00b..b954909cf8ad5c0f7c32798abc6bba6d686acf42 100644 --- a/app/assets/stylesheets/admin/treeview.sass +++ b/app/assets/stylesheets/admin/treeview.sass @@ -1,4 +1,13 @@ .treeview + &__branch, &__leaf + & > .treeview__label + & > .move_btn + display: none + &:hover + & > .treeview__label + & > .move_btn + display: inline + &__branch & > .treeview__label & > a .close_btn diff --git a/app/controllers/admin/communication/website/pages_controller.rb b/app/controllers/admin/communication/website/pages_controller.rb index c2731adb88fff1659b9ebdd535c15de1cf0f8b91..73d263dcad833ca5184fbfaccd3ba8fa8a74c3f1 100644 --- a/app/controllers/admin/communication/website/pages_controller.rb +++ b/app/controllers/admin/communication/website/pages_controller.rb @@ -10,9 +10,6 @@ class Admin::Communication::Website::PagesController < Admin::Communication::Web return unless request.xhr? @page = @website.pages.find(params[:id]) @children = @page.children.ordered - # respond_to do |format| - # format.html { render :layout => false } - # end end def show diff --git a/app/views/admin/communication/website/pages/children.js.erb b/app/views/admin/communication/website/pages/children.js.erb index 113897cf02be5c65d034ca90daccc3b3801d47eb..0351232a9a14132053bc1732b8d9c363e8739710 100644 --- a/app/views/admin/communication/website/pages/children.js.erb +++ b/app/views/admin/communication/website/pages/children.js.erb @@ -1,6 +1,4 @@ $branch = $('.js-treeview-branch[data-id=<%= @page.id %>]'); $('.js-treeview-children', $branch).html("<%= escape_javascript(render 'treebranch', pages: @children) %>"); $branch.addClass('treeview__branch--loaded'); - - window.osuny.treeView.initSortable();