Skip to content
GitLab
    • Explore Projects Groups Snippets
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
  • !8448

Fix to support nested carousels

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/Deele/patch-1 into master 12 years ago
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: Deele

To allow usage of nested carousels, there is a need to constraint selectors to only first level of elements so children carousels will be left untouched by sliding of parent carousel.

Compare
  • master (base)

and
  • latest version
    2ec9a2f1
    1 commit, 2 years ago

1 file
+ 6
- 6

    Preferences

    File browser
    Compare changes
js/bootstrap-carousel.js
+ 6
- 6
  • View file @ 2ec9a2f1


@@ -28,7 +28,7 @@
var Carousel = function (element, options) {
this.$element = $(element)
this.$indicators = this.$element.find('.carousel-indicators')
this.$indicators = this.$element.find('> .carousel-indicators')
this.options = options
this.options.pause == 'hover' && this.$element
.on('mouseenter', $.proxy(this.pause, this))
@@ -47,7 +47,7 @@
}
, getActiveIndex: function () {
this.$active = this.$element.find('.item.active')
this.$active = this.$element.find('> .item.active')
this.$items = this.$active.parent().children()
return this.$items.index(this.$active)
}
@@ -73,7 +73,7 @@
, pause: function (e) {
if (!e) this.paused = true
if (this.$element.find('.next, .prev').length && $.support.transition.end) {
if (this.$element.find('> .carousel-inner > .next, > .carousel-inner > .prev').length && $.support.transition.end) {
this.$element.trigger($.support.transition.end)
this.cycle(true)
}
@@ -93,7 +93,7 @@
}
, slide: function (type, next) {
var $active = this.$element.find('.item.active')
var $active = this.$element.find('> .carousel-inner > .item.active')
, $next = next || $active[type]()
, isCycling = this.interval
, direction = type == 'next' ? 'left' : 'right'
@@ -105,7 +105,7 @@
isCycling && this.pause()
$next = $next.length ? $next : this.$element.find('.item')[fallback]()
$next = $next.length ? $next : this.$element.find('> .carousel-inner > .item')[fallback]()
e = $.Event('slide', {
relatedTarget: $next[0]
@@ -204,4 +204,4 @@
e.preventDefault()
})
}(window.jQuery);
\ No newline at end of file
}(window.jQuery);
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
1
Enhancement: Compatibility
1
Enhancement: Compatibility
    Assign labels
  • Manage project labels

Milestone
5.3.1
5.3.1 (expired)
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
0
0 participants
Reference: OpenAPITools/openapi-generator!10911
Source branch: github/fork/Deele/patch-1

Menu

Explore Projects Groups Snippets