Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
input, textarea: disallow to provide custom content (close #1103)
- Loading branch information
Showing
18 changed files
with
36 additions
and
76 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
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,5 +1,4 @@ | ||
block('input').elem('control')( | ||
|
||
tag()('input'), | ||
|
||
attrs()(function() { | ||
|
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,5 @@ | ||
module.exports = function(bh) { | ||
|
||
bh.match('input_has-clear__box', function(ctx) { | ||
ctx.content([ctx.content(), { elem : 'clear' }], true); | ||
}); | ||
|
||
}; |
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
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,13 +1,11 @@ | ||
module.exports = function(bh) { | ||
|
||
bh.match('input', function(ctx, json) { | ||
ctx.tag('span') | ||
ctx | ||
.tag('span') | ||
.js(true) | ||
.tParam('_input', json); | ||
|
||
if(typeof ctx.content() === 'undefined') { | ||
ctx.content({ elem : 'box', content : { elem : 'control' } }); | ||
} | ||
.tParam('_input', json) | ||
.content({ elem : 'box', content : { elem : 'control' } }, true); | ||
}); | ||
|
||
}; |
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,5 @@ | ||
({ | ||
block : 'input', | ||
val : 'input', | ||
content : 'foobar' | ||
}); |
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 @@ | ||
<span class="input i-bem" data-bem="{"input":{}}"><span class="input__box"><input class="input__control" value="input"/></span></span> |
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
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
5 changes: 1 addition & 4 deletions
5
common.blocks/textarea/textarea.tmpl-specs/40-content.bemjson.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 |
---|---|---|
@@ -1,8 +1,5 @@ | ||
({ | ||
block : 'textarea', | ||
val : 'textarea', | ||
content : [ | ||
{ elem : 'control' }, | ||
{ block : 'icon', mods : { action : 'download' } } | ||
] | ||
content : 'foobar' | ||
}); |
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 +1 @@ | ||
<div class="textarea i-bem" data-bem="{"textarea":{}}"><textarea class="textarea__control">textarea</textarea><i class="icon icon_action_download"></i></div> | ||
<div class="textarea i-bem" data-bem="{"textarea":{}}"><textarea class="textarea__control">textarea</textarea></div> |
13 changes: 0 additions & 13 deletions
13
touch.blocks/input/input.tmpl-specs/30-search_autocomplete.bemjson.js
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
touch.blocks/input/input.tmpl-specs/30-search_autocomplete.html
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 +1 @@ | ||
<span class="input input_type_search i-bem" data-bem="{"input":{}}"><input class="input__control" autocomplete="on" autocorrect="on" autocapitalize="on" spellcheck="true" type="search"/></span> | ||
<span class="input input_type_search i-bem" data-bem="{"input":{}}"><span class="input__box"><input class="input__control" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" type="search"/></span></span> |
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 @@ | ||
<span class="input i-bem" data-bem="{"input":{}}"><span class="input__box"><input class="input__control" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" value="input"/></span></span> |
This file was deleted.
Oops, something went wrong.