Created
May 6, 2010 21:51
-
-
Save MarkBennett/392748 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: Questions - mainPage | |
// Copyright: ©2010 My Company, Inc. | |
// ========================================================================== | |
/*globals Questions */ | |
// This page describes the main user interface for your application. | |
Questions.mainPage = SC.Page.design({ | |
// The main pane is made visible on screen as soon as your app is loaded. | |
// Add childViews to this pane for views to display immediately on page | |
// load. | |
mainPane: SC.MainPane.design({ | |
childViews: 'topView searchBarView leftSidebarView questionsView bottomView'.w() | |
, topView: SC.ToolbarView.design({ | |
layout: { top: 0, left: 0, right: 0, height: 36 } | |
, anchorLocation: SC.ANCHOR_TOP | |
, childViews: 'backToAdminButton'.w() | |
, backToAdminButton: SC.ButtonView.design({ | |
layout: { centerY: 0, height: 24, left: 12, width: 200 } | |
, title: "< back to Yardstick Measure" | |
}) | |
}) | |
, searchBarView: SC.ToolbarView.design({ | |
layout: { top: 37, left: 0, right: 0, height: 36 } | |
, childViews: "searchFieldView".w() | |
, searchFieldView: SC.TextFieldView.design({ | |
layout: { centerY: 0, height: 24, right: 10, width: 250 } | |
, hint: "Search..." | |
}) | |
}) | |
, questionsView: SC.ScrollView.design({ | |
hasHorizontalScroller: NO | |
, layout: { top: 73, bottom: 37, left: 201, right: 0 } | |
, backgroundColor: 'white' | |
, contentView: SC.ListView.design({ | |
contentBinding: "Questions.questionsController.arrangedObjects" | |
, selectionBinding: "Questions.questionsController.selection" | |
, contentValueKey: "description" | |
, rowHeight: 60 | |
, exampleView: Questions.QuestionsListItemView | |
}) | |
}) | |
, leftSidebarView: SC.View.design({ | |
childViews: "itemBanksLabel itemBanksListView".w() | |
, layout: { top: 73, bottom: 37, left: 0, width: 200 } | |
, itemBanksLabel: SC.LabelView.design({ | |
layout: { top: 0, height: 24, left: 0, right: 0 } | |
, value: "BROWSE QUESTIONS" | |
}) | |
, itemBanksListView: SC.ScrollView.design({ | |
hasHorizontalScroller: NO | |
, layout: { top: 25, bottom: 0, left: 0, right: 0 } | |
, contentView: SC.ListView.design({ | |
contentBinding: "Questions.itemBanksController.arrangedObjects" | |
, selectionBinding: "Questions.itemBanksController.selelction" | |
, contentValueKey: "name" | |
, rowHeight: 21 | |
}) | |
}) | |
}) | |
, bottomView: SC.ToolbarView.design({ | |
layout: { height: 36, bottom: 0, left: 0, right: 0} | |
, anchorLocation: SC.ANCHOR_BOTTOM | |
, childViews: "addItemBankButton".w() | |
, addItemBankButton: SC.ButtonView.design({ | |
layout: { centerY: 0, height: 24, left: 10, width: 80 } | |
, title: "+" | |
}) | |
}) | |
}) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment