|
@ -77,24 +77,13 @@ $.fn.modal = function(parameters) { |
|
|
module.verbose('Initializing dimmer', $context); |
|
|
module.verbose('Initializing dimmer', $context); |
|
|
|
|
|
|
|
|
module.create.id(); |
|
|
module.create.id(); |
|
|
|
|
|
module.create.dimmer(); |
|
|
|
|
|
|
|
|
if($.fn.dimmer === undefined) { |
|
|
if($.fn.dimmer === undefined) { |
|
|
module.error(error.dimmer); |
|
|
module.error(error.dimmer); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
$dimmable = $context |
|
|
|
|
|
.dimmer({ |
|
|
|
|
|
debug : settings.debug, |
|
|
|
|
|
dimmerName : 'modals', |
|
|
|
|
|
closable : false, |
|
|
|
|
|
useCSS : true, |
|
|
|
|
|
duration : { |
|
|
|
|
|
show : settings.duration, |
|
|
|
|
|
hide : settings.duration |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
; |
|
|
|
|
|
|
|
|
|
|
|
if(settings.detachable) { |
|
|
if(settings.detachable) { |
|
|
$dimmable.dimmer('add content', $module); |
|
|
$dimmable.dimmer('add content', $module); |
|
@ -118,6 +107,23 @@ $.fn.modal = function(parameters) { |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
create: { |
|
|
create: { |
|
|
|
|
|
dimmer: function() { |
|
|
|
|
|
var |
|
|
|
|
|
defaultSettings = { |
|
|
|
|
|
debug : settings.debug, |
|
|
|
|
|
dimmerName : 'modals', |
|
|
|
|
|
duration : { |
|
|
|
|
|
show : settings.duration, |
|
|
|
|
|
hide : settings.duration |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
dimmerSettings = $.extend(true, defaultSettings, settings.dimmerSettings) |
|
|
|
|
|
; |
|
|
|
|
|
module.debug('Creating dimmer with settings', dimmerSettings); |
|
|
|
|
|
$dimmable = $context |
|
|
|
|
|
.dimmer(dimmerSettings) |
|
|
|
|
|
; |
|
|
|
|
|
}, |
|
|
id: function() { |
|
|
id: function() { |
|
|
module.verbose('Creating unique id for element'); |
|
|
module.verbose('Creating unique id for element'); |
|
|
id = module.get.uniqueID(); |
|
|
id = module.get.uniqueID(); |
|
@ -801,36 +807,41 @@ $.fn.modal = function(parameters) { |
|
|
|
|
|
|
|
|
$.fn.modal.settings = { |
|
|
$.fn.modal.settings = { |
|
|
|
|
|
|
|
|
name : 'Modal', |
|
|
|
|
|
namespace : 'modal', |
|
|
|
|
|
|
|
|
name : 'Modal', |
|
|
|
|
|
namespace : 'modal', |
|
|
|
|
|
|
|
|
debug : false, |
|
|
|
|
|
verbose : true, |
|
|
|
|
|
performance : true, |
|
|
|
|
|
|
|
|
debug : false, |
|
|
|
|
|
verbose : true, |
|
|
|
|
|
performance : true, |
|
|
|
|
|
|
|
|
allowMultiple : false, |
|
|
|
|
|
detachable : true, |
|
|
|
|
|
closable : true, |
|
|
|
|
|
autofocus : true, |
|
|
|
|
|
|
|
|
allowMultiple : false, |
|
|
|
|
|
detachable : true, |
|
|
|
|
|
closable : true, |
|
|
|
|
|
autofocus : true, |
|
|
|
|
|
|
|
|
|
|
|
dimmerSettings : { |
|
|
|
|
|
closable : false, |
|
|
|
|
|
useCSS : true |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
context : 'body', |
|
|
|
|
|
|
|
|
context : 'body', |
|
|
|
|
|
|
|
|
queue : false, |
|
|
|
|
|
duration : 500, |
|
|
|
|
|
easing : 'easeOutExpo', |
|
|
|
|
|
offset : 0, |
|
|
|
|
|
transition : 'scale', |
|
|
|
|
|
|
|
|
queue : false, |
|
|
|
|
|
duration : 500, |
|
|
|
|
|
easing : 'easeOutExpo', |
|
|
|
|
|
offset : 0, |
|
|
|
|
|
transition : 'scale', |
|
|
|
|
|
|
|
|
padding : 30, |
|
|
|
|
|
|
|
|
padding : 30, |
|
|
|
|
|
|
|
|
onShow : function(){}, |
|
|
|
|
|
onHide : function(){}, |
|
|
|
|
|
|
|
|
onShow : function(){}, |
|
|
|
|
|
onHide : function(){}, |
|
|
|
|
|
|
|
|
onVisible : function(){}, |
|
|
|
|
|
onHidden : function(){}, |
|
|
|
|
|
|
|
|
onVisible : function(){}, |
|
|
|
|
|
onHidden : function(){}, |
|
|
|
|
|
|
|
|
onApprove : function(){ return true; }, |
|
|
|
|
|
onDeny : function(){ return true; }, |
|
|
|
|
|
|
|
|
onApprove : function(){ return true; }, |
|
|
|
|
|
onDeny : function(){ return true; }, |
|
|
|
|
|
|
|
|
selector : { |
|
|
selector : { |
|
|
close : '.close, .actions .button', |
|
|
close : '.close, .actions .button', |
|
|