Created
September 5, 2009 15:26
-
-
Save Narven/181440 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ========================================================================== | |
// Project: Schelp - mainPage | |
// Copyright: ©2009 My Company, Inc. | |
// ========================================================================== | |
/*globals Schelp */ | |
Schelp.mainPage = SC.Page.design({ | |
mainPane: SC.MainPane.design({ | |
childViews: 'middleView topView bottomView'.w(), | |
// TOP VIEW | |
topView: SC.ToolbarView.design({ | |
layout: {top: 0, left: 0, right: 0, height: 30}, | |
anchorLocation: SC.ANCHOR_TOP, | |
childViews: 'labelView'.w(), | |
labelView:SC.LabelView.design({ | |
layout: {centerX:0, height: 30, left: 8, width: 400}, | |
controlSize: SC.LARGE_CONTROL_SIZE, | |
value: 'SproutCore 1.0 Help & Examples' | |
}) | |
}), | |
// MIDDLE VIEW | |
middleView: SC.SplitView.design({ | |
layout: { left: 0, top: 30, right: 0, bottom: 30 }, | |
layoutDirection: SC.LAYOUT_HORIZONTAL, | |
// layoutDirection: SC.LAYOUT_VERTICAL, | |
defaultThickness: 0.5, // a number between 0 and 1.0 | |
autoresizeBehavior: SC.RESIZE_TOP_LEFT, | |
dividerThickness: 7, | |
topLeftView: SC.View.design({ | |
layout: { bottom: 30, top: 30}, | |
childViews: 'listView'.w(), | |
listView: SC.ListView.design({ | |
layout: {left: 3, right: 3, top: 0, bottom: 0}, | |
rowHeight: 21, | |
canEditContent: NO, | |
canReorderContent: NO, | |
canDeleteContent: NO, | |
contentBinding: 'Schelp.nodesController.arrangedObjects', | |
selectionBinding: 'Schelp.nodesController.selection', | |
contentValueKey: 'name', | |
action: "Schelp.nodesController.getPage" | |
}) | |
}), | |
dividerView: SC.SplitDividerView.design({ | |
layout: {} | |
}), | |
bottomRightView: SC.View.design({ | |
layout: {}, | |
childViews: 'mainTabs'.w(), | |
mainTabs: SC.TabView.design({ | |
layout: {top: 30, bottom: 30, left: 0, right: 0}, | |
items: [ | |
{title: "Welcome", value: "Welcome" }, | |
], | |
itemTitleKey: 'title', | |
itemValueKey: 'value' | |
//nowShowing: "EarthChronicles.welcomeViewPage.mainView" // defining the startup tab | |
}) | |
}) | |
}), | |
// BOTTOM VIEW | |
bottomView: SC.ToolbarView.design({ | |
anchorLocation: SC.ANCHOR_BOTTOM, | |
layout: {bottom: 0, left: 0, right: 0, height: 30} | |
}) | |
}) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment