// ========================================================================== // Project: SproutCore - JavaScript Application Framework // Copyright: ©2006-2011 Strobe Inc. and contributors. // Portions ©2008-2010 Apple Inc. All rights reserved. // License: Licensed under MIT license (see license.js) // ========================================================================== /*globals TestControls Forms*/ TestControls.radioPage = SC.View.design({ childViews: "form".w(), form: SC.FormView.design({ classNames: ["sample_controls"], layout: { left: 20, top: 40, right: 20, bottom: 40 }, childViews: "header normal disabled multiple horizontal".w(), // Plain Views header: SC.LabelView.design({ layout: { width: 250, height: 18 }, value: "Radio Views", classNames: "header".w() }), normal: SC.FormView.row(SC.RadioView.design({ layout: { width: 150, height: 60}, items: [ { title: "One", value: "one" },{ title: "Two", value: "two" },{ title: "Three", value: "three" } ], itemTitleKey: "title", itemValueKey: "value", value: null })), disabled: SC.FormView.row(SC.RadioView.design({ layout: { width: 150, height: 60}, isEnabled: NO, items: [ { title: "One", value: "one" },{ title: "Two", value: "two" },{ title: "Three", value: "three" } ], itemTitleKey: "title", itemValueKey: "value", value: "one" })), multiple: SC.FormView.row(SC.RadioView.design({ layout: {width: 150, height: 60}, items: [ { title: "One", value: "one" },{ title: "Two", value: "two" },{ title: "Three", value: "three" } ], itemTitleKey: "title", itemValueKey: "value", value: ["one", "three"] })), horizontal: SC.FormView.row(SC.RadioView.design({ layout: {width: 450, height: 20}, layoutDirection: SC.LAYOUT_HORIZONTAL, items: [ { title: "One", value: "one" },{ title: "Two", value: "two" },{ title: "Three", value: "three" } ], itemTitleKey: "title", itemValueKey: "value", value: null })) }) });