|
|
@ -127,23 +127,18 @@ $.fn.form = function(parameters) { |
|
|
|
|
|
|
|
bindEvents: function() { |
|
|
|
module.verbose('Attaching form events'); |
|
|
|
if(settings.keyboardShortcuts) { |
|
|
|
$field |
|
|
|
.on('keydown' + eventNamespace, module.event.field.keydown) |
|
|
|
; |
|
|
|
} |
|
|
|
$module |
|
|
|
.on('submit' + eventNamespace, module.validate.form) |
|
|
|
.on('blur' + eventNamespace, selector.field, module.event.field.blur) |
|
|
|
.on('click' + eventNamespace, selector.submit, module.submit) |
|
|
|
.on('click' + eventNamespace, selector.reset, module.reset) |
|
|
|
.on('click' + eventNamespace, selector.clear, module.clear) |
|
|
|
; |
|
|
|
$field |
|
|
|
.on('blur' + eventNamespace, module.event.field.blur) |
|
|
|
; |
|
|
|
|
|
|
|
// attach events to common elements
|
|
|
|
module.attachEvents($submit, 'submit'); |
|
|
|
module.attachEvents($reset, 'reset'); |
|
|
|
module.attachEvents($clear, 'clear'); |
|
|
|
|
|
|
|
if(settings.keyboardShortcuts) { |
|
|
|
$module |
|
|
|
.on('keydown' + eventNamespace, selector.field, module.event.field.keydown) |
|
|
|
; |
|
|
|
} |
|
|
|
$field |
|
|
|
.each(function() { |
|
|
|
var |
|
|
|