Skip to content

Commit

Permalink
examples for select testing
Browse files Browse the repository at this point in the history
  • Loading branch information
gela committed Jul 24, 2014
1 parent 53b01d0 commit e1ad036
Show file tree
Hide file tree
Showing 8 changed files with 198 additions and 0 deletions.
32 changes: 32 additions & 0 deletions common.blocks/select/select.tests/simple1.bemjson.js
@@ -0,0 +1,32 @@
({
block : 'page',
title : 'bem-components: select',
mods : { theme : 'normal' },
head : [
{ elem : 'css', url : '_simple1.css' },
{ elem : 'js', url : '_simple1.js' }
],
content : {
block : 'select',
mods : { mode : 'radio', theme : 'normal', size : 'm', focused : true },
name : 'select1',
textMaxWidth : 100,
optionsMaxHeight : 100,
options : [
{ val : 1, text : 'first' },
{ val : 2, text : 'second', checked : true },
{ val : 3, text : 'third' },
{ val : 4, text : '4' },
{ val : 5, text : '5' },
{ val : 6, text : '6' },
{ val : 7, text : '7' },
{ val : 8, text : '8' },
{ val : 9, text : '9' },
{ val : 10, text : '10' },
{ val : 11, text : '11' },
{ val : 12, text : '12' },
{ val : 13, text : '13' },
{ val : 14, text : '14' }
]
}
});
20 changes: 20 additions & 0 deletions common.blocks/select/select.tests/simple2.bemjson.js
@@ -0,0 +1,20 @@
({
block : 'page',
title : 'bem-components: select',
mods : { theme : 'normal' },
head : [
{ elem : 'css', url : '_simple2.css' },
{ elem : 'js', url : '_simple2.js' }
],
content : {
block : 'select',
mods : { mode : 'radio-check', theme : 'normal', size : 'm' },
name : 'select2',
text : '—',
options : [
{ val : 1, text : 'first' },
{ val : 2, text : 'second' },
{ val : 3, text : 'third' }
]
}
});
20 changes: 20 additions & 0 deletions common.blocks/select/select.tests/simple3.bemjson.js
@@ -0,0 +1,20 @@
({
block : 'page',
title : 'bem-components: select',
mods : { theme : 'normal' },
head : [
{ elem : 'css', url : '_simple3.css' },
{ elem : 'js', url : '_simple3.js' }
],
content : {
block : 'select',
mods : { mode : 'check', theme : 'normal', size : 'm' },
name : 'select3',
text : '—',
options : [
{ val : 1, text : 'first' },
{ val : 2, text : 'second', checked : true },
{ val : 3, text : 'third', checked : true }
]
}
});
19 changes: 19 additions & 0 deletions common.blocks/select/select.tests/simple4.bemjson.js
@@ -0,0 +1,19 @@
({
block : 'page',
title : 'bem-components: select',
mods : { theme : 'normal' },
head : [
{ elem : 'css', url : '_simple4.css' },
{ elem : 'js', url : '_simple4.js' }
],
content : {
block : 'select',
mods : { mode : 'check', theme : 'normal', size : 'm' },
name : 'select4',
options : [
{ val : { id : 1 }, text : 'first', checkedText : '1' },
{ val : { id : 2 }, text : 'second', checkedText : '2', checked : true },
{ val : { id : 3 }, text : 'third', checkedText : '3', checked : true }
]
}
});
30 changes: 30 additions & 0 deletions common.blocks/select/select.tests/simple5.bemjson.js
@@ -0,0 +1,30 @@
({
block : 'page',
title : 'bem-components: select',
mods : { theme : 'normal' },
head : [
{ elem : 'css', url : '_simple5.css' },
{ elem : 'js', url : '_simple5.js' }
],
content : {
block : 'select',
mods : { mode : 'check', theme : 'normal', size : 'm' },
name : 'select5',
text : '—',
options : [
{
val : { id : 1 },
text : 'Twitter',
checkedText : 'tw',
icon : { block : 'icon', mods : { social : 'twitter' } }
},
{
val : { id : 2 },
text : 'VKontakte',
checkedText : 'vk',
icon : { block : 'icon', mods : { social : 'vk' } },
checked : true
}
]
}
});
31 changes: 31 additions & 0 deletions common.blocks/select/select.tests/simple6.bemjson.js
@@ -0,0 +1,31 @@
({
block : 'page',
title : 'bem-components: select',
mods : { theme : 'normal' },
head : [
{ elem : 'css', url : '_simple6.css' },
{ elem : 'js', url : '_simple6.js' }
],
content : {
block : 'select',
mods : { mode : 'check', theme : 'normal', size : 'm' },
text : 'empty',
options : [
{
group : [
{ val : 1, text : 'first' },
{ val : 2, text : 'second', checked : true },
{ val : 3, text : 'third' }
],
title : 'title of group 1'
},
{
group : [
{ val : 4, text : 'fourth' },
{ val : 5, text : 'fifth', checked : true },
{ val : 6, text : 'sixth', disabled : true }
]
}
]
}
});
23 changes: 23 additions & 0 deletions common.blocks/select/select.tests/simple7.bemjson.js
@@ -0,0 +1,23 @@
({
block : 'page',
title : 'bem-components: select',
mods : { theme : 'normal' },
head : [
{ elem : 'css', url : '_simple7.css' },
{ elem : 'js', url : '_simple7.js' }
],
content : {
tag : 'div', attrs : { style : 'width : 200px; display : inline-block;' },
content : {
block : 'select',
mods : { mode : 'radio-check', theme : 'normal', size : 'm' },
name : 'select333',
text : '—',
options : [
{ val : 1, text : 'first' },
{ val : 2, text : 'second second second second second second second second' },
{ val : 3, text : 'third' }
]
}
}
});
23 changes: 23 additions & 0 deletions common.blocks/select/select.tests/simple8.bemjson.js
@@ -0,0 +1,23 @@
({
block : 'page',
title : 'bem-components: select',
mods : { theme : 'normal' },
head : [
{ elem : 'css', url : '_simple8.css' },
{ elem : 'js', url : '_simple8.js' }
],
content : {
tag : 'div', attrs : { style : 'width : 200px; display : inline-block;' },
content : {
block : 'select',
mods : { mode : 'radio-check', theme : 'normal', size : 'm', width : 'available' },
name : 'select444',
text : '—',
options : [
{ val : 1, text : 'first' },
{ val : 2, text : 'second second second second second second second second' },
{ val : 3, text : 'third' }
]
}
}
});

0 comments on commit e1ad036

Please sign in to comment.