-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Collapsible Sidebar Menu #3198
Added Collapsible Sidebar Menu #3198
Conversation
From pulling latest change to branch in 462045f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pavanagrawal thanks for the PR! I hope you don't mind my bringing in the latest changes here (rails_admin
has since switched from TravisCI and there have been some recent updates that impact your changes as well). If this is something you're still interested in landing, it looks like there are a few minor issues to resolve beforehand (the Dropbox link is no longer working as well).
@@ -43,7 +43,7 @@ | |||
@import "rails_admin/ra.filtering-multiselect"; | |||
@import "rails_admin/ra.widgets"; | |||
@import "rails_admin/ra.sidescroll"; | |||
|
|||
@import "rails_admin/ra.collapsible_sidebar"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be the only issue affecting tests
# SassC::SyntaxError:
# Error: File to import not found or unreadable: rails_admin/ra.collapsible_sidebar.
@import "rails_admin/ra.collapsible_sidebar"; |
$(function() { | ||
$('.ra-menu-collapse').on('shown.bs.collapse', function () { | ||
var target_obj = $("[data-menu-label-id*='"+$(this).attr('id')+"']"); | ||
target_obj.html(target_obj.attr('data-menu-label') + ' -') | ||
}).on('hidden.bs.collapse', function () { | ||
var target_obj = $("[data-menu-label-id*='"+$(this).attr('id')+"']"); | ||
target_obj.html(target_obj.attr('data-menu-label') + ' +') | ||
}); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prettier
feedback
$(function() { | |
$('.ra-menu-collapse').on('shown.bs.collapse', function () { | |
var target_obj = $("[data-menu-label-id*='"+$(this).attr('id')+"']"); | |
target_obj.html(target_obj.attr('data-menu-label') + ' -') | |
}).on('hidden.bs.collapse', function () { | |
var target_obj = $("[data-menu-label-id*='"+$(this).attr('id')+"']"); | |
target_obj.html(target_obj.attr('data-menu-label') + ' +') | |
}); | |
}); | |
$(function () { | |
$(".ra-menu-collapse") | |
.on("shown.bs.collapse", function () { | |
var target_obj = $("[data-menu-label-id*='" + $(this).attr("id") + "']"); | |
target_obj.html(target_obj.attr("data-menu-label") + " -"); | |
}) | |
.on("hidden.bs.collapse", function () { | |
var target_obj = $("[data-menu-label-id*='" + $(this).attr("id") + "']"); | |
target_obj.html(target_obj.attr("data-menu-label") + " +"); | |
}); | |
}); |
If you could remove the jQuery
from here as well, that would help progress towards #2893
Supporting Video : https://www.dropbox.com/s/ldlnxl32kyx0kgs/ra_collapsible_sidebar.mov?dl=0