|
|
@ -341,7 +341,9 @@ $.fn.modal = function(parameters) { |
|
|
|
module.add.keyboardShortcuts(); |
|
|
|
module.save.focus(); |
|
|
|
module.set.active(); |
|
|
|
module.set.autofocus(); |
|
|
|
if(settings.autofocus) { |
|
|
|
module.set.autofocus(); |
|
|
|
} |
|
|
|
callback(); |
|
|
|
} |
|
|
|
}) |
|
|
@ -562,17 +564,15 @@ $.fn.modal = function(parameters) { |
|
|
|
|
|
|
|
set: { |
|
|
|
autofocus: function() { |
|
|
|
if(settings.autofocus) { |
|
|
|
var |
|
|
|
$inputs = $module.filter(':input').filter(':visible'), |
|
|
|
$autofocus = $inputs.filter('[autofocus]'), |
|
|
|
$input = ($autofocus.length > 0) |
|
|
|
? $autofocus.first() |
|
|
|
: $inputs.first() |
|
|
|
; |
|
|
|
if($input.length > 0) { |
|
|
|
$input.focus(); |
|
|
|
} |
|
|
|
var |
|
|
|
$inputs = $module.fin(':input').filter(':visible'), |
|
|
|
$autofocus = $inputs.filter('[autofocus]'), |
|
|
|
$input = ($autofocus.length > 0) |
|
|
|
? $autofocus.first() |
|
|
|
: $inputs.first() |
|
|
|
; |
|
|
|
if($input.length > 0) { |
|
|
|
$input.focus(); |
|
|
|
} |
|
|
|
}, |
|
|
|
clickaway: function() { |
|
|
|