Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Merge requests
  • !6731

Prefer to collapse siblings

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/ograycode/2.3.0-wip into 2.3.0-wip Jan 29, 2013
  • Overview 0
  • Commits 2
  • Pipelines 0
  • Changes 1

Created by: ograycode

I wasn't exactly sure what the preferred method for this fix would be, or if is even really considered an issue, so I put this together and figured it would be a good starting point.

At the heart of this pull request is when you collapse or un-collapse a navbar, if you have more than one of them, then all of the navbars will collapse. My change makes the code prefer siblings, and if no siblings exist, it will use the current implementation, e.g. collapse all.

JSFiddle's: With Fix: http://jsfiddle.net/qW8zh/1/ Without Fix: http://jsfiddle.net/qW8zh/3/

Commit: This fix is to prefer to collapse siblings instead of every target. The situation in which this is useful is when two collapsible navbars exist on one screen. The reasoning for the if block is simple, if we have a sibling, prefer that, if not, then do it the 'legacy' way, as I do not know what other dependencies their may be.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/ograycode/2.3.0-wip