sproutcore 0.9.1 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +233 -0
- data/Manifest.txt +67 -34
- data/bin/sc-build +12 -1
- data/bin/sc-gen +1 -1
- data/bin/sproutcore +14 -0
- data/clients/sc_docs/controllers/docs.js +38 -8
- data/clients/sc_docs/english.lproj/body.css +80 -127
- data/clients/sc_docs/english.lproj/body.rhtml +43 -23
- data/clients/sc_docs/english.lproj/no_docs.rhtml +2 -1
- data/clients/sc_docs/english.lproj/tabs.rhtml +16 -0
- data/clients/sc_docs/main.js +14 -9
- data/clients/sc_docs/models/doc.js +1 -1
- data/clients/sc_docs/tests/controllers/docs.rhtml +1 -2
- data/clients/sc_docs/tests/models/doc.rhtml +1 -2
- data/clients/sc_docs/tests/views/doc_frame.rhtml +1 -2
- data/clients/sc_docs/tests/views/doc_label_view.rhtml +1 -2
- data/clients/sc_docs/views/doc_frame.js +1 -1
- data/clients/sc_test_runner/controllers/runner.js +31 -8
- data/clients/sc_test_runner/english.lproj/body.css +62 -122
- data/clients/sc_test_runner/english.lproj/body.rhtml +62 -26
- data/clients/sc_test_runner/main.js +1 -6
- data/clients/sc_test_runner/models/test.js +14 -1
- data/clients/sc_test_runner/views/runner_frame.js +4 -2
- data/clients/view_builder/builders/builder.js +339 -0
- data/clients/view_builder/builders/button.js +81 -0
- data/clients/view_builder/controllers/document.js +21 -0
- data/clients/view_builder/core.js +19 -0
- data/clients/view_builder/english.lproj/body.css +77 -0
- data/clients/view_builder/english.lproj/body.rhtml +41 -0
- data/clients/{sc_docs → view_builder}/english.lproj/controls.css +0 -0
- data/clients/view_builder/english.lproj/strings.js +14 -0
- data/clients/view_builder/main.js +38 -0
- data/clients/view_builder/tests/controllers/document.rhtml +20 -0
- data/clients/view_builder/tests/views/builder.rhtml +20 -0
- data/clients/view_builder/views/builder.js +23 -0
- data/frameworks/prototype/prototype.js +1 -1
- data/frameworks/sproutcore/Core.js +32 -7
- data/frameworks/sproutcore/README +1 -1
- data/frameworks/sproutcore/animation/animation.js +411 -0
- data/frameworks/sproutcore/controllers/array.js +17 -9
- data/frameworks/sproutcore/controllers/collection.js +9 -110
- data/frameworks/sproutcore/controllers/controller.js +1 -1
- data/frameworks/sproutcore/controllers/object.js +2 -1
- data/frameworks/sproutcore/drag/drag.js +267 -56
- data/frameworks/sproutcore/drag/drag_data_source.js +24 -16
- data/frameworks/sproutcore/drag/drag_source.js +53 -42
- data/frameworks/sproutcore/drag/drop_target.js +2 -2
- data/frameworks/sproutcore/english.lproj/buttons.css +337 -236
- data/frameworks/sproutcore/english.lproj/core.css +115 -0
- data/frameworks/sproutcore/english.lproj/icons.css +227 -0
- data/{clients/sc_docs → frameworks/sproutcore}/english.lproj/images/indicator.gif +0 -0
- data/frameworks/sproutcore/english.lproj/images/sc-theme-sprite.png +0 -0
- data/frameworks/sproutcore/english.lproj/images/sc-theme-ysprite.png +0 -0
- data/frameworks/sproutcore/english.lproj/images/shared-icons.png +0 -0
- data/frameworks/sproutcore/english.lproj/menu.css +1 -1
- data/frameworks/sproutcore/english.lproj/strings.js +1 -1
- data/frameworks/sproutcore/english.lproj/theme.css +405 -31
- data/frameworks/sproutcore/foundation/application.js +15 -11
- data/frameworks/sproutcore/foundation/benchmark.js +1 -1
- data/frameworks/sproutcore/foundation/binding.js +2 -2
- data/frameworks/sproutcore/foundation/date.js +1 -1
- data/frameworks/sproutcore/foundation/error.js +1 -1
- data/frameworks/sproutcore/foundation/input_manager.js +32 -21
- data/frameworks/sproutcore/foundation/mock.js +1 -1
- data/frameworks/sproutcore/foundation/node_descriptor.js +9 -6
- data/frameworks/sproutcore/foundation/object.js +249 -177
- data/frameworks/sproutcore/foundation/page.js +5 -2
- data/frameworks/sproutcore/foundation/path_module.js +11 -10
- data/frameworks/sproutcore/foundation/responder.js +5 -2
- data/frameworks/sproutcore/foundation/routes.js +17 -13
- data/frameworks/sproutcore/foundation/run_loop.js +249 -11
- data/frameworks/sproutcore/foundation/server.js +1 -1
- data/frameworks/sproutcore/foundation/set.js +3 -3
- data/frameworks/sproutcore/foundation/string.js +5 -3
- data/frameworks/sproutcore/foundation/timer.js +371 -0
- data/frameworks/sproutcore/foundation/undo_manager.js +1 -1
- data/frameworks/sproutcore/foundation/unittest.js +3 -3
- data/frameworks/sproutcore/foundation/utils.js +161 -2
- data/frameworks/sproutcore/globals/panels.js +1 -1
- data/frameworks/sproutcore/globals/popups.js +4 -3
- data/frameworks/sproutcore/globals/window.js +44 -4
- data/frameworks/sproutcore/lib/button_views.rb +328 -0
- data/frameworks/sproutcore/lib/collection_view.rb +80 -0
- data/frameworks/sproutcore/lib/core_views.rb +281 -0
- data/frameworks/sproutcore/lib/form_views.rb +253 -0
- data/frameworks/sproutcore/lib/index.rhtml +2 -0
- data/frameworks/sproutcore/lib/menu_views.rb +88 -0
- data/frameworks/sproutcore/{foundation → mixins}/array.js +60 -29
- data/frameworks/sproutcore/mixins/control.js +265 -0
- data/frameworks/sproutcore/mixins/delegate_support.js +66 -0
- data/frameworks/sproutcore/{foundation → mixins}/observable.js +176 -6
- data/frameworks/sproutcore/mixins/scrollable.js +245 -0
- data/frameworks/sproutcore/mixins/selection_support.js +148 -0
- data/frameworks/sproutcore/mixins/validatable.js +152 -0
- data/frameworks/sproutcore/models/collection.js +5 -5
- data/frameworks/sproutcore/models/record.js +1 -1
- data/frameworks/sproutcore/models/store.js +1 -1
- data/frameworks/sproutcore/panes/dialog.js +1 -1
- data/frameworks/sproutcore/panes/manager.js +1 -1
- data/frameworks/sproutcore/panes/menu.js +1 -1
- data/frameworks/sproutcore/panes/overlay.js +2 -2
- data/frameworks/sproutcore/panes/panel.js +1 -1
- data/frameworks/sproutcore/panes/picker.js +1 -1
- data/frameworks/sproutcore/tests/controllers/array.rhtml +44 -4
- data/frameworks/sproutcore/tests/foundation/timer/invalidate.rhtml +33 -0
- data/frameworks/sproutcore/tests/foundation/timer/invokeLater.rhtml +145 -0
- data/frameworks/sproutcore/tests/foundation/timer/isPaused.rhtml +70 -0
- data/frameworks/sproutcore/tests/foundation/timer/schedule.rhtml +145 -0
- data/frameworks/sproutcore/tests/views/{scroll.rhtml → checkbox.rhtml} +3 -3
- data/frameworks/sproutcore/tests/views/{collection.rhtml → collection/base.rhtml} +33 -32
- data/frameworks/sproutcore/tests/views/collection/incremental_rendering.rhtml +260 -0
- data/frameworks/sproutcore/tests/views/image_cell.rhtml +19 -0
- data/frameworks/sproutcore/tests/views/label_item.rhtml +2 -4
- data/frameworks/sproutcore/tests/views/list.rhtml +2 -3
- data/frameworks/sproutcore/tests/views/list_item.rhtml +20 -0
- data/frameworks/sproutcore/tests/views/slider.rhtml +20 -0
- data/frameworks/sproutcore/tests/views/text_cell.rhtml +19 -0
- data/frameworks/sproutcore/tests/views/view/clippingFrame.rhtml +395 -0
- data/frameworks/sproutcore/tests/views/view/frame.rhtml +353 -0
- data/frameworks/sproutcore/tests/views/view/innerFrame.rhtml +347 -0
- data/frameworks/sproutcore/tests/views/view/isVisibleInWindow.rhtml +148 -0
- data/frameworks/sproutcore/tests/views/view/scrollFrame.rhtml +468 -0
- data/frameworks/sproutcore/validators/credit_card.js +33 -13
- data/frameworks/sproutcore/validators/date.js +26 -6
- data/frameworks/sproutcore/validators/email.js +21 -3
- data/frameworks/sproutcore/validators/not_empty.js +11 -1
- data/frameworks/sproutcore/validators/number.js +18 -4
- data/frameworks/sproutcore/validators/password.js +12 -1
- data/frameworks/sproutcore/validators/validator.js +204 -194
- data/frameworks/sproutcore/views/{button.js → button/button.js} +96 -94
- data/frameworks/sproutcore/views/button/checkbox.js +29 -0
- data/frameworks/sproutcore/views/button/disclosure.js +42 -0
- data/frameworks/sproutcore/views/button/radio.js +29 -0
- data/frameworks/sproutcore/views/{collection.js → collection/collection.js} +1373 -1024
- data/frameworks/sproutcore/views/collection/grid.js +124 -46
- data/frameworks/sproutcore/views/collection/image_cell.js +17 -46
- data/frameworks/sproutcore/views/collection/list.js +45 -35
- data/frameworks/sproutcore/views/collection/source_list.js +386 -0
- data/frameworks/sproutcore/views/collection/table.js +118 -0
- data/frameworks/sproutcore/views/container.js +7 -2
- data/frameworks/sproutcore/views/error_explanation.js +23 -10
- data/frameworks/sproutcore/views/{checkbox_field.js → field/checkbox_field.js} +16 -6
- data/frameworks/sproutcore/views/field/field.js +219 -0
- data/frameworks/sproutcore/views/{radio_field.js → field/radio_field.js} +27 -12
- data/frameworks/sproutcore/views/{select_field.js → field/select_field.js} +116 -90
- data/frameworks/sproutcore/views/{text_field.js → field/text_field.js} +57 -8
- data/frameworks/sproutcore/views/{textarea_field.js → field/textarea_field.js} +13 -3
- data/frameworks/sproutcore/views/filter_button.js +2 -2
- data/frameworks/sproutcore/views/form.js +3 -3
- data/frameworks/sproutcore/views/image.js +128 -21
- data/frameworks/sproutcore/views/inline_text_editor.js +1 -1
- data/frameworks/sproutcore/views/label.js +149 -92
- data/frameworks/sproutcore/views/list_item.js +225 -0
- data/frameworks/sproutcore/views/menu_item.js +10 -4
- data/frameworks/sproutcore/views/pagination.js +11 -4
- data/frameworks/sproutcore/views/popup_button.js +25 -21
- data/frameworks/sproutcore/views/popup_menu.js +10 -4
- data/frameworks/sproutcore/views/progress.js +29 -16
- data/frameworks/sproutcore/views/radio_group.js +1 -1
- data/frameworks/sproutcore/views/scroll.js +60 -20
- data/frameworks/sproutcore/views/segmented.js +1 -1
- data/frameworks/sproutcore/views/slider.js +132 -0
- data/frameworks/sproutcore/views/source_list_group.js +130 -0
- data/frameworks/sproutcore/views/spinner.js +1 -1
- data/frameworks/sproutcore/views/split.js +292 -0
- data/frameworks/sproutcore/views/split_divider.js +109 -0
- data/frameworks/sproutcore/views/tab.js +1 -1
- data/frameworks/sproutcore/views/toolbar.js +1 -1
- data/frameworks/sproutcore/views/view.js +1272 -591
- data/generators/client/templates/english.lproj/body.css +1 -1
- data/generators/controller/controller_generator.rb +1 -1
- data/generators/controller/templates/test.rhtml +2 -1
- data/generators/model/templates/test.rhtml +1 -1
- data/generators/test/templates/test.rhtml +1 -1
- data/generators/view/templates/test.rhtml +1 -1
- data/jsdoc/templates/sproutcore/class.tmpl +241 -338
- data/jsdoc/templates/sproutcore/default.css +105 -155
- data/jsdoc/templates/sproutcore/index.tmpl +43 -8
- data/jsdoc/templates/sproutcore/publish.js +9 -4
- data/lib/sproutcore/build_tools/html_builder.rb +29 -13
- data/lib/sproutcore/build_tools/resource_builder.rb +1 -1
- data/lib/sproutcore/bundle.rb +86 -25
- data/lib/sproutcore/jsdoc.rb +2 -0
- data/lib/sproutcore/version.rb +1 -1
- data/lib/sproutcore/view_helpers.rb +36 -3
- data/tasks/deployment.rake +1 -1
- metadata +69 -36
- data/clients/sc_docs/english.lproj/icons/small/next.png +0 -0
- data/clients/sc_docs/english.lproj/icons/small/reset.png +0 -0
- data/clients/sc_docs/english.lproj/images/gradients.png +0 -0
- data/clients/sc_docs/english.lproj/images/toolbar.png +0 -0
- data/clients/sc_docs/english.lproj/warning.rhtml +0 -6
- data/clients/sc_test_runner/english.lproj/warning.rhtml +0 -6
- data/frameworks/sproutcore/english.lproj/buttons.png +0 -0
- data/frameworks/sproutcore/english.lproj/collections.css +0 -82
- data/frameworks/sproutcore/english.lproj/images/buttons-sprite.png +0 -0
- data/frameworks/sproutcore/views/collection/collection_item.js +0 -36
- data/frameworks/sproutcore/views/collection/text_cell.js +0 -128
- data/frameworks/sproutcore/views/field.js +0 -214
- data/frameworks/sproutcore/views/workspace.js +0 -170
- data/generators/client/templates/english.lproj/controls.css +0 -0
- data/generators/framework/templates/english.lproj/body.css +0 -0
- data/generators/framework/templates/english.lproj/body.rhtml +0 -3
- data/generators/framework/templates/english.lproj/controls.css +0 -0
- data/lib/sproutcore/view_helpers/button_views.rb +0 -302
- data/lib/sproutcore/view_helpers/core_views.rb +0 -292
- data/lib/sproutcore/view_helpers/form_views.rb +0 -258
- data/lib/sproutcore/view_helpers/menu_views.rb +0 -94
@@ -1,47 +1,72 @@
|
|
1
|
+
/* @override http://localhost:4020/static/sproutcore/-docs/data/default.css */
|
1
2
|
|
3
|
+
/* @group Core */
|
2
4
|
|
3
|
-
|
5
|
+
body.sc-doc {
|
6
|
+
background-color: white ;
|
7
|
+
padding: 20px;
|
8
|
+
}
|
4
9
|
|
5
|
-
|
6
|
-
|
10
|
+
.sc-doc {
|
11
|
+
font: 64.5% Helvetica, Arial, Verdana, sans-serif;
|
12
|
+
line-height: 1em ;
|
7
13
|
}
|
8
14
|
|
9
|
-
.
|
10
|
-
.
|
11
|
-
|
15
|
+
/* Set standard size on some things. */
|
16
|
+
.sc-doc p,
|
17
|
+
.sc-doc dd,
|
18
|
+
.sc-doc dt,
|
19
|
+
.sc-doc li,
|
20
|
+
.sc-doc table {
|
21
|
+
line-height: 1.3em;
|
22
|
+
font-size: 1.3em ;
|
12
23
|
}
|
13
24
|
|
14
|
-
.
|
15
|
-
|
16
|
-
|
25
|
+
.sc-doc h1 {
|
26
|
+
font-size: 3em;
|
27
|
+
margin: 0 0 1em 0;
|
28
|
+
text-transform: capitalize;
|
17
29
|
}
|
18
30
|
|
19
|
-
.
|
20
|
-
|
31
|
+
.sc-doc h2 {
|
32
|
+
padding: 0;
|
33
|
+
padding-bottom: 4px;
|
34
|
+
border-bottom: 1px #555 solid;
|
35
|
+
text-transform: capitalize;
|
36
|
+
margin: 1.5em 0 0;
|
37
|
+
font-size: 2.2em;
|
21
38
|
}
|
22
39
|
|
23
|
-
|
40
|
+
.sc-doc h3 {
|
41
|
+
font-size: 2em;
|
42
|
+
padding: 0;
|
43
|
+
margin: 3em 0 0 0;
|
44
|
+
}
|
24
45
|
|
25
|
-
|
46
|
+
.sc-doc h4 {
|
47
|
+
font-weight: normal ;
|
48
|
+
font-size: 1.4em;
|
49
|
+
margin: 0.5em 0 0 0;
|
50
|
+
padding: 0;
|
51
|
+
}
|
26
52
|
|
27
|
-
|
28
|
-
font:
|
29
|
-
|
30
|
-
|
53
|
+
.sc-doc h5 {
|
54
|
+
font-size: 1.3em;
|
55
|
+
padding: 0;
|
56
|
+
margin: 1.3em 0 0.5em 0;
|
31
57
|
}
|
32
58
|
|
33
|
-
.sc-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
border-bottom: 1px #888 dotted ;
|
59
|
+
.sc-doc p { margin: 0.5em 0; }
|
60
|
+
|
61
|
+
.sc-doc a {
|
62
|
+
text-decoration: none ;
|
38
63
|
}
|
39
64
|
|
40
|
-
.sc-
|
65
|
+
.sc-doc label {
|
41
66
|
font-weight: bold ;
|
42
67
|
}
|
43
68
|
|
44
|
-
.sc-theme .ghost {
|
69
|
+
.sc-doc .sc-theme .ghost {
|
45
70
|
-moz-user-select: none;
|
46
71
|
-khtml-user-select: none;
|
47
72
|
user-select: none;
|
@@ -49,189 +74,114 @@ body.sc-theme {
|
|
49
74
|
-moz-opacity: .45 ;
|
50
75
|
}
|
51
76
|
|
52
|
-
|
53
|
-
|
54
|
-
/* @group sc-theme Form */
|
55
|
-
|
56
|
-
.sc-theme .invalid {
|
57
|
-
border: 2px red solid ;
|
77
|
+
.sc-doc dt {
|
78
|
+
font-style: italic;
|
58
79
|
}
|
59
80
|
|
60
|
-
.sc-
|
61
|
-
|
62
|
-
list-style-type: none ;
|
63
|
-
font-size: 11px;
|
64
|
-
}
|
65
|
-
|
66
|
-
.sc-theme form ul.errors {
|
67
|
-
margin: 0;
|
68
|
-
padding: 0;
|
69
|
-
color: red ;
|
70
|
-
}
|
71
|
-
|
72
|
-
.sc-theme input {
|
73
|
-
font-size: 12px;
|
81
|
+
.sc-doc dd {
|
82
|
+
margin: 0 0 1em 1em;
|
74
83
|
}
|
75
84
|
|
76
85
|
/* @end */
|
77
86
|
|
78
|
-
/* @group
|
87
|
+
/* @group Summary Table */
|
79
88
|
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
89
|
+
.sc-doc table.summary {
|
90
|
+
min-width: 450px;
|
91
|
+
border: 1px #999 solid;
|
92
|
+
border-bottom: none ;
|
93
|
+
border-spacing: 0;
|
94
|
+
margin-bottom: 2em;
|
84
95
|
}
|
85
96
|
|
86
|
-
table.
|
87
|
-
|
88
|
-
|
89
|
-
|
97
|
+
.sc-doc table.summary td {
|
98
|
+
border-bottom: 1px #999 solid;
|
99
|
+
border-collapse: collapse;
|
100
|
+
padding: 0.5em;
|
101
|
+
text-align: left ;
|
90
102
|
}
|
91
103
|
|
92
|
-
table.
|
93
|
-
|
104
|
+
.sc-doc table.summary .even td {
|
105
|
+
background-color: #eef;
|
94
106
|
}
|
95
107
|
|
96
|
-
.summary
|
97
|
-
.detail h2 {
|
98
|
-
border-top: 1px none #ccc;
|
99
|
-
border-bottom: 1px solid #666;
|
100
|
-
margin: 1.0em 0 0;
|
101
|
-
font-size: 1.8em;
|
102
|
-
}
|
103
|
-
|
104
|
-
.method {
|
108
|
+
.sc-doc table.summary td.label {
|
105
109
|
font-weight: bold ;
|
110
|
+
width: 100px;
|
111
|
+
text-align: right ;
|
112
|
+
padding-right: 4px;
|
106
113
|
}
|
107
114
|
|
108
|
-
.
|
109
|
-
|
110
|
-
|
111
|
-
}
|
112
|
-
|
113
|
-
|
114
|
-
/* @end */
|
115
|
-
|
116
|
-
/* @group Intro */
|
117
|
-
|
118
|
-
.intro h1 {
|
119
|
-
border: none ;
|
120
|
-
padding: 0;
|
121
|
-
margin: 0;
|
122
|
-
font-size: 2.5em;
|
123
|
-
padding-top: 1em;
|
124
|
-
line-height: 1;
|
125
|
-
}
|
126
|
-
|
127
|
-
.intro p.source {
|
128
|
-
margin: 0;
|
129
|
-
font-size: .9em;
|
130
|
-
color: #aaa;
|
131
|
-
font-weight: bold;
|
132
|
-
padding: 0 0 0 1px;
|
133
|
-
}
|
134
|
-
|
135
|
-
.intro p.source a {
|
136
|
-
color: #555;
|
137
|
-
}
|
138
|
-
|
139
|
-
.intro .description {
|
140
|
-
border-bottom: 1px none #ccc;
|
141
|
-
border-top: 1px none #ccc;
|
142
|
-
padding-top: 0;
|
143
|
-
margin-top: 20px;
|
144
|
-
margin-bottom: 30px;
|
115
|
+
.sc-doc table.summary td.value {
|
116
|
+
min-width: 300px;
|
117
|
+
width: 300px;
|
145
118
|
}
|
146
119
|
|
147
120
|
/* @end */
|
148
121
|
|
149
|
-
/* @group Summary */
|
122
|
+
/* @group Field & Method Summary */
|
150
123
|
|
151
|
-
.summary
|
152
|
-
|
153
|
-
|
154
|
-
margin-top: 4px;
|
155
|
-
border-spacing: 0 ;
|
156
|
-
border-collapse: collapse ;
|
157
|
-
}
|
158
|
-
|
159
|
-
.summary table td {
|
160
|
-
border-top: 1px #ccc solid ;
|
161
|
-
border-bottom: 1px #ccc solid ;
|
162
|
-
padding: 4px;
|
124
|
+
.sc-doc .summary li {
|
125
|
+
list-style-type: none ;
|
126
|
+
position: relative;
|
163
127
|
}
|
164
128
|
|
165
|
-
.summary
|
166
|
-
font-size: .
|
167
|
-
font-weight: bold ;
|
129
|
+
.sc-doc .summary li code {
|
130
|
+
font-size: 1.1em;
|
168
131
|
}
|
169
132
|
|
170
|
-
.summary
|
171
|
-
|
172
|
-
margin: 0;
|
173
|
-
padding: 0;
|
133
|
+
.sc-doc .summary li .description {
|
134
|
+
display: none ;
|
174
135
|
}
|
175
136
|
|
176
|
-
.summary
|
177
|
-
|
137
|
+
.sc-doc .summary li:hover .description {
|
138
|
+
display: block ;
|
139
|
+
font-size: 0.86em;
|
140
|
+
position: absolute ;
|
141
|
+
left: 80px;
|
142
|
+
bottom: 2em;
|
143
|
+
padding: 0.3em 1em ;
|
144
|
+
background-color: #fff898;
|
145
|
+
border: 1px solid #bbae2f;
|
146
|
+
-webkit-box-shadow: rgba(0,0,0,0.3) 0px 2px 5px;
|
147
|
+
color: #4b4000;
|
148
|
+
z-index: 100;
|
178
149
|
}
|
179
150
|
|
180
151
|
/* @end */
|
181
152
|
|
182
153
|
/* @group Detail */
|
183
154
|
|
184
|
-
.
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
.detail .single-method,
|
189
|
-
.detail .property {
|
190
|
-
margin-top: 30px;
|
191
|
-
}
|
192
|
-
|
193
|
-
.detail h3 {
|
194
|
-
margin: 4px 0;
|
195
|
-
padding: 4px;
|
196
|
-
border-top: 1px #ccc solid ;
|
197
|
-
border-bottom: 1px #ccc solid ;
|
198
|
-
background-color: #fafafa ;
|
155
|
+
.sc-doc .detail p.signature {
|
156
|
+
padding: 0;
|
157
|
+
margin: 1em 0;
|
158
|
+
font-family: Courier, mono;
|
199
159
|
}
|
200
160
|
|
201
|
-
.signature {
|
202
|
-
|
203
|
-
display: block ;
|
161
|
+
.sc-doc .detail p.signature .type {
|
162
|
+
font-style: italic;
|
204
163
|
}
|
205
164
|
|
206
|
-
.
|
165
|
+
.sc-doc .detail p.signature .name {
|
207
166
|
font-weight: bold ;
|
208
167
|
}
|
209
168
|
|
210
|
-
h4 {
|
211
|
-
margin-bottom: 0;
|
212
|
-
}
|
213
|
-
|
214
|
-
.single-method .parameters ul {
|
215
|
-
margin-top: 0;
|
216
|
-
padding-left: 20px
|
217
|
-
}
|
218
|
-
|
219
169
|
/* @end */
|
220
170
|
|
221
|
-
.jsdoc_ctime {
|
171
|
+
.sc-doc .jsdoc_ctime {
|
222
172
|
border-top: 1px #ccc solid ;
|
223
173
|
padding: 4px 0;
|
224
174
|
margin-top: 20px;
|
225
175
|
margin-bottom: 0px;
|
226
|
-
font-size: .
|
176
|
+
font-size: 1.0em;
|
227
177
|
text-align: center ;
|
228
178
|
color: #888 ;
|
229
179
|
}
|
230
180
|
|
231
181
|
/* @group Description */
|
232
182
|
|
233
|
-
.description blockquote,
|
234
|
-
.description p.code {
|
183
|
+
.sc-doc .description blockquote,
|
184
|
+
.sc-doc .description p.code {
|
235
185
|
padding: 10px ;
|
236
186
|
margin: 10px 20px;
|
237
187
|
background-color: #f5f5f5 ;
|
@@ -7,15 +7,50 @@ function keys(o) {
|
|
7
7
|
|
8
8
|
function groupName(path) {
|
9
9
|
var parts = path.split('/') ;
|
10
|
-
|
10
|
+
|
11
|
+
var rootIndex = parts.indexOf('frameworks') ;
|
12
|
+
if (rootIndex < 0) rootIndex = parts.indexOf('clients') ;
|
13
|
+
|
14
|
+
if (rootIndex < 0) {
|
15
|
+
return parts[parts.length - 2] ;
|
16
|
+
|
17
|
+
} else {
|
18
|
+
return parts.slice(rootIndex+2, parts.length-1).join('/') ;
|
19
|
+
}
|
20
|
+
};
|
21
|
+
|
22
|
+
function getSymbols(className, thisClass) {
|
23
|
+
var ret = [className.toLowerCase()] ;
|
24
|
+
|
25
|
+
var f = function(data) {
|
26
|
+
if (data && data.length) {
|
27
|
+
var idx = data.length ;
|
28
|
+
while(--idx >= 0) {
|
29
|
+
var name = data[idx].name ;
|
30
|
+
if (name) ret.push(name.toLowerCase()) ;
|
31
|
+
}
|
32
|
+
}
|
33
|
+
};
|
34
|
+
|
35
|
+
f(thisClass.properties) ;
|
36
|
+
f(thisClass.methods) ;
|
37
|
+
|
38
|
+
return ret.join(' ') ;
|
11
39
|
};
|
12
40
|
|
13
41
|
!}
|
14
|
-
{
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
42
|
+
{ records: [<for each="classname" in="keys(data).sort()">
|
43
|
+
{ "type": "Doc",
|
44
|
+
"guid": "{+classname+}",
|
45
|
+
"title": "{+classname+}",
|
46
|
+
"url": "{+data[classname][0].docs+}",
|
47
|
+
"group": "{+groupName(data[classname][0].file.path)+}",
|
48
|
+
"symbols": "{+getSymbols(classname, data[classname][0])+}",
|
49
|
+
"path": "{+data[classname][0].file.path+}"
|
50
|
+
},</for>
|
51
|
+
{ "type": "Doc",
|
52
|
+
"guid": "_GLOBALS",
|
53
|
+
"title": "GLOBALS",
|
54
|
+
"url": "globals.html"
|
55
|
+
}]
|
21
56
|
}
|
@@ -92,6 +92,11 @@ function superTextile(s) {
|
|
92
92
|
line = line.replace(/^\s*h([1|2|3|4|5|6])\.(.+)/, '<h$1>$2</h$1>');
|
93
93
|
changed = 1;
|
94
94
|
|
95
|
+
// convert - to bulletted list. liu tag will be fixed later.
|
96
|
+
} else if (line.search(/^\s*-\s+/) != -1) {
|
97
|
+
line = line.replace(/^\s*-\s+/,'\t<liu>') + '</liu>'; changed = 1;
|
98
|
+
changed = 1;
|
99
|
+
|
95
100
|
// convert * to bulletted list. liu tag will be fixed later.
|
96
101
|
} else if (line.search(/^\s*\*\s+/) != -1) {
|
97
102
|
line = line.replace(/^\s*\*\s+/,'\t<liu>') + '</liu>'; changed = 1;
|
@@ -209,10 +214,10 @@ function publish(fileGroup, context) {
|
|
209
214
|
}
|
210
215
|
}
|
211
216
|
|
212
|
-
if (!allFiles[fileGroup.files[i].path]) {
|
213
|
-
|
214
|
-
|
215
|
-
}
|
217
|
+
// if (!allFiles[fileGroup.files[i].path]) {
|
218
|
+
// var hiliter = new JsHilite(IO.readFile(fileGroup.files[i].path), JsDoc.opt.e);
|
219
|
+
// IO.saveFile(context.d, file_srcname, hiliter.hilite());
|
220
|
+
// }
|
216
221
|
fileGroup.files[i].source = file_srcname;
|
217
222
|
allFiles[fileGroup.files[i].path] = true;
|
218
223
|
}
|
@@ -2,13 +2,16 @@ require 'erubis'
|
|
2
2
|
require 'sproutcore/helpers'
|
3
3
|
require 'sproutcore/view_helpers'
|
4
4
|
|
5
|
+
puts "LOADED HTML_BUILDER"
|
6
|
+
|
5
7
|
module SproutCore
|
6
8
|
|
7
9
|
module BuildTools
|
8
10
|
|
9
|
-
# Whenever you build an HTML file for a SproutCore client, an instance of
|
10
|
-
# is created to actually process and build the HTML using
|
11
|
-
# more methods to use in your HTML files, just
|
11
|
+
# Whenever you build an HTML file for a SproutCore client, an instance of
|
12
|
+
# this class is created to actually process and build the HTML using
|
13
|
+
# Erubus. If you want to add more methods to use in your HTML files, just
|
14
|
+
# include them in HtmlContext.
|
12
15
|
#
|
13
16
|
class HtmlContext
|
14
17
|
|
@@ -26,8 +29,9 @@ module SproutCore
|
|
26
29
|
@bundle = bundle
|
27
30
|
@library = bundle.library
|
28
31
|
|
29
|
-
# Find all of the entries that need to be included. If deep is true,
|
30
|
-
# required bundles. Example composite entries to include
|
32
|
+
# Find all of the entries that need to be included. If deep is true,
|
33
|
+
# the include required bundles. Example composite entries to include
|
34
|
+
# their members.
|
31
35
|
if deep
|
32
36
|
@entries = bundle.all_required_bundles.map do |cur_bundle|
|
33
37
|
ret = (cur_bundle == bundle) ? [entry] : cur_bundle.entries_for(:html, :language => language, :hidden => :include)
|
@@ -40,11 +44,21 @@ module SproutCore
|
|
40
44
|
@entries = entry.composite? ? entry.composite.map { |c| x.entry_for(c) } : [entry]
|
41
45
|
end
|
42
46
|
|
43
|
-
# Clean out any composites we might have collected. They have already
|
47
|
+
# Clean out any composites we might have collected. They have already
|
48
|
+
# been expanded.
|
44
49
|
@entries.reject! { |entry| entry.composite? }
|
50
|
+
|
51
|
+
# Load any helpers before we continue
|
52
|
+
puts "*************REQUIRE"
|
53
|
+
bundle.all_required_bundles.each do |cur_bundle|
|
54
|
+
puts "requiring: #{cur_bundle.bundle_name}"
|
55
|
+
require_helpers(nil, cur_bundle)
|
56
|
+
end
|
57
|
+
|
45
58
|
end
|
46
59
|
|
47
|
-
# Actually builds the HTML file from the entry (actually from any
|
60
|
+
# Actually builds the HTML file from the entry (actually from any
|
61
|
+
# composite entries)
|
48
62
|
def build
|
49
63
|
|
50
64
|
@layout_path = bundle.layout_path
|
@@ -75,18 +89,20 @@ module SproutCore
|
|
75
89
|
end
|
76
90
|
|
77
91
|
|
78
|
-
# Returns the current bundle name. Often useful for generating titles,
|
92
|
+
# Returns the current bundle name. Often useful for generating titles,
|
93
|
+
# etc.
|
79
94
|
def bundle_name; bundle.bundle_name; end
|
80
95
|
|
81
|
-
#### For Rails Compatibility. render() does not do anything useful
|
82
|
-
# new build system is nice about putting things into the right
|
96
|
+
#### For Rails Compatibility. render() does not do anything useful
|
97
|
+
# since the new build system is nice about putting things into the right
|
98
|
+
# place for output.
|
83
99
|
def render; ''; end
|
84
100
|
|
85
101
|
end
|
86
102
|
|
87
|
-
# Builds an html file for the specified entry. If deep is true, then this
|
88
|
-
# find all of the html entries for any required bundles and
|
89
|
-
# html file.
|
103
|
+
# Builds an html file for the specified entry. If deep is true, then this
|
104
|
+
# will also find all of the html entries for any required bundles and
|
105
|
+
# include them in the built html file.
|
90
106
|
def self.build_html(entry, bundle, deep=true)
|
91
107
|
context = HtmlContext.new(entry, bundle, deep)
|
92
108
|
output = context.build
|