UI fix for multiple dropdowns inside the same context
This commit is contained in:
parent
9dc1b4d836
commit
7ed50690a2
|
|
@ -8,12 +8,16 @@
|
||||||
*/
|
*/
|
||||||
+function ($) { "use strict";
|
+function ($) { "use strict";
|
||||||
|
|
||||||
$(document).on('shown.bs.dropdown', '.dropdown', function() {
|
$(document).on('shown.bs.dropdown', '.dropdown', function(event, relatedTarget) {
|
||||||
$(document.body).addClass('dropdown-open')
|
$(document.body).addClass('dropdown-open')
|
||||||
|
|
||||||
var dropdown = $('.dropdown-menu', this),
|
var dropdown = $(relatedTarget.relatedTarget).siblings('.dropdown-menu'),
|
||||||
dropdownContainer = $(this).data('dropdown-container')
|
dropdownContainer = $(this).data('dropdown-container')
|
||||||
|
|
||||||
|
if (dropdown.length === 0){
|
||||||
|
dropdown = $('.dropdown-menu', this)
|
||||||
|
}
|
||||||
|
|
||||||
if ($('.dropdown-container', dropdown).length == 0) {
|
if ($('.dropdown-container', dropdown).length == 0) {
|
||||||
|
|
||||||
var title = $('[data-toggle=dropdown]', this).text(),
|
var title = $('[data-toggle=dropdown]', this).text(),
|
||||||
|
|
|
||||||
|
|
@ -1943,8 +1943,9 @@ if(!data)$this.data('oc.balloon-selector',(data=new BalloonSelector(this,options
|
||||||
$.fn.balloonSelector.Constructor=BalloonSelector
|
$.fn.balloonSelector.Constructor=BalloonSelector
|
||||||
$.fn.balloonSelector.noConflict=function(){$.fn.balloonSelector=old
|
$.fn.balloonSelector.noConflict=function(){$.fn.balloonSelector=old
|
||||||
return this}
|
return this}
|
||||||
$(document).on('render',function(){$('div[data-control=balloon-selector]').balloonSelector()})}(window.jQuery);+function($){"use strict";$(document).on('shown.bs.dropdown','.dropdown',function(){$(document.body).addClass('dropdown-open')
|
$(document).on('render',function(){$('div[data-control=balloon-selector]').balloonSelector()})}(window.jQuery);+function($){"use strict";$(document).on('shown.bs.dropdown','.dropdown',function(event,relatedTarget){$(document.body).addClass('dropdown-open')
|
||||||
var dropdown=$('.dropdown-menu',this),dropdownContainer=$(this).data('dropdown-container')
|
var dropdown=$(relatedTarget.relatedTarget).siblings('.dropdown-menu'),dropdownContainer=$(this).data('dropdown-container')
|
||||||
|
if(dropdown.length===0){dropdown=$('.dropdown-menu',this)}
|
||||||
if($('.dropdown-container',dropdown).length==0){var title=$('[data-toggle=dropdown]',this).text(),titleAttr=dropdown.data('dropdown-title'),timer=null
|
if($('.dropdown-container',dropdown).length==0){var title=$('[data-toggle=dropdown]',this).text(),titleAttr=dropdown.data('dropdown-title'),timer=null
|
||||||
if(titleAttr!==undefined)
|
if(titleAttr!==undefined)
|
||||||
title=titleAttr
|
title=titleAttr
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue