fixed site structure and also member roles side bar problem.

This commit is contained in:
Harry Bomrah 2013-11-04 17:36:22 +08:00 committed by saurabhbhatia
parent 2b97d4ca22
commit 2c8705ac3e
2 changed files with 8 additions and 8 deletions

View File

@ -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 } );
}
});

View File

@ -6,7 +6,7 @@
<div id="sidebar-menu">
<div class="scroller">
<%= content_tag :ul, :class => "sidebar-nav" do -%>
<%= content_tag :li, :class => active_for_controllers('users_new_interface') do -%>
<%= content_tag :li, :class => active_for_controllers('users_new_interface','roles') do -%>
<%= link_to( ( content_tag(:span, content_tag(:i, nil, :class => 'icons-user'))), admin_users_new_interface_index_path) %>
<% end -%>
<%= content_tag :li, :class => active_for_controllers('plugins') do -%>
@ -30,7 +30,7 @@
<%= content_tag :li, link_to((content_tag(:span, t(:add_member))), new_admin_users_new_interface_path), :class => active_for_action('users_new_interface', 'new') if (is_admin? rescue nil) %>
<%= content_tag :li, link_to((content_tag(:span, t(:member_authorization))), '#'), :class => active_for_action('users_new_interfacexx', 'index') if (is_admin? rescue nil) %>
<%= content_tag :li, link_to((content_tag(:span, t(:member_registration))), '#'), :class => active_for_action('users_new_interfacexx', 'index') if (is_admin? rescue nil) %>
<%= content_tag :li, link_to((content_tag(:span, t(:member_role))),admin_roles_path ), :class => active_for_action('users_new_interfacexx', 'index') if (is_admin? rescue nil) %>
<%= content_tag :li, link_to((content_tag(:span, t(:member_role))),admin_roles_path ), :class => active_for_action('roles', 'index') if (is_admin? rescue nil) %>
<%= content_tag :li, link_to((content_tag(:span, t(:member_info))), edit_admin_info_path(Info.first.id.to_s)), :class => active_for_action('users_new_interfacexx', 'index') if (is_admin? rescue nil) and Info.first %>
<% end -%>
</div>