-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1bb3e32
commit a930dbb
Showing
5 changed files
with
66 additions
and
7 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 |
---|---|---|
@@ -1,16 +1,39 @@ | ||
{ | ||
"name": "bem-forms", | ||
"version": "0.0.0", | ||
"authors": [ | ||
"version": "0.1.0", | ||
"keywords": [ | ||
"bem", | ||
"form", | ||
"forms" | ||
], | ||
"author": [ | ||
"Vyacheslav Aristov <[email protected]>" | ||
], | ||
"contributors": [ | ||
{ | ||
"name": "Ivan Voischev", | ||
"email": "[email protected]" | ||
}, | ||
{ | ||
"name": "Anton Winogradov", | ||
"email": "[email protected]" | ||
}, | ||
{ | ||
"name": "Alexej Yaroshevich", | ||
"email": "[email protected]" | ||
}, | ||
{ | ||
"name": "Daniel Sabelnikov", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"ignore": [ | ||
"node_modules", | ||
"libs", | ||
"bundles" | ||
], | ||
"dependencies": { | ||
"bem-components": "bem/bem-components#v2" | ||
"bem-components": "2.2.1" | ||
}, | ||
"devDependencies": { | ||
"bem-pr": "~0.10.0" | ||
|
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 @@ | |
{ | ||
display: none; | ||
|
||
&.message_visible | ||
&.message_showed | ||
{ | ||
display: inherit; | ||
} | ||
|
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
35 changes: 35 additions & 0 deletions
35
test.blocks/form-field/_has-validation/form-field_has-validation.browser.js
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/** | ||
* @module form-field | ||
*/ | ||
modules.define('form-field', | ||
['i-bem__dom', 'validation'], | ||
function(provide, BEMDOM, Validation, FormField) { | ||
|
||
/** | ||
* Field block | ||
*/ | ||
FormField.decl({ block : this.name, modName : 'has-validation', modVal : true }, /** @lends form-field.prototype */{ | ||
|
||
onSetMod : { | ||
'js' : { | ||
'inited' : function() { | ||
this.__base.apply(this, arguments); | ||
} | ||
} | ||
}, | ||
/** | ||
* Extend by custom logic | ||
*/ | ||
_updateStatus : function() { | ||
this.__base.apply(this, arguments); | ||
|
||
if(this.getStatus() && this.getMessage()) { | ||
this.setMessageVal(this.getStatus()); | ||
this.getMessage().show(); | ||
} | ||
} | ||
}); | ||
|
||
provide(FormField); | ||
|
||
}); |
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