|
|
@ -151,7 +151,7 @@ $.fn.dimmer = function(parameters) { |
|
|
|
module.set.dimmed(); |
|
|
|
if($.fn.transition !== undefined) { |
|
|
|
$dimmer |
|
|
|
.transition(settings.transition + ' in', settings.duration, function() { |
|
|
|
.transition(settings.transition + ' in', module.get.duration(), function() { |
|
|
|
module.set.active(); |
|
|
|
callback(); |
|
|
|
}) |
|
|
@ -166,7 +166,7 @@ $.fn.dimmer = function(parameters) { |
|
|
|
width : '100%', |
|
|
|
height : '100%' |
|
|
|
}) |
|
|
|
.fadeTo(settings.duration, 1, function() { |
|
|
|
.fadeTo(module.get.duration(), 1, function() { |
|
|
|
$dimmer.removeAttr('style'); |
|
|
|
module.set.active(); |
|
|
|
callback(); |
|
|
@ -180,7 +180,7 @@ $.fn.dimmer = function(parameters) { |
|
|
|
if($.fn.transition !== undefined) { |
|
|
|
module.verbose('Hiding dimmer with css'); |
|
|
|
$dimmer |
|
|
|
.transition(settings.transition + ' out', settings.duration, function() { |
|
|
|
.transition(settings.transition + ' out', module.get.duration(), function() { |
|
|
|
module.remove.active(); |
|
|
|
callback(); |
|
|
|
}) |
|
|
@ -190,7 +190,7 @@ $.fn.dimmer = function(parameters) { |
|
|
|
module.verbose('Hiding dimmer with javascript'); |
|
|
|
$dimmer |
|
|
|
.stop() |
|
|
|
.fadeOut(settings.duration, function() { |
|
|
|
.fadeOut(module.get.duration(), function() { |
|
|
|
$dimmer.removeAttr('style'); |
|
|
|
module.remove.active(); |
|
|
|
callback(); |
|
|
@ -203,6 +203,17 @@ $.fn.dimmer = function(parameters) { |
|
|
|
get: { |
|
|
|
dimmer: function() { |
|
|
|
return $dimmer; |
|
|
|
}, |
|
|
|
duration: function() { |
|
|
|
if(typeof settings.duration == 'object') { |
|
|
|
if( module.is.active() ) { |
|
|
|
return settings.duration.hide; |
|
|
|
} |
|
|
|
else { |
|
|
|
return settings.duration.show; |
|
|
|
} |
|
|
|
} |
|
|
|
return settings.duration; |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
@ -512,7 +523,10 @@ $.fn.dimmer.settings = { |
|
|
|
|
|
|
|
on : false, |
|
|
|
closable : true, |
|
|
|
duration : 500, |
|
|
|
duration : { |
|
|
|
show : 500, |
|
|
|
hide : 500 |
|
|
|
}, |
|
|
|
|
|
|
|
onChange : function(){}, |
|
|
|
onShow : function(){}, |
|
|
|