From 2c8705ac3e0c64c6e996a699688bbab3b2182c16 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Mon, 4 Nov 2013 17:36:22 +0800 Subject: [PATCH] fixed site structure and also member roles side bar problem. --- app/assets/javascripts/lib/items/items.js.erb | 12 ++++++------ .../admin/users_new_interface/_side_bar.html.erb | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/assets/javascripts/lib/items/items.js.erb b/app/assets/javascripts/lib/items/items.js.erb index 6e03b4ad..304d21b3 100644 --- a/app/assets/javascripts/lib/items/items.js.erb +++ b/app/assets/javascripts/lib/items/items.js.erb @@ -286,7 +286,6 @@ function getView(module_id, id) { cache: false, }); } - $(function() { $pageModule = null, $pageF2E = null, @@ -322,11 +321,12 @@ $(function() { disableNesting: 'no-nest', update: function(event, ui) { var position = null; - if($(ui.item).closest('ol').hasClass('item-groups')) { - position = $(ui.item).index() - 1; - } else { - position = $(ui.item).index(); - }; + // if($(ui.item).closest('ol').hasClass('item-groups')) { + // position = $(ui.item).index() - 1; + // } else { + // position = $(ui.item).index(); + // }; + position = $(ui.item).index(); $.post("<%= Rails.application.routes.url_helpers.update_position_admin_items_path %>", { id: ui.item.attr('id'), parent_id: (ui.item.parent().closest('li').attr('id') || ui.item.parent().closest('ol').attr('id')), position: position } ); } }); diff --git a/app/views/admin/users_new_interface/_side_bar.html.erb b/app/views/admin/users_new_interface/_side_bar.html.erb index 1f43a026..fbeedd3c 100644 --- a/app/views/admin/users_new_interface/_side_bar.html.erb +++ b/app/views/admin/users_new_interface/_side_bar.html.erb @@ -6,7 +6,7 @@