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
  • !7472

Add event triggers

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/nvie/custom-events into 3.0.0-wip Apr 04, 2013
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: nvie

This is a silly pull request, but I wanted to open it anyway to start a discussion. I am currently in the need of tweaking the exact dynamic positioning of the dropdown menu—I want to set that programmatically.

We could of course

  • write a wrapper function that toggles the dropdown as a side effect. You'd have to let go of the nice Bootstrap data-api, though;
  • Reimplement the whole menu manually. Now who'd want to do that?

Another way this could be easily solved in general, is by having the Bootstrap JS components trigger a formal event on key UI events, like right before the dropdown will show up. This is exactly my patch. It's only a tiny addition, and probably of shitty quality, but I'm more interested to know whether you'd support this idea more than my actual implementation.

I'm currently adding this little line to our custom Bootstrap build, and put all our specific logic in an event handler that's managed in my own code base. This structure allows for very specific customizations, while not having to sacrifice all the niceties of Bootstrap.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/nvie/custom-events