|
|
@ -247,16 +247,21 @@ $.fn.modal = function(parameters) { |
|
|
|
isInDOM = $.contains(document.documentElement, event.target) |
|
|
|
; |
|
|
|
if(!isInModal && isInDOM) { |
|
|
|
module.debug('Dimmer clicked, hiding all modals'); |
|
|
|
if( module.is.active() ) { |
|
|
|
module.remove.clickaway(); |
|
|
|
if(settings.allowMultiple) { |
|
|
|
module.hide(); |
|
|
|
} |
|
|
|
else { |
|
|
|
module.hideAll(); |
|
|
|
if(settings.closable) { |
|
|
|
module.debug('Dimmer clicked, hiding all modals'); |
|
|
|
if( module.is.active() ) { |
|
|
|
module.remove.clickaway(); |
|
|
|
if(settings.allowMultiple) { |
|
|
|
module.hide(); |
|
|
|
} |
|
|
|
else { |
|
|
|
module.hideAll(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
module.debug('Dimmer clicked, but closable is set to false'); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
debounce: function(method, delay) { |
|
|
@ -512,11 +517,9 @@ $.fn.modal = function(parameters) { |
|
|
|
$module.removeClass(className.active); |
|
|
|
}, |
|
|
|
clickaway: function() { |
|
|
|
if(settings.closable) { |
|
|
|
$dimmer |
|
|
|
.off('click' + elementEventNamespace) |
|
|
|
; |
|
|
|
} |
|
|
|
$dimmer |
|
|
|
.off('click' + elementNamespace) |
|
|
|
; |
|
|
|
}, |
|
|
|
bodyStyle: function() { |
|
|
|
if($body.attr('style') === '') { |
|
|
@ -614,11 +617,9 @@ $.fn.modal = function(parameters) { |
|
|
|
} |
|
|
|
}, |
|
|
|
clickaway: function() { |
|
|
|
if(settings.closable) { |
|
|
|
$dimmer |
|
|
|
.on('click' + elementEventNamespace, module.event.click) |
|
|
|
; |
|
|
|
} |
|
|
|
$dimmer |
|
|
|
.on('click' + elementNamespace, module.event.click) |
|
|
|
; |
|
|
|
}, |
|
|
|
dimmerSettings: function() { |
|
|
|
if($.fn.dimmer === undefined) { |
|
|
|