Skip to content
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

Closed

Conversation

pavanagrawal
Copy link

@pavanagrawal pavanagrawal commented Sep 29, 2019

@mshibuya mshibuya added this to the 3.0.0 milestone Feb 28, 2021
Copy link
Contributor

@codealchemy codealchemy left a 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";
Copy link
Contributor

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.
Suggested change
@import "rails_admin/ra.collapsible_sidebar";

Comment on lines +1 to +9
$(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') + ' +')
});
});
Copy link
Contributor

@codealchemy codealchemy Nov 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prettier feedback

Suggested change
$(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

@mshibuya mshibuya modified the milestones: 3.0.0, 3.1.0 Jan 22, 2022
mshibuya added a commit that referenced this pull request Aug 7, 2022
mshibuya added a commit that referenced this pull request Aug 12, 2022
@mshibuya mshibuya closed this in e8cb8ed Aug 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants