-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #57 from peckadesign/initForm
Oprava inicializace formulářů
- Loading branch information
Showing
2 changed files
with
9 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
"name": "pd-forms", | ||
"title": "pdForms", | ||
"description": "Customization of netteForms for use in PeckaDesign.", | ||
"version": "4.1.1", | ||
"version": "4.1.2", | ||
"author": "PeckaDesign, s.r.o <[email protected]>", | ||
"contributors": [ | ||
"Radek Šerý <[email protected]>", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/** | ||
* @name pdForms | ||
* @author Radek Šerý <[email protected]> | ||
* @version 4.1.1 | ||
* @version 4.1.2 | ||
* | ||
* Features: | ||
* - live validation | ||
|
@@ -45,7 +45,7 @@ | |
|
||
var pdForms = window.pdForms || {}; | ||
|
||
pdForms.version = '4.1.1'; | ||
pdForms.version = '4.1.2'; | ||
|
||
|
||
/** | ||
|
@@ -156,6 +156,7 @@ | |
} | ||
} | ||
|
||
|
||
validate.forEach(function(elem) { | ||
if (elem.getAttribute('data-pdforms-ever-focused')) { | ||
// assumes the input is valid, therefore removing all messages except those associated with ajax rules; this | ||
|
@@ -711,13 +712,16 @@ | |
/** | ||
* Setup handlers. | ||
*/ | ||
Nette.initForm = function (form) { | ||
Nette.initForm = function (form, event) { | ||
// Skip already initialized forms | ||
if (form.noValidate) { | ||
// Always call the original `initForm` method. This method handles already initialised forms itself. | ||
pdForms.Nette.initForm(form, event); | ||
|
||
return; | ||
} | ||
|
||
pdForms.Nette.initForm(form); | ||
pdForms.Nette.initForm(form, event); | ||
|
||
addDelegatedEventListener(form, 'focusout change', 'select, textarea, input:not([type="submit"]):not([type="reset"])', setEverFocused); | ||
|
||
|