(function(){var a="sproutcore/standard_theme";if(!SC.BUNDLE_INFO){throw"SC.BUNDLE_INFO is not defined!"
}if(SC.BUNDLE_INFO[a]){return}SC.BUNDLE_INFO[a]={requires:["sproutcore/empty_theme"],styles:["/static/sproutcore/standard_theme/en/52920dfdad7f0329367ed5692a2fc96881122edb/stylesheet-packed.css","/static/sproutcore/standard_theme/en/52920dfdad7f0329367ed5692a2fc96881122edb/stylesheet.css"],scripts:["/static/sproutcore/standard_theme/en/52920dfdad7f0329367ed5692a2fc96881122edb/javascript-packed.js"]}
})();SC.stringsFor("en",{"Loc.Title":"Localized Title!","Loc.Label":"Localized Label!",Class:"Class",Welcome_tab:"Welcome",Collections_tab:"Collections",Collections2_tab:"Collections2",Buttons_tab:"Buttons",Panes_tab:"Panes",Forms_tab:"Forms",Icons_tab:"Icons",Title_body:"Sample Controls",Text_body:"SproutCore comes bundled with a wide array of controls that you can use in your own applications. Most of these controls can be created very easily using the built-in view helper functions. Consult the source code of this application for samples code to use in your own application.",Title_forms:"Forms",Text_forms:"SproutCore has built in support for form validation, and for buffering form input into a controller before it is committed to your backend model. The examples below show the built in validators and variety of controls that are supported.",FName_forms:"First Name",LName_forms:"Last Name",Email_forms:"Email",PNumber_forms:"Phone Number",CCard_forms:"Credit Card",Address_forms:"Address",Crazinnes_forms:"Crazinness",Submit_buttom_forms:"Submit",Cancel_buttom_forms:"Cancel",SChanges_buttom_forms:"Save Changes"});
SampleControls=SC.Object.create({FIXTURES:[],controllers:[]});SC.CAPTURE_BACKSPACE_KEY=YES;
require("core");SampleControls.containerController=SC.Object.create({nowShowing:"container1",showContainer1:function(){this.set("nowShowing","container1")
},showContainer2:function(){this.set("nowShowing","container2")},showContainer3:function(){this.set("nowShowing","container3")
}});require("core");SampleControls.contentController=SC.ArrayController.create({sliderValue:50});
require("core");SampleControls.filesController=SC.ArrayController.create(SC.CollectionRowDelegate,{init:function(){arguments.callee.base.apply(this,arguments);
var a=SC.SparseArray.array(200000);a.delegate=this;this.set("content",a)},rowHeight:20,customRowHeight:20,customRowHeightDidChange:function(){var b=this.get("customRowHeightIndexes"),a=SampleControls.collectionsPage.get("rowListView");
if(b&&a){a.rowHeightDidChangeForIndexes(b)}}.observes("customRowHeight"),useCustomRowHeights:NO,customRowHeightIndexes:function(){if(!this.get("useCustomRowHeights")){return null
}var c=SC.IndexSet.create(),b,a=this.get("length");for(b=0;b<1000;b+=20){c.add(b)
}return c.freeze()}.property("useCustomRowHeights","customRowHeight").cacheable(),contentIndexRowHeight:function(a,c,b){var d=this.get("customRowHeightIndexes");
return(d&&d.contains(b))?this.get("customRowHeight"):this.get("rowHeight")},groupByKey:"group",exampleGroup:SC.Object.extend({title:function(){return this.get("value")
}.property(),groupHeight:function(){switch(this.get("value")){case"first":return 50;
case"second":return 100;default:return 32}}.property()}),sparseArrayDidRequestIndex:function(b,a){b.provideObjectAtIndex(a,SC.Object.create({title:"Example File %@".fmt(a),icon:"sc-icon-document-16",unread:a,group:"Group "+Math.floor(a/50)}))
}});require("core");SampleControls.formController=SC.ObjectController.create({});
sc_require("core");SampleControls.paneController=SC.Object.create({pane:null,showPanelPane:function(){var a=SC.PanelPane.create({layout:{width:400,height:200,centerX:0,centerY:0},contentView:SC.View.extend({layout:{top:0,left:0,bottom:0,right:0},childViews:"labelView buttonView".w(),labelView:SC.LabelView.extend({layout:{centerY:-10,height:24,left:0,right:0},textAlign:SC.ALIGN_CENTER,controlSize:SC.LARGE_CONTROL_SIZE,value:"SC.PanelPane"}),buttonView:SC.ButtonView.extend({layout:{width:80,bottom:20,height:24,centerX:0},title:"Hide",action:"remove",target:"SampleControls.paneController.pane"})})});
a.append();this.set("pane",a)},showSheetPane:function(){var a=SC.SheetPane.create({layout:{width:400,height:200,centerX:0},contentView:SC.View.extend({layout:{top:0,left:0,bottom:0,right:0},childViews:"labelView buttonView".w(),labelView:SC.LabelView.extend({layout:{centerY:-10,height:24,left:0,right:0},textAlign:SC.ALIGN_CENTER,controlSize:SC.LARGE_CONTROL_SIZE,value:"SC.SheetPane"}),buttonView:SC.ButtonView.extend({layout:{width:80,bottom:20,height:24,centerX:0},title:"Hide",action:"remove",target:"SampleControls.paneController.sheetPane"})})});
a.append();this.set("sheetPane",a)},showAlertPaneWarn:function(){var a=SC.AlertPane.warn("AlertPane.message","AlertPane.description","AlertPane.caption","OK","Cancel","Other...",this);
a.append()},showAlertPaneError:function(){var a=SC.AlertPane.error("AlertPane.message","AlertPane.description","AlertPane.caption","OK","Cancel","Other...",this);
a.append()},showAlertPaneInfo:function(){var a=SC.AlertPane.info("AlertPane.message","AlertPane.description","AlertPane.caption","OK","Cancel","Other...",this);
a.append()},showAlertPanePlain:function(){var a=SC.AlertPane.plain("AlertPane.message","AlertPane.description","AlertPane.caption","OK","Cancel","Other...",this);
a.append()},showAlertPaneShow:function(){var a=SC.AlertPane.show("AlertPane.message","AlertPane.description","AlertPane.caption","OK","Cancel","Other...","sc-icon-tools-24",this);
a.append()},showPalettePane:function(){var a=SC.PalettePane.create({layout:{width:400,height:200,right:20,top:0},contentView:SC.View.extend({layout:{top:0,left:0,bottom:0,right:0},childViews:"labelView buttonView".w(),labelView:SC.LabelView.extend({layout:{centerY:-10,height:24,left:0,right:0},textAlign:SC.ALIGN_CENTER,controlSize:SC.LARGE_CONTROL_SIZE,value:"SC.PalettePane"}),buttonView:SC.ButtonView.extend({layout:{width:80,bottom:20,height:24,centerX:0},title:"Hide",action:"remove",target:"SampleControls.paneController.palettePane"})})});
a.append();this.set("palettePane",a)},showPickerPaneDefault:function(a){var b=SC.PickerPane.create({layout:{width:300,height:200},contentView:SC.View.extend({layout:{top:0,left:0,bottom:0,right:0}})});
b.popup(a)},showPickerPaneMenu:function(a){var b=SC.PickerPane.create({layout:{width:300,height:200},contentView:SC.View.extend({layout:{top:0,left:0,bottom:0,right:0}})});
b.popup(a,SC.PICKER_MENU)},showPickerPaneFixed:function(a){var b=SC.PickerPane.create({layout:{width:300,height:200},contentView:SC.View.extend({layout:{top:0,left:0,bottom:0,right:0}})});
b.popup(a,SC.PICKER_FIXED)},showPickerPanePointer:function(a){var b=SC.PickerPane.create({layout:{width:300,height:200},contentView:SC.View.extend({layout:{top:0,left:0,bottom:0,right:0}})});
b.popup(a,SC.PICKER_POINTER,[3,0,1,2,2])},showMenuPane:function(a){var b="http://www.freeiconsweb.com/Icons/16x16_people_icons/People_046.gif";
var d=function(){console.log("done")};var c=SC.MenuPane.create({items:[{title:"Item1",isEnabled:YES,icon:b,separator:NO,action:d,checkbox:YES,shortCut:"ctrl_z",keyEquivalent:"ctrl_z"},{title:"",isEnabled:YES,icon:null,separator:YES},{title:"Item2",isEnabled:NO,icon:b,separator:NO},{title:"Item3",isEnabled:YES,icon:b,separator:NO,branchItem:YES,subMenu:SC.MenuPane.create({items:["title1","title2"],layout:{width:150},contentView:SC.View.extend({layout:{width:150,height:200}})})},{title:"Item3",isEnabled:YES,icon:b,separator:NO},{title:"Item4",isEnabled:YES,icon:b,separator:NO},{title:"Item5",isEnabled:YES,icon:b,separator:NO},{title:"Item6",isEnabled:YES,icon:b,separator:NO},{title:"Item7",isEnabled:YES,icon:b,separator:NO},{title:"Item8",isEnabled:YES,icon:b,separator:NO},{title:"Item9",isEnabled:YES,icon:b,separator:NO},{title:"Item10",isEnabled:YES,icon:b,separator:NO},{title:"Item11",isEnabled:YES,icon:b,separator:NO},{title:"Item12",isEnabled:YES,icon:b,separator:NO},{title:"Item13",isEnabled:YES,icon:b,separator:NO},{title:"Item14",isEnabled:YES,icon:b,separator:NO},{title:"Item15",isEnabled:YES,icon:b,separator:NO},{title:"Item16",isEnabled:YES,icon:b,separator:NO},{title:"Item17",isEnabled:YES,icon:b,separator:NO},{title:"Item18",isEnabled:YES,icon:b,separator:NO},{title:"Item19",isEnabled:YES,icon:b,separator:NO},{title:"Item20",isEnabled:YES,icon:b,separator:NO},{title:"Item21",isEnabled:YES,icon:b,separator:NO},{title:"Item22",isEnabled:YES,icon:b,separator:NO},{title:"Item23",isEnabled:YES,icon:b,separator:NO},{title:"Item24",isEnabled:YES,icon:b,separator:NO},{title:"Item25",isEnabled:YES,icon:b,separator:NO},{title:"Item26",isEnabled:YES,icon:b,separator:NO},{title:"Item27",isEnabled:YES,icon:b,separator:NO},{title:"Item28",isEnabled:YES,icon:b,separator:NO},{title:"Item29",isEnabled:YES,icon:b,separator:NO},{title:"Item30",isEnabled:YES,icon:b,separator:NO},{title:"Item31",isEnabled:YES,icon:b,separator:NO},{title:"Item32",isEnabled:YES,icon:b,separator:NO},{title:"Item33",isEnabled:YES,icon:b,separator:NO},{title:"Item34",isEnabled:YES,icon:b,separator:NO},{title:"Item35",isEnabled:YES,icon:b,separator:NO},{title:"Item36",isEnabled:YES,icon:b,separator:NO},{title:"Item37",isEnabled:YES,icon:b,separator:NO},{title:"Item38",isEnabled:YES,icon:b,separator:NO},{title:"Item39",isEnabled:YES,icon:b,separator:NO},{title:"Item40",isEnabled:YES,icon:b,separator:NO},{title:"Item41",isEnabled:YES,icon:b,separator:NO},{title:"Item42",isEnabled:YES,icon:b,separator:NO},{title:"Item43",isEnabled:YES,icon:b,separator:NO},{title:"Item44",isEnabled:YES,icon:b,separator:NO},{title:"Item45",isEnabled:YES,icon:b,separator:NO},{title:"Item46",isEnabled:YES,icon:b,separator:NO},{title:"Item47",isEnabled:YES,icon:b,separator:NO},{title:"Item48",isEnabled:YES,icon:b,separator:NO},{title:"Item49",isEnabled:YES,icon:b,separator:NO},{title:"Item50",isEnabled:YES,icon:b,separator:NO},{title:"Item51",isEnabled:YES,icon:b,separator:NO},{title:"Item52",isEnabled:YES,icon:b,separator:NO},{title:"Item53",isEnabled:YES,icon:b,separator:NO}],isEnabled:YES,itemIsEnabledKey:"isEnabled",itemTitleKey:"title",itemIconKey:"icon",itemSeparatorKey:"separator",itemActionKey:"action",itemCheckboxKey:"checkbox",itemBranchKey:"branchItem",preferType:SC.PICKER_MENU,subMenuKey:"subMenu",itemShortCutKey:"shortCut",layout:{width:150},itemKeyEquivalentKey:"keyEquivalent",itemHeightKey:"height",contentView:SC.View.extend({layout:{width:150,height:200}})});
c.popup(a)},hidePane:function(){this.pane.remove()}});require("core");SampleControls.sourceListController=SC.ArrayController.create({allowsEmptySelection:NO,allowsMultipleSelection:NO});
require("core");SampleControls.Photo=SC.Record.extend({fullName:function(){return this.getEach("itemIndex","photoName").compact().join(" ")
}.property("photoName","itemIndex"),icon:"sc-icon-document-16"});require("core");
SampleControls.Playlist=SC.Record.extend({});require("core");SampleControls.ControlSampleView=SC.View.extend({title:"Samples",height:23,samples:[],createChildViews:function(){var d=this.get("childViews");
var c=30,b=this.get("height");var a=1;this.get("samples").forEach(function(e){if(e){var g=e.prototype.height||b;
var f=e.design({rootElementPath:[a++],layout:{left:4,right:4,top:c,height:g}});d.push(f);
c+=g+4}else{d.push(SC.SeparatorView.design({rootElementPath:[a++],layout:{left:4,right:4,top:c,height:1}}));
c+=5}},this);return arguments.callee.base.apply(this,arguments)},childViews:[SC.LabelView.design({rootElementPath:[0],valueBinding:".parentView.title",layout:{left:0,right:0,top:0,height:30},textAlign:SC.ALIGN_CENTER,fontWeight:SC.BOLD_FONT,tagName:"h2",classNames:"sample-label"})],classNames:"control-sample",layout:{left:0,width:150,top:0,bottom:0}});
SampleControls.TiledSampleView=SC.View.extend({rootElementPath:[0],createChildViews:function(){var a=arguments.callee.base.apply(this,arguments);
var b=0;this.get("childViews").forEach(function(c){c.adjust("left",b);b+=c.get("frame").width
},this);this.adjust("width",b);return a},layout:{left:0,top:0,bottom:0},classNames:"tiled-sample"});
SC.mixin(SampleControls.TiledSampleView,{_width:158,_height:21,_title:"Sample",width:function(a){this._width=a+8;
return this},height:function(a){this._height=a;return this},title:function(a){this._title=a;
return this},sample:function(){var b=SC.$A(arguments),a=b.shift();b=b.map(function(c){return c?a.extend(c):null
});this.prototype.childViews.push(SampleControls.ControlSampleView.extend({rootElementPath:[this.prototype.childViews.length],title:this._title,samples:b,height:this._height,layout:{left:0,top:0,bottom:0,width:this._width}}));
this._title="Sample";this._height=23;this._width=158;return this}});var tile=function(){return SampleControls.TiledSampleView.extend({childViews:[]})
};SampleControls.collectionsPage=SC.Page.create({rowListView:SC.outlet("mainView.topLeftView.scrollView.contentView"),mainView:SC.SplitView.design({layout:{top:20,left:12,right:12,bottom:12},classNames:["collections-tab"],layoutDirection:SC.LAYOUT_HORIZONTAL,defaultThickness:0.5,autoresizeBehavior:SC.RESIZE_BOTTOM_RIGHT,canCollapseViews:YES,topLeftMinThickness:200,topLeftMaxThickness:900,topLeftView:SC.View.design({childViews:"scrollView rowHeightLabel rowHeightSlider customRowCheckbox customRowHeightSlider customRowHeightLabel".w(),rowHeightLabel:SC.LabelView.design({layout:{bottom:40,right:8,width:20,height:18},textAlign:SC.ALIGN_CENTER,valueBinding:"SampleControls.filesController.rowHeight"}),rowHeightSlider:SC.SliderView.design({layout:{bottom:40,left:8,right:32,height:18},minimum:12,maximum:80,step:1,valueBinding:"SampleControls.filesController.rowHeight"}),customRowCheckbox:SC.CheckboxView.design({layout:{bottom:20,left:8,right:8,height:18},title:"Use custom row heights",valueBinding:"SampleControls.filesController.useCustomRowHeights"}),customRowHeightLabel:SC.LabelView.design({layout:{bottom:0,right:8,width:20,height:18},textAlign:SC.ALIGN_CENTER,valueBinding:"SampleControls.filesController.customRowHeight"}),customRowHeightSlider:SC.SliderView.design({layout:{bottom:0,left:8,right:32,height:18},minimum:12,maximum:80,step:1,valueBinding:"SampleControls.filesController.customRowHeight"}),scrollView:SC.ScrollView.design({layout:{top:0,left:0,right:0,bottom:70},hasHorizontalScroller:NO,contentView:SC.ListView.design({contentValueKey:"title",contentIconKey:"icon",contentUnreadCountKey:"unread",hasContentIcon:YES,contentBinding:"SampleControls.filesController",canEditContent:YES,canDeleteContent:YES,canReorderContent:YES})})}),dividerView:SC.SplitDividerView,bottomRightView:SC.View.design({childViews:"scrollView2 rowHeightLabel2 rowHeightSlider2".w(),rowHeightLabel2:SC.LabelView.design({layout:{bottom:40,right:8,width:20,height:18},textAlign:SC.ALIGN_CENTER,valueBinding:"SampleControls.filesController.rowHeight"}),rowHeightSlider2:SC.SliderView.design({layout:{bottom:40,left:8,right:32,height:18},minimum:12,maximum:80,step:1,valueBinding:"SampleControls.filesController.rowHeight"}),scrollView2:SC.ScrollView.design({layout:{top:0,left:0,right:0,bottom:70},hasHorizontalScroller:NO,contentView:SC.GridView.design({contentValueKey:"title",contentIconKey:"icon",contentUnreadCountKey:"unread",hasContentIcon:YES,contentBinding:"SampleControls.filesController",canEditContent:YES,canReorderContent:YES})})})})});
SampleControls.containerPage=SC.Page.create({enableTopRightThumb:YES,dividerThickness:7,mainView:SC.View.design({classNames:["container-tab"],childViews:[SC.ContainerView.design({nowShowingBinding:"SampleControls.containerController.nowShowing",layout:{left:200,top:20,bottom:20,right:20}}),SC.ButtonView.design({layout:{left:20,width:140,top:20,height:24},title:"Show Split View",action:"showContainer1",target:"SampleControls.containerController"}),SC.ButtonView.design({layout:{left:20,width:140,top:54,height:24},title:"Show Container2",action:"showContainer2",target:"SampleControls.containerController"}),SC.ButtonView.design({layout:{left:20,width:140,top:88,height:24},title:"Show Container3",action:"showContainer3",target:"SampleControls.containerController"}),SC.CheckboxView.design({layout:{left:20,width:200,top:125,height:21},title:"Enable top left thumb",valueBinding:".page.enableTopRightThumb"}),SC.SliderView.design({layout:{left:20,width:140,top:154,height:21},valueBinding:".page.dividerThickness",minimum:0,maximum:40,step:1}),SC.LabelView.design({layout:{left:164,width:30,top:144,height:21},valueBinding:".page.dividerThickness"})]}),container1:SC.SplitView.design({layout:{left:0,top:0,right:0,bottom:0},layoutDirection:SC.LAYOUT_VERTICAL,defaultThickness:0.5,topLeftMinThickness:100,topLeftMaxThickness:300,autoresizeBehavior:SC.RESIZE_TOP_LEFT,dividerThicknessBinding:".page.dividerThickness",topLeftView:SC.View.design({layout:{},classNames:"red".w(),childViews:[SC.ThumbView.design({classNames:"blue".w(),isEnabledBinding:".page.enableTopRightThumb",layout:{bottom:15,left:15,width:35,height:20}}),SC.LabelView.design({value:"Top/Left",layout:{left:40,centerY:0,right:40,height:20},tagName:"h1"})]}),dividerView:SC.SplitDividerView.design({layout:{}}),bottomRightView:SC.View.design({layout:{},classNames:"blue".w(),childViews:[SC.ThumbView.design({classNames:"red".w(),layout:{top:15,right:15,width:35,height:20}}),SC.LabelView.design({value:"Bottom/Left",layout:{top:15,left:40,width:80,height:20},tagName:"h1"}),SC.SplitView.design({layout:{left:0,top:70,right:0,bottom:0},layoutDirection:SC.LAYOUT_HORIZONTAL,defaultThickness:0.5,autoresizeBehavior:SC.RESIZE_TOP_LEFT,dividerThickness:7,topLeftView:SC.View.design({layout:{},classNames:"green".w(),childViews:[SC.ThumbView.design({classNames:"gray".w(),layout:{bottom:15,right:15,width:35,height:20}}),SC.LabelView.design({value:"Top/Left",layout:{left:40,centerY:0,right:40,height:20},tagName:"h1"})]}),dividerView:SC.SplitDividerView.design({layout:{}}),bottomRightView:SC.View.design({layout:{},classNames:"gray".w(),childViews:[SC.ThumbView.design({classNames:"green".w(),layout:{top:15,left:15,width:35,height:20}}),SC.LabelView.design({value:"Bottom/Right",layout:{left:40,centerY:0,right:40,height:20},tagName:"h1"})]})})]})}),container2:SC.LabelView.design({value:"Container2",layout:{left:40,centerY:0,right:40,height:40},tagName:"h1"}),container3:SC.LabelView.design({value:"Container3",layout:{left:40,centerY:0,right:40,height:40},tagName:"h1"})});
require("views/control_sample");SampleControls.controls2Page=SC.Page.create({radioViewValue:"Item1",mainView:SC.ScrollView.design({classNames:"control-tab",layout:{left:0,right:0,bottom:0,top:12},hasVerticalScroller:NO,borderStyle:SC.BORDER_NONE,contentView:tile().height(24).title("SC.SegmentedView").height(24).width(240).sample(SC.SegmentedView.extend({valueProbe:function(){console.log("%@ value=%@".fmt(this,this.get("value")))
}.observes("value")}),{items:"Item1 Item2 Item3".w(),value:"Item2"},{items:"Item1 Item2 Item3".w(),value:"Item2",isEnabled:NO},null,{items:[{value:"Item1",icon:"sc-icon-user-16"},{value:"Item2",icon:"sc-icon-group-16"},{value:"Item3",icon:"sc-icon-options-16"}],itemTitleKey:"value",itemValueKey:"value",itemIconKey:"icon",value:"Item1 Item3".w()},{items:[{value:"Item1",icon:"sc-icon-user-16"},{value:"Item2",icon:"sc-icon-group-16"},{value:"Item3",icon:"sc-icon-options-16"}],itemTitleKey:"value",itemValueKey:"value",itemIconKey:"icon",isEnabled:NO,value:"Item1 Item3".w()},null,{items:["Item1","Very Long Item","Item 3"],value:"Very Long Item",allowsEmptySelection:YES},{items:["Item1","Very Long Item","Item 3"],value:"Item1 Item3".w(),allowsEmptySelection:YES},null,{items:"Item1 Item2 Item3".w(),value:"Item2",allowsMultipleSelection:YES},{items:"Item1 Item2 Item3".w(),value:"Item1 Item3".w(),allowsMultipleSelection:YES},null,{items:"Item1 Item2 Item3".w(),value:"Item2",allowsEmptySelection:YES,allowsMultipleSelection:YES},{items:"Item1 Item2 Item3".w(),value:"Item1 Item3".w(),allowsEmptySelection:YES,allowsMultipleSelection:YES}).title("SC.CheckboxView").height(18).sample(SC.CheckboxView,{title:"Regular"},{title:"Reg Disabled",isEnabled:NO},null,{title:"Selected",value:YES,icon:"sc-icon-folder-16"},{title:"Selected Disabled",value:YES,isEnabled:NO,icon:"sc-icon-trash-16"},null,{title:"Mixed",value:[YES,NO]},{title:"Mixed Disabled",value:[YES,NO],isEnabled:NO},null,{title:"Long Title Exceeds Frame",value:YES,needsEllipsis:YES},null,{title:"Long Title Exceeds Frame",value:YES,height:36},null,{controlSize:SC.SMALL_CONTROL_SIZE,title:"Regular Small"},{controlSize:SC.SMALL_CONTROL_SIZE,title:"Reg Small Disabled",isEnabled:NO},null,{controlSize:SC.SMALL_CONTROL_SIZE,title:"Selected Small",value:YES,icon:"sc-icon-folder-16"},{controlSize:SC.SMALL_CONTROL_SIZE,title:"Selected Small Disabled",value:YES,isEnabled:NO,icon:"sc-icon-trash-16"},null,{controlSize:SC.SMALL_CONTROL_SIZE,title:"Mixed Small",value:[YES,NO]},{controlSize:SC.SMALL_CONTROL_SIZE,title:"Mixed Small Disabled",value:[YES,NO],isEnabled:NO}).title("SC.TextFieldView").height(21).sample(SC.TextFieldView,{value:"Hello World",hint:"Test Me"},{value:"Hello World",hint:"Test Me",isEnabled:NO},null,{hint:"First Name"},{hint:"First Name",isEnabled:NO},null,{hint:"Credit Card",validator:"CreditCard"},{hint:"Date",validator:"Date"},{hint:"Email",validator:"email"},{hint:"Not Empty",validator:"NotEmpty"},{hint:"Number",validator:"Number"},null,{isTextArea:YES,hint:"TextArea - Multiline",value:"TextArea - Multiline"},{isTextArea:YES,hint:"TextArea - Multiline"}).title("SC.LabelView").height(18).sample(SC.LabelView,{value:"Basic Label"},{value:"Loc.Label",localized:YES},null,{value:"Centered Label",textAlign:SC.ALIGN_CENTER,icon:"sc-icon-group-16"},null,{value:"Disabled Label",isEnabled:NO},null,{value:"Selectable Label",icon:"sc-icon-help-16",isTextSelectable:YES},null,{value:"Regular Size Label",controlSize:SC.REGULAR_CONTROL_SIZE},{value:"Bold Regular Size Label",fontWeight:SC.BOLD_WEIGHT,controlSize:SC.REGULAR_CONTROL_SIZE},{value:"Dis Regular Size Label",isEnabled:NO,controlSize:SC.REGULAR_CONTROL_SIZE},null,{value:"Small Size Label",height:14,controlSize:SC.SMALL_CONTROL_SIZE},{value:"Bold Small Size Label",height:14,fontWeight:SC.BOLD_WEIGHT,controlSize:SC.SMALL_CONTROL_SIZE},{value:"Dis Small Size Label",height:14,isEnabled:NO,controlSize:SC.SMALL_CONTROL_SIZE},null,{value:"Tiny Size Label",height:12,controlSize:SC.TINY_CONTROL_SIZE},{value:"Bold Tiny Size Label",height:12,fontWeight:SC.BOLD_WEIGHT,controlSize:SC.TINY_CONTROL_SIZE},{value:"Disabled Tiny Size Label",height:12,isEnabled:NO,controlSize:SC.TINY_CONTROL_SIZE},null,{value:"Editable",isEditable:YES},{value:"Editable icon",isEditable:YES,icon:"sc-icon-help-16"}).title("SC.DisclosureView").height(18).sample(SC.DisclosureView,{title:"Closed Disclosure"},{title:"Reg Disabled",isEnabled:NO},null,{title:"Open Disclosure",value:YES},{title:"Open Disabled",value:YES,isEnabled:NO},null,{title:"Mixed",value:[YES,NO]},{title:"Mixed Disabled",value:[YES,NO],isEnabled:NO},null,{title:"Long Title Exceeds Frame",value:YES}).title("SC.WellView").height(90).sample(SC.WellView,{contentView:SC.RadioView.design({items:"Item1 Item2 Item3".w(),value:["Item1","Item3"],layoutDirection:SC.LAYOUT_VERTICAL}),nowShowing:true,layout:{left:0,top:0,bottom:0,right:0}})})});
require("views/control_sample");SampleControls.controlsPage=SC.Page.create({radioViewValue:"Item1",mainView:SC.ScrollView.design({classNames:"control-tab",layout:{left:0,right:0,bottom:0,top:12},hasVerticalScroller:NO,borderStyle:SC.BORDER_NONE,contentView:tile().height(24).title("SC.ButtonView").sample(SC.ButtonView,{title:"Regular"},{title:"Reg Disabled",isEnabled:NO},null,{title:"Default",icon:"sc-icon-user-16",isDefault:YES},{title:"Def Disabled",isDefault:YES,isEnabled:NO},null,{title:"Selected",isSelected:YES,buttonBehavior:SC.TOGGLE_BEHAVIOR},{title:"Sel Disabled",isSelected:YES,isEnabled:NO,buttonBehavior:SC.TOGGLE_BEHAVIOR},null,{title:"Cancel",icon:"sc-icon-info-16",isCancel:YES},null,{title:"Long Title Exceeds the Frame",isDefault:YES},null,{buttonBehavior:SC.TOGGLE_BEHAVIOR,content:SC.Object.create({myTitle:"Title From Content",myValue:YES,myIcon:"sc-icon-options-16"}),contentValueKey:"myValue",contentTitleKey:"myTitle",contentIconKey:"myIcon"}).title("SC.ButtonView[Square]").height(24).sample(SC.ButtonView,{title:"Regular"},{title:"Reg Disabled",isEnabled:NO},null,{title:"Default",isDefault:YES},{title:"Def Disabled",isDefault:YES,isEnabled:NO},null,{title:"Selected",isSelected:YES,buttonBehavior:SC.TOGGLE_BEHAVIOR},{title:"Sel Disabled",isSelected:YES,isEnabled:NO,buttonBehavior:SC.TOGGLE_BEHAVIOR}).title("SC.ButtonView[Capsule]").height(24).sample(SC.ButtonView,{theme:"capsule",title:"Regular"},{theme:"capsule",title:"Reg Disabled",isEnabled:NO},null,{theme:"capsule",title:"Default",isDefault:YES},{theme:"capsule",title:"Def Disabled",isDefault:YES,isEnabled:NO},null,{theme:"capsule",title:"Selected",isSelected:YES,buttonBehavior:SC.TOGGLE_BEHAVIOR},{theme:"capsule",title:"Sel Disabled",isSelected:YES,isEnabled:NO,buttonBehavior:SC.TOGGLE_BEHAVIOR}).title("SC.RadioView").height(60).sample(SC.RadioView,{items:"Item1 Item2 Item3".w(),value:["Item1","Item3"],layoutDirection:SC.LAYOUT_VERTICAL},null,{items:"Item1 Item2 Item3".w(),value:["Item1","Item3"],isEnabled:NO,layoutDirection:SC.LAYOUT_VERTICAL},null,{items:"Item1 Item2".w(),value:"Item1",height:23,layoutDirection:SC.LAYOUT_HORIZONTAL},null,{items:"Item1 Item2".w(),value:"Item1",isEnabled:NO,height:23,layoutDirection:SC.LAYOUT_HORIZONTAL},null,{items:[{title:"First Item",value:"Item1"},{title:"Very long title goes onto the next line",value:"Item2"},{title:"Loc.Title",value:"Item3"}],itemTitleKey:"title",itemValueKey:"value",height:80,value:"Item2",localize:YES,layoutDirection:SC.LAYOUT_VERTICAL},null,{items:[{title:"First Item",value:"Item1",enabled:YES,icon:"sc-icon-user-16"},{title:"Second Item",value:"Item2",enabled:NO,icon:"sc-icon-options-16"},{title:"Third Item",value:"Item3",enabled:YES,icon:"sc-icon-bookmark-16"}],itemTitleKey:"title",itemValueKey:"value",itemIsEnabledKey:"enabled",itemIconKey:"icon",height:80,value:"Item2",localize:YES,layoutDirection:SC.LAYOUT_VERTICAL},null,{controlSize:SC.SMALL_CONTROL_SIZE,items:"Item1 Item2 Item3".w(),value:["Item1","Item3"],layoutDirection:SC.LAYOUT_VERTICAL},{controlSize:SC.SMALL_CONTROL_SIZE,items:"Item1 Item2 Item3".w(),value:["Item1","Item3"],isEnabled:NO,layoutDirection:SC.LAYOUT_VERTICAL},null,{controlSize:SC.SMALL_CONTROL_SIZE,items:"Item1 Item2".w(),value:"Item1",height:23,layoutDirection:SC.LAYOUT_HORIZONTAL},{controlSize:SC.SMALL_CONTROL_SIZE,items:"Item1 Item2".w(),value:"Item1",isEnabled:NO,height:23,layoutDirection:SC.LAYOUT_HORIZONTAL}).title("SC.SliderView").height(21).sample(SC.SliderView,{value:50,minimum:0,maximum:100},{value:50,minimum:0,maximum:100,isEnabled:NO},null,{value:0,minimum:0,maximum:100},{value:0,minimum:0,maximum:100,isEnabled:NO},null,{value:100,minimum:0,maximum:100,step:20},{value:100,minimum:0,maximum:100,isEnabled:NO}).title("SC.ProgressView").height(20).sample(SC.ProgressView,{value:25,minimum:0,maximum:100},{value:25,minimum:0,maximum:100,isEnabled:NO},null,{value:0,minimum:0,maximum:100,init:function(){arguments.callee.base.apply(this,arguments);
this.timerProgress.invokeLater(this,1000)},change:1,timerProgress:function(){var a=this.get("value")+this.change;
if(this.change>0&&a>=100){this.change=-1}else{if(this.change<0&&a<=0){this.change=1
}}this.set("value",a);this.timerProgress.invokeLater(this,1000/30)}},{value:0,minimum:0,maximum:100,isEnabled:NO},null,{value:100,minimum:0,maximum:100},{value:100,minimum:0,maximum:100,isEnabled:NO},null,{isIndeterminate:YES,value:50,minimum:0,maximum:100,isRunning:YES},{isIndeterminate:YES,value:50,minimum:0,maximum:100,isEnabled:NO,isRunning:YES})})});
SampleControls.ScrollSampleView=SC.View.extend({emptyElement:function(){var b=800,e=800,d=15;
var c=['<div style="border: 1px green solid">'];var a=b/d;while(--a>=0){c.push('<div style="border:1px red dotted; position: absolute; top: 0; bottom: 0; left: %@px; width: %@px"></div>'.fmt(a*d,d))
}a=e/d;while(--a>=0){c.push('<div style="border:1px red dotted; position: absolute; top: %@px; height: %@px; left: 0; right: 0"></div>'.fmt(a*d,d))
}c.push("</div>");return c.join("")}()});SampleControls.formsPage=SC.Page.create({vertical:0,horizontal:0,clippingFrame:null,frame:null,displayClippingFrame:function(){return[SC.inspect(this.get("clippingFrame")),SC.inspect(this.get("frame"))].join(" - ")
}.property("clippingFrame","frame"),mainView:SC.View.design({childViews:[SC.ScrollView.design({classNames:["sc-bezel-border"],horizontalScrollOffsetBinding:".page.horizontal",verticalScrollOffsetBinding:".page.vertical",layout:{left:20,bottom:20,top:20,right:20},contentView:SampleControls.ScrollSampleView.design({layout:{top:0,left:0,width:800,height:800},clippingFrameBinding:".page.clippingFrame",frameBinding:".page.frame"})}),SC.LabelView.design({layout:{left:20,bottom:2,width:50,height:18},valueBinding:".page.horizontal"}),SC.LabelView.design({layout:{right:0,top:0,width:50,height:18},valueBinding:".page.vertical"}),SC.LabelView.design({layout:{right:20,bottom:2,width:600,height:18},textAlign:SC.ALIGN_RIGHT,valueBinding:SC.Binding.oneWay(".page.displayClippingFrame")})]})});
SampleControls.iconsPage=SC.Page.create({mainView:SC.LabelView.design({escapeHTML:NO,classNames:"icons-tab",value:function(){var a=['<h1>Icons</h1><p>SC.ImageView can automatically display sprited icons if you set a CSS class name as the value instead of a URL.  SproutCore also comes with the some default icons built right into the framework.  Just use the class names below.  If you would like to get more icons in this style, you can find them at <a href="http://www.icondrawer.com/" target="_blank">Icon Drawer</a>.</p>'];
function b(c,d){a.push("<label>%@-pixel Icons</label>".fmt(c));a.push('<div class="icon-group group-%@">'.fmt(c));
d.forEach(function(e){a.push('<div class="icon"><div class="inner"><img src="%@" class="icon sc-icon-%@-%@" style="height: %@px; width: %@px; position: relative" /></div><label>sc-icon-%@-%@</label></div>'.fmt("/static/sproutcore/foundation/en/ea9f46bf7017306c3fbb6007c42a6fbd9949dae1/blank.gif",e,c,c,c,e,c))
});a.push("</div>")}b(48,"alert info error".w());b(24,"tools bookmark info help alert left right up down undo redo group user cancel options folder trash document favorite".w());
b(16,"bookmark info help alert group user options folder trash document favorite".w());
return a.join("")}()})});require("views/control_sample");SampleControls.mainPage=SC.Page.create({pageName:"SampleControls.mainPage",mainPane:SC.MainPane.design({childViews:[SC.TabView.design({value:"welcome",items:[{title:"Welcome",value:"welcome"},{title:"Controls",value:"SampleControls.controlsPage.mainView"},{title:"Controls II",value:"SampleControls.controls2Page.mainView"},{title:"Collections",value:"SampleControls.collectionsPage.mainView"},{title:"Containers",value:"SampleControls.containerPage.mainView"},{title:"Panes",value:"SampleControls.panePage.mainView"},{title:"Icons",value:"SampleControls.iconsPage.mainView"}],itemTitleKey:"title",itemValueKey:"value",layout:{left:12,right:12,top:12,bottom:12},userDefaultKey:"mainPane"})]}),welcome:SC.LabelView.design({escapeHTML:NO,classNames:"welcome-tab",value:"<h1>Sample Controls</h1><p>SproutCore comes bundled with a wide array of controls that you can use in your own applications. Most of these controls can be created very easily using the built-in view helper functions. Consult the source code of this application for samples code to use in your own application.</p>"})});
sc_require("views/control_sample");SampleControls.panePage=SC.Page.create({mainView:SC.ScrollView.design({classNames:"control-tab",layout:{left:0,right:0,bottom:0,top:12},hasVerticalScroller:NO,contentView:tile().title("Panel").height(24).sample(SC.ButtonView,{theme:"square",title:"SC.PanelPane",action:"showPanelPane",target:"SampleControls.paneController"},null,{theme:"square",title:"SC.SheetPane",action:"showSheetPane",target:"SampleControls.paneController"},null,{theme:"square",title:"SC.AlertPane.warn",action:"showAlertPaneWarn",target:"SampleControls.paneController"},null,{theme:"square",title:"SC.AlertPane.error",action:"showAlertPaneError",target:"SampleControls.paneController"},null,{theme:"square",title:"SC.AlertPane.info",action:"showAlertPaneInfo",target:"SampleControls.paneController"},null,{theme:"square",title:"SC.AlertPane.plain",action:"showAlertPanePlain",target:"SampleControls.paneController"},null,{theme:"square",title:"SC.AlertPane.show",action:"showAlertPaneShow",target:"SampleControls.paneController"}).title("Palette").height(24).sample(SC.ButtonView,{theme:"square",title:"SC.PalettePane",action:"showPalettePane",target:"SampleControls.paneController"}).title("Picker").height(24).sample(SC.ButtonView,{theme:"square",title:"SC.PickerPane.default",action:"showPickerPaneDefault",target:"SampleControls.paneController"},null,{theme:"square",title:"SC.PickerPane.menu",action:"showPickerPaneMenu",target:"SampleControls.paneController"},null,{theme:"square",title:"SC.PickerPane.fixed",action:"showPickerPaneFixed",target:"SampleControls.paneController"},null,{theme:"square",title:"SC.PickerPane.pointer",action:"showPickerPanePointer",target:"SampleControls.paneController"}).title("Menu").height(24).sample(SC.PopupButtonView,{theme:"square",title:"SC.Menu.popup",action:"showMenuPane",target:"SampleControls.paneController"}).title("SelectButtonView").height(24).sample(SC.SelectButtonView,{title:"SC.SelectButtonView",objects:[{title:"Type 1",icon:"select-button-icon"},{title:"vanilla",icon:"select-button-icon",pos:1},{title:"chocolate",icon:"select-button-icon",pos:2},{title:"straberry",icon:"select-button-icon",pos:3},{title:"lemon",icon:"select-button-icon",pos:4}],nameKey:"title",theme:"square",iconKey:"icon",value:"chicolate",valueKey:"title",sortKey:"pos",checkboxEnabled:YES},null,{title:"SC.SelectButtonView",objects:[{title:"None",icon:"select-button-icon"},{title:"Low",icon:"select-button-icon"},{title:"Medium",icon:"select-button-icon"},{title:"High",icon:"select-button-icon"},{title:"Type 2",icon:"select-button-icon"}],nameKey:"title",theme:"square",value:"Type 2",valueKey:"title",checkboxEnabled:YES})})});
function main(){SC.userDefaults.set("appDomain","SampleControls");document.title="Sample Controls";
SampleControls.getPath("mainPage.mainPane").append()};