Revisions

gist: 181441 Download_button fork
public
Public Clone URL: git://gist.github.com/181441.git
Embed All Files: show embed
main_page.js #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
// ==========================================================================
// Project: Toelatingsexamen - mainPage
// Copyright: ©2009 My Company, Inc.
// ==========================================================================
/*globals Toelatingsexamen */
 
// This page describes the main user interface for your application.
Toelatingsexamen.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: 'labelView'.w(),
    childViews: ['statusAndSelection', 'examView'],
    
    statusAndSelection: SC.View.design({
      //upper textfield, button and status display
      layout: { left: 20, width: 800, top: 15, height: 100 }
    }) // end statusAndSelection design, start childviews
    
    // text field with selected candidate name
    .childView(SC.TextFieldView.design({
        layout: { left: 20, width: 200, top: 5, height: 21 }//,
        //classNames: 'sc-bezel-border',
        //valueBinding: 'AdmissionExam.selectedCandidateController.forwardName'
      }))
      
    // button to open the candidate and exam selection
    .childView(SC.ButtonView.design({
        layout: { left: 240, width: 200, top: 5, height: 21 },
        theme: 'regular',
        title: 'select'
        //title: '_ae_open_choose_candidate_pane_button'.loc(),
        //action: 'show',
        //target: 'AdmissionExam.chooseCandidatePaneController'
      })) // end button
    
    // label with status text
    .childView(SC.LabelView.design({
        layout: { left: 460, width: 200, top: 5, height: 21 },
        //valueBinding: 'AdmissionExam.admissionExamApplicationController.systemState'
        value: "Test status"
      })),
    
    // exam elements display
    examView: SC.View.design({
        layout: { left: 20, width: 800, top: 60, height: 560 }
      })
      .childView(SC.ScrollView.design({
        layout: { left: 0, width: 300, top: 0, height: 530 },
        classNames: 'sc-bezel-border',
        hasVerticalScroller: NO,
        contentView: SC.SourceListView.design({
          //layout: { left: 0, width: 300, top: 0, height: 530 },
          //classNames: 'sc-list-view',
          //contentValueKey: 'localised_name',
          contentValueKey: 'name',
          contentBinding: 'Toelatingsexamen.menuController.arrangedObjects',
          selectionBinding: 'Toelatingsexamen.menuController.selection',
          canReorderContent: NO
        })
      })) // end scroll view
      
      .childView(SC.ContainerView.design({
        nowShowingBinding: 'Toelatingsexamen.containerViewController.actualView',
        //layout: { left: 320, top: 0, bottom: 10, right: 20, width: 500 },
        layout: { left:320, top: 0, height: 530, width: 500 },
        classNames: 'sc-bezel-border'
      }))
  })
)