sproutcore 0.9.1 → 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. data/History.txt +233 -0
  2. data/Manifest.txt +67 -34
  3. data/bin/sc-build +12 -1
  4. data/bin/sc-gen +1 -1
  5. data/bin/sproutcore +14 -0
  6. data/clients/sc_docs/controllers/docs.js +38 -8
  7. data/clients/sc_docs/english.lproj/body.css +80 -127
  8. data/clients/sc_docs/english.lproj/body.rhtml +43 -23
  9. data/clients/sc_docs/english.lproj/no_docs.rhtml +2 -1
  10. data/clients/sc_docs/english.lproj/tabs.rhtml +16 -0
  11. data/clients/sc_docs/main.js +14 -9
  12. data/clients/sc_docs/models/doc.js +1 -1
  13. data/clients/sc_docs/tests/controllers/docs.rhtml +1 -2
  14. data/clients/sc_docs/tests/models/doc.rhtml +1 -2
  15. data/clients/sc_docs/tests/views/doc_frame.rhtml +1 -2
  16. data/clients/sc_docs/tests/views/doc_label_view.rhtml +1 -2
  17. data/clients/sc_docs/views/doc_frame.js +1 -1
  18. data/clients/sc_test_runner/controllers/runner.js +31 -8
  19. data/clients/sc_test_runner/english.lproj/body.css +62 -122
  20. data/clients/sc_test_runner/english.lproj/body.rhtml +62 -26
  21. data/clients/sc_test_runner/main.js +1 -6
  22. data/clients/sc_test_runner/models/test.js +14 -1
  23. data/clients/sc_test_runner/views/runner_frame.js +4 -2
  24. data/clients/view_builder/builders/builder.js +339 -0
  25. data/clients/view_builder/builders/button.js +81 -0
  26. data/clients/view_builder/controllers/document.js +21 -0
  27. data/clients/view_builder/core.js +19 -0
  28. data/clients/view_builder/english.lproj/body.css +77 -0
  29. data/clients/view_builder/english.lproj/body.rhtml +41 -0
  30. data/clients/{sc_docs → view_builder}/english.lproj/controls.css +0 -0
  31. data/clients/view_builder/english.lproj/strings.js +14 -0
  32. data/clients/view_builder/main.js +38 -0
  33. data/clients/view_builder/tests/controllers/document.rhtml +20 -0
  34. data/clients/view_builder/tests/views/builder.rhtml +20 -0
  35. data/clients/view_builder/views/builder.js +23 -0
  36. data/frameworks/prototype/prototype.js +1 -1
  37. data/frameworks/sproutcore/Core.js +32 -7
  38. data/frameworks/sproutcore/README +1 -1
  39. data/frameworks/sproutcore/animation/animation.js +411 -0
  40. data/frameworks/sproutcore/controllers/array.js +17 -9
  41. data/frameworks/sproutcore/controllers/collection.js +9 -110
  42. data/frameworks/sproutcore/controllers/controller.js +1 -1
  43. data/frameworks/sproutcore/controllers/object.js +2 -1
  44. data/frameworks/sproutcore/drag/drag.js +267 -56
  45. data/frameworks/sproutcore/drag/drag_data_source.js +24 -16
  46. data/frameworks/sproutcore/drag/drag_source.js +53 -42
  47. data/frameworks/sproutcore/drag/drop_target.js +2 -2
  48. data/frameworks/sproutcore/english.lproj/buttons.css +337 -236
  49. data/frameworks/sproutcore/english.lproj/core.css +115 -0
  50. data/frameworks/sproutcore/english.lproj/icons.css +227 -0
  51. data/{clients/sc_docs → frameworks/sproutcore}/english.lproj/images/indicator.gif +0 -0
  52. data/frameworks/sproutcore/english.lproj/images/sc-theme-sprite.png +0 -0
  53. data/frameworks/sproutcore/english.lproj/images/sc-theme-ysprite.png +0 -0
  54. data/frameworks/sproutcore/english.lproj/images/shared-icons.png +0 -0
  55. data/frameworks/sproutcore/english.lproj/menu.css +1 -1
  56. data/frameworks/sproutcore/english.lproj/strings.js +1 -1
  57. data/frameworks/sproutcore/english.lproj/theme.css +405 -31
  58. data/frameworks/sproutcore/foundation/application.js +15 -11
  59. data/frameworks/sproutcore/foundation/benchmark.js +1 -1
  60. data/frameworks/sproutcore/foundation/binding.js +2 -2
  61. data/frameworks/sproutcore/foundation/date.js +1 -1
  62. data/frameworks/sproutcore/foundation/error.js +1 -1
  63. data/frameworks/sproutcore/foundation/input_manager.js +32 -21
  64. data/frameworks/sproutcore/foundation/mock.js +1 -1
  65. data/frameworks/sproutcore/foundation/node_descriptor.js +9 -6
  66. data/frameworks/sproutcore/foundation/object.js +249 -177
  67. data/frameworks/sproutcore/foundation/page.js +5 -2
  68. data/frameworks/sproutcore/foundation/path_module.js +11 -10
  69. data/frameworks/sproutcore/foundation/responder.js +5 -2
  70. data/frameworks/sproutcore/foundation/routes.js +17 -13
  71. data/frameworks/sproutcore/foundation/run_loop.js +249 -11
  72. data/frameworks/sproutcore/foundation/server.js +1 -1
  73. data/frameworks/sproutcore/foundation/set.js +3 -3
  74. data/frameworks/sproutcore/foundation/string.js +5 -3
  75. data/frameworks/sproutcore/foundation/timer.js +371 -0
  76. data/frameworks/sproutcore/foundation/undo_manager.js +1 -1
  77. data/frameworks/sproutcore/foundation/unittest.js +3 -3
  78. data/frameworks/sproutcore/foundation/utils.js +161 -2
  79. data/frameworks/sproutcore/globals/panels.js +1 -1
  80. data/frameworks/sproutcore/globals/popups.js +4 -3
  81. data/frameworks/sproutcore/globals/window.js +44 -4
  82. data/frameworks/sproutcore/lib/button_views.rb +328 -0
  83. data/frameworks/sproutcore/lib/collection_view.rb +80 -0
  84. data/frameworks/sproutcore/lib/core_views.rb +281 -0
  85. data/frameworks/sproutcore/lib/form_views.rb +253 -0
  86. data/frameworks/sproutcore/lib/index.rhtml +2 -0
  87. data/frameworks/sproutcore/lib/menu_views.rb +88 -0
  88. data/frameworks/sproutcore/{foundation → mixins}/array.js +60 -29
  89. data/frameworks/sproutcore/mixins/control.js +265 -0
  90. data/frameworks/sproutcore/mixins/delegate_support.js +66 -0
  91. data/frameworks/sproutcore/{foundation → mixins}/observable.js +176 -6
  92. data/frameworks/sproutcore/mixins/scrollable.js +245 -0
  93. data/frameworks/sproutcore/mixins/selection_support.js +148 -0
  94. data/frameworks/sproutcore/mixins/validatable.js +152 -0
  95. data/frameworks/sproutcore/models/collection.js +5 -5
  96. data/frameworks/sproutcore/models/record.js +1 -1
  97. data/frameworks/sproutcore/models/store.js +1 -1
  98. data/frameworks/sproutcore/panes/dialog.js +1 -1
  99. data/frameworks/sproutcore/panes/manager.js +1 -1
  100. data/frameworks/sproutcore/panes/menu.js +1 -1
  101. data/frameworks/sproutcore/panes/overlay.js +2 -2
  102. data/frameworks/sproutcore/panes/panel.js +1 -1
  103. data/frameworks/sproutcore/panes/picker.js +1 -1
  104. data/frameworks/sproutcore/tests/controllers/array.rhtml +44 -4
  105. data/frameworks/sproutcore/tests/foundation/timer/invalidate.rhtml +33 -0
  106. data/frameworks/sproutcore/tests/foundation/timer/invokeLater.rhtml +145 -0
  107. data/frameworks/sproutcore/tests/foundation/timer/isPaused.rhtml +70 -0
  108. data/frameworks/sproutcore/tests/foundation/timer/schedule.rhtml +145 -0
  109. data/frameworks/sproutcore/tests/views/{scroll.rhtml → checkbox.rhtml} +3 -3
  110. data/frameworks/sproutcore/tests/views/{collection.rhtml → collection/base.rhtml} +33 -32
  111. data/frameworks/sproutcore/tests/views/collection/incremental_rendering.rhtml +260 -0
  112. data/frameworks/sproutcore/tests/views/image_cell.rhtml +19 -0
  113. data/frameworks/sproutcore/tests/views/label_item.rhtml +2 -4
  114. data/frameworks/sproutcore/tests/views/list.rhtml +2 -3
  115. data/frameworks/sproutcore/tests/views/list_item.rhtml +20 -0
  116. data/frameworks/sproutcore/tests/views/slider.rhtml +20 -0
  117. data/frameworks/sproutcore/tests/views/text_cell.rhtml +19 -0
  118. data/frameworks/sproutcore/tests/views/view/clippingFrame.rhtml +395 -0
  119. data/frameworks/sproutcore/tests/views/view/frame.rhtml +353 -0
  120. data/frameworks/sproutcore/tests/views/view/innerFrame.rhtml +347 -0
  121. data/frameworks/sproutcore/tests/views/view/isVisibleInWindow.rhtml +148 -0
  122. data/frameworks/sproutcore/tests/views/view/scrollFrame.rhtml +468 -0
  123. data/frameworks/sproutcore/validators/credit_card.js +33 -13
  124. data/frameworks/sproutcore/validators/date.js +26 -6
  125. data/frameworks/sproutcore/validators/email.js +21 -3
  126. data/frameworks/sproutcore/validators/not_empty.js +11 -1
  127. data/frameworks/sproutcore/validators/number.js +18 -4
  128. data/frameworks/sproutcore/validators/password.js +12 -1
  129. data/frameworks/sproutcore/validators/validator.js +204 -194
  130. data/frameworks/sproutcore/views/{button.js → button/button.js} +96 -94
  131. data/frameworks/sproutcore/views/button/checkbox.js +29 -0
  132. data/frameworks/sproutcore/views/button/disclosure.js +42 -0
  133. data/frameworks/sproutcore/views/button/radio.js +29 -0
  134. data/frameworks/sproutcore/views/{collection.js → collection/collection.js} +1373 -1024
  135. data/frameworks/sproutcore/views/collection/grid.js +124 -46
  136. data/frameworks/sproutcore/views/collection/image_cell.js +17 -46
  137. data/frameworks/sproutcore/views/collection/list.js +45 -35
  138. data/frameworks/sproutcore/views/collection/source_list.js +386 -0
  139. data/frameworks/sproutcore/views/collection/table.js +118 -0
  140. data/frameworks/sproutcore/views/container.js +7 -2
  141. data/frameworks/sproutcore/views/error_explanation.js +23 -10
  142. data/frameworks/sproutcore/views/{checkbox_field.js → field/checkbox_field.js} +16 -6
  143. data/frameworks/sproutcore/views/field/field.js +219 -0
  144. data/frameworks/sproutcore/views/{radio_field.js → field/radio_field.js} +27 -12
  145. data/frameworks/sproutcore/views/{select_field.js → field/select_field.js} +116 -90
  146. data/frameworks/sproutcore/views/{text_field.js → field/text_field.js} +57 -8
  147. data/frameworks/sproutcore/views/{textarea_field.js → field/textarea_field.js} +13 -3
  148. data/frameworks/sproutcore/views/filter_button.js +2 -2
  149. data/frameworks/sproutcore/views/form.js +3 -3
  150. data/frameworks/sproutcore/views/image.js +128 -21
  151. data/frameworks/sproutcore/views/inline_text_editor.js +1 -1
  152. data/frameworks/sproutcore/views/label.js +149 -92
  153. data/frameworks/sproutcore/views/list_item.js +225 -0
  154. data/frameworks/sproutcore/views/menu_item.js +10 -4
  155. data/frameworks/sproutcore/views/pagination.js +11 -4
  156. data/frameworks/sproutcore/views/popup_button.js +25 -21
  157. data/frameworks/sproutcore/views/popup_menu.js +10 -4
  158. data/frameworks/sproutcore/views/progress.js +29 -16
  159. data/frameworks/sproutcore/views/radio_group.js +1 -1
  160. data/frameworks/sproutcore/views/scroll.js +60 -20
  161. data/frameworks/sproutcore/views/segmented.js +1 -1
  162. data/frameworks/sproutcore/views/slider.js +132 -0
  163. data/frameworks/sproutcore/views/source_list_group.js +130 -0
  164. data/frameworks/sproutcore/views/spinner.js +1 -1
  165. data/frameworks/sproutcore/views/split.js +292 -0
  166. data/frameworks/sproutcore/views/split_divider.js +109 -0
  167. data/frameworks/sproutcore/views/tab.js +1 -1
  168. data/frameworks/sproutcore/views/toolbar.js +1 -1
  169. data/frameworks/sproutcore/views/view.js +1272 -591
  170. data/generators/client/templates/english.lproj/body.css +1 -1
  171. data/generators/controller/controller_generator.rb +1 -1
  172. data/generators/controller/templates/test.rhtml +2 -1
  173. data/generators/model/templates/test.rhtml +1 -1
  174. data/generators/test/templates/test.rhtml +1 -1
  175. data/generators/view/templates/test.rhtml +1 -1
  176. data/jsdoc/templates/sproutcore/class.tmpl +241 -338
  177. data/jsdoc/templates/sproutcore/default.css +105 -155
  178. data/jsdoc/templates/sproutcore/index.tmpl +43 -8
  179. data/jsdoc/templates/sproutcore/publish.js +9 -4
  180. data/lib/sproutcore/build_tools/html_builder.rb +29 -13
  181. data/lib/sproutcore/build_tools/resource_builder.rb +1 -1
  182. data/lib/sproutcore/bundle.rb +86 -25
  183. data/lib/sproutcore/jsdoc.rb +2 -0
  184. data/lib/sproutcore/version.rb +1 -1
  185. data/lib/sproutcore/view_helpers.rb +36 -3
  186. data/tasks/deployment.rake +1 -1
  187. metadata +69 -36
  188. data/clients/sc_docs/english.lproj/icons/small/next.png +0 -0
  189. data/clients/sc_docs/english.lproj/icons/small/reset.png +0 -0
  190. data/clients/sc_docs/english.lproj/images/gradients.png +0 -0
  191. data/clients/sc_docs/english.lproj/images/toolbar.png +0 -0
  192. data/clients/sc_docs/english.lproj/warning.rhtml +0 -6
  193. data/clients/sc_test_runner/english.lproj/warning.rhtml +0 -6
  194. data/frameworks/sproutcore/english.lproj/buttons.png +0 -0
  195. data/frameworks/sproutcore/english.lproj/collections.css +0 -82
  196. data/frameworks/sproutcore/english.lproj/images/buttons-sprite.png +0 -0
  197. data/frameworks/sproutcore/views/collection/collection_item.js +0 -36
  198. data/frameworks/sproutcore/views/collection/text_cell.js +0 -128
  199. data/frameworks/sproutcore/views/field.js +0 -214
  200. data/frameworks/sproutcore/views/workspace.js +0 -170
  201. data/generators/client/templates/english.lproj/controls.css +0 -0
  202. data/generators/framework/templates/english.lproj/body.css +0 -0
  203. data/generators/framework/templates/english.lproj/body.rhtml +0 -3
  204. data/generators/framework/templates/english.lproj/controls.css +0 -0
  205. data/lib/sproutcore/view_helpers/button_views.rb +0 -302
  206. data/lib/sproutcore/view_helpers/core_views.rb +0 -292
  207. data/lib/sproutcore/view_helpers/form_views.rb +0 -258
  208. 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
- /* @group Root Form */
5
+ body.sc-doc {
6
+ background-color: white ;
7
+ padding: 20px;
8
+ }
4
9
 
5
- input.show-hint {
6
- color: #888;
10
+ .sc-doc {
11
+ font: 64.5% Helvetica, Arial, Verdana, sans-serif;
12
+ line-height: 1em ;
7
13
  }
8
14
 
9
- .radio.vertical,
10
- .radio.vertical .button.radio {
11
- display: block ;
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
- .radio.horizontal,
15
- .radio.horizontal .button.radio {
16
- display: inline ;
25
+ .sc-doc h1 {
26
+ font-size: 3em;
27
+ margin: 0 0 1em 0;
28
+ text-transform: capitalize;
17
29
  }
18
30
 
19
- .radio.vertical {
20
- text-align: left ;
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
- /* @end */
40
+ .sc-doc h3 {
41
+ font-size: 2em;
42
+ padding: 0;
43
+ margin: 3em 0 0 0;
44
+ }
24
45
 
25
- /* @group sc-theme */
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
- body.sc-theme {
28
- font: 12px "Helvetica Neue", Helvetica, Verdana, sans-serif;
29
- background-color: #f0f0f0 ;
30
- padding: 10px;
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-theme h1 {
34
- margin: 0 10%;
35
- padding: 0 ;
36
- margin-bottom: 10px;
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-theme label {
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
- /* @end */
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-theme ul.errors {
61
- color: red ;
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 jsdoc */
87
+ /* @group Summary Table */
79
88
 
80
- body.sc-theme {
81
- font-family: Helvetica, "Helvetica Neue", Verdana, sans-serif;
82
- font-size: 12px;
83
- background-color: white ;
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.nav {
87
- font-size: .8em;
88
- width: 100%;
89
- border-bottom: 1px solid #ccc;
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.nav .right {
93
- text-align: right;
104
+ .sc-doc table.summary .even td {
105
+ background-color: #eef;
94
106
  }
95
107
 
96
- .summary h2,
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
- .type {
109
- font-style: italic ;
110
- color: #666;
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 table {
152
- width: 100%;
153
- background-color: #fafafa ;
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 table td .description {
166
- font-size: .9em;
167
- font-weight: bold ;
129
+ .sc-doc .summary li code {
130
+ font-size: 1.1em;
168
131
  }
169
132
 
170
- .summary ul.inherited {
171
- list-style-type: none ;
172
- margin: 0;
173
- padding: 0;
133
+ .sc-doc .summary li .description {
134
+ display: none ;
174
135
  }
175
136
 
176
- .summary ul.inherited h3 {
177
- border-bottom: 1px dotted #ccc;
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
- .constructor-detail {
185
- display: none;
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
- margin: 8px 0;
203
- display: block ;
161
+ .sc-doc .detail p.signature .type {
162
+ font-style: italic;
204
163
  }
205
164
 
206
- .parameters .name {
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: .8em;
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
- return parts[parts.length - 2] ;
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
- records: [
16
- <for each="classname" in="keys(data).sort()">
17
- { "type": "Doc", "guid": "{+classname+}", title: "{+classname+}", url: "{+data[classname][0].docs+}", group: "{+groupName(data[classname][0].file.path)+}" },
18
- </for>
19
- { "type": "Doc", "guid": "_GLOBALS", title: "GLOBALS", url: "globals.html" }
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
- var hiliter = new JsHilite(IO.readFile(fileGroup.files[i].path), JsDoc.opt.e);
214
- IO.saveFile(context.d, file_srcname, hiliter.hilite());
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 this class
10
- # is created to actually process and build the HTML using Erubus. If you want to add
11
- # more methods to use in your HTML files, just include them in HtmlContext.
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, the include
30
- # required bundles. Example composite entries to include their members.
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 been expanded.
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 composite entries)
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, etc.
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 since the
82
- # new build system is nice about putting things into the right place for output.
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 will also
88
- # find all of the html entries for any required bundles and include them in the built
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