Skip to content

Commit

Permalink
Merge pull request #1169 from /issues/1160@v2
Browse files Browse the repository at this point in the history
 textarea: implement _width_available #1160
  • Loading branch information
hcodes committed Dec 5, 2014
2 parents e50a988 + 864aa47 commit 29a2903
Show file tree
Hide file tree
Showing 23 changed files with 58 additions and 3 deletions.
36 changes: 36 additions & 0 deletions common.blocks/textarea/textarea.tests/gemini.bemjson.js
Expand Up @@ -113,6 +113,24 @@
],
cls : 'default-label-disabled'
},
{
block : 'test',
attrs : { style : 'width: 350px;' },
content : {
block : 'textarea',
mods : { width : 'available' }
},
cls : 'default-width-available-enabled'
},
{
block : 'test',
attrs : { style : 'width: 350px;' },
content : {
block : 'textarea',
mods : { width : 'available', disabled : true }
},
cls : 'default-width-available-disabled'
},

{ tag : 'hr' },

Expand Down Expand Up @@ -257,6 +275,24 @@
],
cls : 'islands-label-disabled'
},
{
block : 'test',
attrs : { style : 'width: 350px;' },
content : {
block : 'textarea',
mods : { theme : 'islands', size : 'm', width : 'available' }
},
cls : 'islands-width-available-enabled'
},
{
block : 'test',
attrs : { style : 'width: 350px;' },
content : {
block : 'textarea',
mods : { theme : 'islands', size : 'm', width : 'available', disabled : true }
},
cls : 'islands-width-available-disabled'
},
{
block : 'textarea',
mods : { theme : 'islands', size : 'm' },
Expand Down
11 changes: 9 additions & 2 deletions common.blocks/textarea/textarea.tests/simple.bemjson.js
Expand Up @@ -36,9 +36,9 @@
val : 'disabled',
placeholder : 'placeholder'
} },
{ tag : 'p', attrs : { style : 'width: 350px;' }, content : {
{ attrs : { style : 'width: 350px;' }, content : {
block : 'textarea',
mods : { theme : 'simple', size : 'm' },
mods : { theme : 'simple', size : 'm', width : 'available' },
val : 'width',
placeholder : 'placeholder'
} },
Expand All @@ -56,6 +56,13 @@
val : 'disabled'
} },

{ attrs : { style : 'width: 350px;' }, content : {
block : 'textarea',
mods : { theme : 'islands', size : 'm', width : 'available' },
val : 'width',
placeholder : 'placeholder'
} },

{ tag : 'h3', content : 'size' },
{ tag : 'p', content : {
block : 'textarea',
Expand Down
Expand Up @@ -128,4 +128,9 @@
padding-left: 12px;
}
}

&.textarea_width_available
{
width: 100%;
}
}
Expand Up @@ -51,4 +51,9 @@
}
}
}

&.textarea_width_available
{
width: 100%;
}
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion gemini/textarea.gemini.js
Expand Up @@ -11,6 +11,7 @@ gemini.suite('textarea', function(root) {
'islands-longVal',
'islands-longPlaceholder',
'islands-label',
'islands-width-available',
'islands-sizeS',
'islands-sizeM',
'islands-sizeL',
Expand All @@ -20,7 +21,8 @@ gemini.suite('textarea', function(root) {
'default-placeholder',
'default-longVal',
'default-longPlaceholder',
'default-label'
'default-label',
'default-width-available'
]
.forEach(function(test) {
var textareaSelector = '.' + test,
Expand Down

0 comments on commit 29a2903

Please sign in to comment.