Skip to content

Commit

Permalink
Changed Test Controls app to show small, large, and jumbo control siz…
Browse files Browse the repository at this point in the history
…es for SC.SegmentedView
  • Loading branch information
ColinCampbell authored and Juan Pinzon committed Sep 21, 2010
1 parent 2084e59 commit bb6b9fa
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion apps/test_controls/resources/segmented_page.js
Expand Up @@ -11,20 +11,46 @@ TestControls.segmentedPage = SC.View.design({
form: SC.FormView.design({
classNames: ["sample_controls"],
layout: { left: 20, top: 40, right: 20, bottom: 40 },
childViews: "header normal disabled multiple multiple_side_by_side".w(),
childViews: "header small normal large jumbo disabled multiple multiple_side_by_side".w(),

header: SC.LabelView.design({
layout: {width:300, height:24},
classNames: "header".w(),
value: "Segmented Views "
}),

small: SC.FormView.row(SC.SegmentedView.design({
layout: { left: 0, width: 200, height: 18, centerY: 0},
controlSize: SC.SMALL_CONTROL_SIZE,
items: [ { title: "One", value: "one" },{ title: "Two", value: "two" },{ title: "Three", value: "three" } ],
itemTitleKey: "title", itemValueKey: "value",
value: null
})),

normal: SC.FormView.row(SC.SegmentedView.design({
layout: { left: 0, width: 200, height: 24, centerY: 0},
controlSize: SC.REGULAR_CONTROL_SIZE,
items: [ { title: "One", value: "one" },{ title: "Two", value: "two" },{ title: "Three", value: "three" } ],
itemTitleKey: "title", itemValueKey: "value",
value: null
})),

large: SC.FormView.row(SC.SegmentedView.design({
layout: { left: 0, width: 200, height: 30, centerY: 0},
controlSize: SC.LARGE_CONTROL_SIZE,
items: [ { title: "One", value: "one" },{ title: "Two", value: "two" },{ title: "Three", value: "three" } ],
itemTitleKey: "title", itemValueKey: "value",
value: null
})),

jumbo: SC.FormView.row(SC.SegmentedView.design({
layout: { left: 0, width: 200, height: 44, centerY: 0},
controlSize: SC.JUMBO_CONTROL_SIZE,
items: [ { title: "One", value: "one" },{ title: "Two", value: "two" },{ title: "Three", value: "three" } ],
itemTitleKey: "title", itemValueKey: "value",
value: null
})),

disabled: SC.FormView.row(SC.SegmentedView.design({
layout: { left: 0, width: 200, height: 24, centerY: 0},
isEnabled: NO,
Expand Down

0 comments on commit bb6b9fa

Please sign in to comment.