sproutcore 0.9.11 → 0.9.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. data/History.txt +98 -73
  2. data/Manifest.txt +2 -1
  3. data/README.txt +1 -1
  4. data/Rakefile +8 -8
  5. data/app_generators/sproutcore/USAGE +2 -3
  6. data/app_generators/sproutcore/sproutcore_generator.rb +12 -12
  7. data/app_generators/sproutcore/templates/README +26 -23
  8. data/app_generators/sproutcore/templates/{sc-config.rb → sc-config} +32 -17
  9. data/bin/sc-build +17 -17
  10. data/bin/sc-server +1 -1
  11. data/bin/sproutcore +3 -3
  12. data/clients/sc_test_runner/english.lproj/no_tests.rhtml +0 -1
  13. data/config/hoe.rb +9 -9
  14. data/config/requirements.rb +1 -1
  15. data/frameworks/sproutcore/HISTORY +14 -0
  16. data/frameworks/sproutcore/core.js +1 -1
  17. data/frameworks/sproutcore/english.lproj/theme.css +1 -0
  18. data/frameworks/sproutcore/foundation/binding.js +2 -2
  19. data/frameworks/sproutcore/foundation/timer.js +55 -22
  20. data/frameworks/sproutcore/lib/index.rhtml +2 -3
  21. data/frameworks/sproutcore/models/record.js +204 -63
  22. data/frameworks/sproutcore/tests/models/model.rhtml +360 -0
  23. data/frameworks/sproutcore/views/button/button.js +22 -1
  24. data/frameworks/sproutcore/views/collection/collection.js +6 -2
  25. data/frameworks/sproutcore/views/collection/list.js +1 -0
  26. data/frameworks/sproutcore/views/collection/source_list.js +1 -0
  27. data/frameworks/sproutcore/views/field/text_field.js +11 -2
  28. data/frameworks/sproutcore/views/inline_text_field.js +3 -2
  29. data/frameworks/sproutcore/views/menu_item.js +1 -0
  30. data/frameworks/sproutcore/views/pagination.js +1 -0
  31. data/frameworks/sproutcore/views/view.js +4 -1
  32. data/lib/sproutcore/build_tools/html_builder.rb +36 -36
  33. data/lib/sproutcore/build_tools/resource_builder.rb +55 -54
  34. data/lib/sproutcore/build_tools.rb +12 -12
  35. data/lib/sproutcore/bundle.rb +162 -164
  36. data/lib/sproutcore/bundle_manifest.rb +154 -107
  37. data/lib/sproutcore/generator_helper.rb +23 -23
  38. data/lib/sproutcore/helpers/capture_helper.rb +10 -10
  39. data/lib/sproutcore/helpers/static_helper.rb +39 -26
  40. data/lib/sproutcore/helpers/tag_helper.rb +10 -10
  41. data/lib/sproutcore/helpers/text_helper.rb +36 -36
  42. data/lib/sproutcore/helpers.rb +1 -1
  43. data/lib/sproutcore/jsdoc.rb +10 -10
  44. data/lib/sproutcore/jsmin.rb +14 -14
  45. data/lib/sproutcore/library.rb +135 -87
  46. data/lib/sproutcore/merb/bundle_controller.rb +77 -54
  47. data/lib/sproutcore/merb/router.rb +19 -12
  48. data/lib/sproutcore/merb.rb +1 -1
  49. data/lib/sproutcore/version.rb +1 -1
  50. data/lib/sproutcore/view_helpers.rb +121 -121
  51. data/lib/sproutcore.rb +5 -7
  52. data/sc-config.rb +6 -0
  53. data/sc_generators/client/README +1 -1
  54. data/sc_generators/client/USAGE +1 -2
  55. data/sc_generators/client/client_generator.rb +6 -6
  56. data/sc_generators/client/templates/core.js +2 -2
  57. data/sc_generators/client/templates/english.lproj/body.css +79 -81
  58. data/sc_generators/client/templates/english.lproj/strings.js +1 -2
  59. data/sc_generators/client/templates/main.js +6 -8
  60. data/sc_generators/controller/USAGE +1 -2
  61. data/sc_generators/controller/controller_generator.rb +7 -7
  62. data/sc_generators/controller/templates/controller.js +3 -3
  63. data/sc_generators/controller/templates/test.rhtml +1 -1
  64. data/sc_generators/framework/README +1 -2
  65. data/sc_generators/framework/USAGE +2 -3
  66. data/sc_generators/framework/framework_generator.rb +5 -5
  67. data/sc_generators/framework/templates/core.js +3 -3
  68. data/sc_generators/framework/templates/english.lproj/strings.js +1 -2
  69. data/sc_generators/language/USAGE +1 -2
  70. data/sc_generators/language/language_generator.rb +6 -6
  71. data/sc_generators/language/templates/strings.js +1 -2
  72. data/sc_generators/model/USAGE +1 -2
  73. data/sc_generators/model/model_generator.rb +7 -7
  74. data/sc_generators/model/templates/fixture.js +26 -26
  75. data/sc_generators/model/templates/model.js +5 -5
  76. data/sc_generators/model/templates/test.rhtml +2 -2
  77. data/sc_generators/test/USAGE +1 -2
  78. data/sc_generators/test/templates/test.rhtml +2 -2
  79. data/sc_generators/test/test_generator.rb +6 -6
  80. data/sc_generators/view/USAGE +1 -2
  81. data/sc_generators/view/templates/test.rhtml +2 -2
  82. data/sc_generators/view/templates/view.js +3 -3
  83. data/sc_generators/view/view_generator.rb +7 -7
  84. data/spec/spec.opts +1 -1
  85. data/spec/spec_helper.rb +1 -1
  86. data/spec/sproutcore_spec.rb +3 -3
  87. data/tasks/deployment.rake +4 -4
  88. metadata +4 -3
data/History.txt CHANGED
@@ -1,18 +1,43 @@
1
+
2
+ * Added :include_method = :link|:import option to the stylesheets_for_client helper. This allows you to select between inclusion using link tags vs @import (which is required for OpenSocial apps) - Thanks Johannes Fahrenkrug!
3
+
4
+ * Proxy now handles posts and rewrites Location headers so they stay in the same domain. Should make this feature far more robust.
5
+
6
+ * Proxy now handles query parameters.
7
+
8
+ * Build tools now replace all occurrences of "sc_super()" with a call to arguments.callee.base.apply(). This way you don't have to remember the crazy-ass string to call super. (Thanks onitunes)
9
+
10
+ * you can now start sc-server down inside of a project and it will find the proper level to work at.
11
+
12
+ * Finally fixed all remaining known issues with using tools in Windows. Works for me in my install.
13
+
14
+ * sc-config.rb is now named sc-config. The old name will still work.
15
+
16
+ * sc-config now supports three extra options in the all config:
17
+
18
+ :minify_javascript :: name one or more modes that you want the JavaScript to be minified in. Normally JS is minified in production mode, but you can use this to turn that behavior off if necessary for debugging.
19
+
20
+ :combine_javascript :: name one or more modes that you want JavaScripts to be combined in. Normally JS is combined in production mode, but you can turn this on or off for mode as needed for debugging.
21
+
22
+ :combine_stylesheets :: name one or more modes that you want stylesheets to be combined in. Normally CSS is combined in both production and development modes, but you can turn this on or off as needed.
23
+
24
+ * [FIX] Build tools were not appending a timestamp to resource URLs like they should in order to gaurantee clean caching.
25
+
1
26
  == SproutCore 0.9.11
2
27
 
3
- * Build tools are now much smarter about how the they process environment
4
- configs. Before if you imported a framework (such as sproutcore) locally
5
- into your project you would need to import any dependent frameworks as well
6
- AND create configs for all of them. Now you do not need to do that. The
7
- build tools will load the most recent base environment (defined in config
8
- :all), along with the most recent bundle-specific config (defined in config
9
- :bundle_name) and the bundle-location details from whatever library holds
28
+ * Build tools are now much smarter about how the they process environment
29
+ configs. Before if you imported a framework (such as sproutcore) locally
30
+ into your project you would need to import any dependent frameworks as well
31
+ AND create configs for all of them. Now you do not need to do that. The
32
+ build tools will load the most recent base environment (defined in config
33
+ :all), along with the most recent bundle-specific config (defined in config
34
+ :bundle_name) and the bundle-location details from whatever library holds
10
35
  the bundle. This will avoid a whole class of head-scratching config probs
11
36
  that people encountered when trying to setup their system.
12
37
 
13
38
  * Removed unused controllers array from core.js template in client generator
14
39
 
15
- * sc-server now supports the new proxy option in sc-config. You can use this
40
+ * sc-server now supports the new proxy option in sc-config. You can use this
16
41
  to proxy your backend services through to your front-end SproutCore clients
17
42
  without having to setup a separate service.
18
43
 
@@ -60,10 +85,10 @@ even though it should include only the core width.
60
85
 
61
86
  * Collection View now supports selectOnMouseDown which can be turned off to provide better drag and drop behavior on SourceList. SC.SourceListView now turns this off by default.
62
87
 
63
- * Requesting a resource that should be available in production mode while
64
- running your server in dev mode will now work. Bundles now build one manifest per language/build_mode combination.
88
+ * Requesting a resource that should be available in production mode while
89
+ running your server in dev mode will now work. Bundles now build one manifest per language/build_mode combination.
65
90
 
66
- * Build tools now automatically set String.preferredLanguage to the current
91
+ * Build tools now automatically set String.preferredLanguage to the current
67
92
  build language. This will ensure we start using the current strings when you
68
93
  load the loc'd interface.
69
94
 
@@ -82,12 +107,12 @@ experiencing trouble installing the gem.
82
107
 
83
108
  * SC.CollectionView now supports the delete key to remove items. Also added delegate methods to the collection view delegate to give you control over how deletions happen.
84
109
 
85
- * SC.window can now properly capture the backspace key in Firefox. To
110
+ * SC.window can now properly capture the backspace key in Firefox. To
86
111
  activate this feature you must declare SC.CAPTURE_BACKSPACE_KEY = YES in your
87
- core.js file. Capturing the backspace key will prevent the browser from going to previous page when the user hits backspace, which can lead to data loss. To capture this key, SC.window will directly set the document.onkeypress handler.
112
+ core.js file. Capturing the backspace key will prevent the browser from going to previous page when the user hits backspace, which can lead to data loss. To capture this key, SC.window will directly set the document.onkeypress handler.
88
113
 
89
114
  * SC.GridView now supports dropping ON items.
90
-
115
+
91
116
  * SC.ListView now supports dropping ON items.
92
117
 
93
118
  * Removed the try/catch() that was placed around property notifiers. This is not only faster but it will make it easier to debug these exceptions in Firebug and IE.
@@ -102,17 +127,17 @@ is used by a parent class. Changed to _optframe
102
127
  * Improves Photos sample to include support for adding/deleting albums and drag and drop into albums.
103
128
 
104
129
  * Collection View now supports dropping items ON item views as well as between
105
- them.
130
+ them.
106
131
 
107
- * Collection Views now support a delegate object that can be used to control
108
- drag and drop and selection behavior. See mixins/collection_view_delegate.js
132
+ * Collection Views now support a delegate object that can be used to control
133
+ drag and drop and selection behavior. See mixins/collection_view_delegate.js
109
134
  for a complete description of the new methods.
110
135
 
111
136
  * SC.ArrayController now supports the useControllersForContent property. If
112
137
  set to YES, then getting an objectAt() will return a controller for the value
113
138
  instead of the value itself. This is useful for those times you are using an
114
- array controller to manage a set of objects you want to control. Previously
115
- this feature was always used by array controllers and could not be disabled.
139
+ array controller to manage a set of objects you want to control. Previously
140
+ this feature was always used by array controllers and could not be disabled.
116
141
  This is now off by default.
117
142
 
118
143
  * [FIX] SC.ArrayController and SC.ObjectController now will properly observe
@@ -120,16 +145,16 @@ their own content, even when the content is set on init.
120
145
 
121
146
  == SproutCore 0.9.4
122
147
 
123
- * [FIX] Build system now generates index.html files for client bundles, even
148
+ * [FIX] Build system now generates index.html files for client bundles, even
124
149
  if they do not include .rhtml resources.
125
150
 
126
151
  * [FIX] Typos in the readme docs for the client generator.
127
152
 
128
- * Added automaticOutletFor() that will cause a view to be configured
153
+ * Added automaticOutletFor() that will cause a view to be configured
129
154
  automatically instead of forcing you to use an outlets array. Useful for when
130
155
  you are manually constructing your views.
131
156
 
132
- * Initial changes required to eventually implement improved observer
157
+ * Initial changes required to eventually implement improved observer
133
158
  notification system.
134
159
 
135
160
  * Improved documentation for a variety of classes
@@ -149,14 +174,14 @@ an lproj directory since this is where templates are stored.
149
174
  with the SC.Editable protocol. Use beginEditing() and commitEditing() or
150
175
  discardEditing() instead.
151
176
 
152
- * Added SC.Editable mixin. This provides a standard protocol for begining
153
- and ending keyboard editing sessions on views. SC.Editable is now used
177
+ * Added SC.Editable mixin. This provides a standard protocol for begining
178
+ and ending keyboard editing sessions on views. SC.Editable is now used
154
179
  by SC.LabelView, SC.ListItemView, SC.TextFieldView, and SC.TextareaFieldView.
155
180
 
156
181
  * Collection view now supports the default behavior to begin editing when you
157
182
  click on a selected item for a second time. If you hit return it will also
158
- begin editing. To support this, you must set contentValueIsEditable to YES
159
- and implement beginEditing() on your item view.
183
+ begin editing. To support this, you must set contentValueIsEditable to YES
184
+ and implement beginEditing() on your item view.
160
185
 
161
186
  * Inline editor is now supported in both SC.ListItemView and SC.LabelView.
162
187
 
@@ -178,9 +203,9 @@ will need to implement the InlineEditorDelegate (see documentation).
178
203
 
179
204
  * Converted all uses of setTimeout() in the framework to use run loop instead.
180
205
 
181
- * Added invokeLater() methods to both SC.Object and Function. These
182
- convenience methods will create a timer to execute a method or function at a
183
- later time. If you need to execute code later, instead of setTimeout,
206
+ * Added invokeLater() methods to both SC.Object and Function. These
207
+ convenience methods will create a timer to execute a method or function at a
208
+ later time. If you need to execute code later, instead of setTimeout,
184
209
  consider using myObject.invokeLater(0, 'methodName') ;
185
210
 
186
211
  * New SC.Timer class provides more efficient triggers for timeouts, etc. The
@@ -192,17 +217,17 @@ offsetLeft and offsetTop when a parent element has a border.
192
217
 
193
218
  * Fixed all SC unit tests that were failing (now that I can run them again).
194
219
 
195
- * Test Runner now has a "Rerun Current Test" button that will rerun the
220
+ * Test Runner now has a "Rerun Current Test" button that will rerun the
196
221
  current test.
197
222
 
198
- * Added convenience method $I() (or SC.inspect()) - converts an object to a
223
+ * Added convenience method $I() (or SC.inspect()) - converts an object to a
199
224
  hash and then displays its key/value pairs. Useful for debugging.
200
225
 
201
226
  * Fixed up test templates in generators so that they check for the presence
202
227
  of main() before trying to fix it up. This was causing errors on new tests when added to frameworks.
203
228
 
204
- * [FIX] invokeWhile() was implemented on real Array objects but not on
205
- SC.Array mixin. This caused the controllers/controller test to fail. Now
229
+ * [FIX] invokeWhile() was implemented on real Array objects but not on
230
+ SC.Array mixin. This caused the controllers/controller test to fail. Now
206
231
  fixed.
207
232
 
208
233
  * Updated test runner to use new SproutCore.
@@ -211,7 +236,7 @@ fixed.
211
236
 
212
237
  * Moved the base class for collections, buttons, and fields into their respective folders. This will appear them to appear under the correct location in the Doc viewer.
213
238
 
214
- * [FIX] Grouped views in the source list without a visible header will
239
+ * [FIX] Grouped views in the source list without a visible header will
215
240
  overlapping the following group, absorbing their clicks. Now they render
216
241
  the proper size.
217
242
 
@@ -226,14 +251,14 @@ enhance SC.SliderView to support it!
226
251
  * Converted docs for drag modules to JSDoc format.
227
252
 
228
253
  * SourceListGroupViews now automatically collapse their group title if the
229
- group value is null. Items will still be shown; they will just appear to be
254
+ group value is null. Items will still be shown; they will just appear to be
230
255
  "top level"
231
256
 
232
257
  * JSDocs template was cutting the first sentance from a class description. This is now fixed.
233
-
258
+
234
259
  * Added sc-build -d option to generate docs along with the build of your code.
235
260
 
236
- * Updated sc_docs to work with updated SproutCore. Also adopts new look and feel and includes support for live search on all symbols defined in the
261
+ * Updated sc_docs to work with updated SproutCore. Also adopts new look and feel and includes support for live search on all symbols defined in the
237
262
  library (try it; it's cool - visit: http://localhost:4020/sproutcore/-docs)
238
263
 
239
264
  * JSDoc template no longer generated highlighted JS source along with ref
@@ -246,21 +271,21 @@ before. Now you can using -.
246
271
 
247
272
  * Updated design of jsdoc documentation to make it easier to read.
248
273
 
249
- * Renamed buttons-sprite.png to sc-theme-sprite.png. Added
250
- sc-theme-ysprite.png. One is now used to hold all repeat-x and non-repeating
274
+ * Renamed buttons-sprite.png to sc-theme-sprite.png. Added
275
+ sc-theme-ysprite.png. One is now used to hold all repeat-x and non-repeating
251
276
  sprites while the other is used for repeat-y sprites only.
252
277
 
253
- * SC.SplitView & SC.SplitDividerView provide support for draggable and
278
+ * SC.SplitView & SC.SplitDividerView provide support for draggable and
254
279
  collapsable split views.
255
280
 
256
281
  * SC.ListView now uses SC.ListItemView as its default example view instead of
257
282
  SC.LabelView (or the old SC.TextCellView)
258
283
 
259
- * Optimized performance of new build system when reloading ruby helpers on
284
+ * Optimized performance of new build system when reloading ruby helpers on
260
285
  every page load
261
286
 
262
287
  * The Source List now provides support for the disclosure triangle. A disclosure is automatically shown if you have grouping enabled and you set the
263
- groupVisibleKey property to anything other an null. The disclosure does not
288
+ groupVisibleKey property to anything other an null. The disclosure does not
264
289
  yet auto-reveal during a drag.
265
290
 
266
291
  * SC.DisclosureView - Shows a disclosure triangle button.
@@ -274,7 +299,7 @@ for use in Sproutit applications and it is really too specific for such a generi
274
299
  classes. Set value for the value, content/contentValueKey to display part
275
300
  of some content.
276
301
 
277
- * You can add view helpers to your own projects just by dropping them into
302
+ * You can add view helpers to your own projects just by dropping them into
278
303
  a lib directory inside your framework or client. If you need to load your
279
304
  view helpers in a certain order, use the view_helper() method. See the view helpers in SproutCore for an example usage.
280
305
 
@@ -283,12 +308,12 @@ means you no longer need to restart the sc-server when you make a change to
283
308
  the view helper code.
284
309
 
285
310
  * SproutCore view helpers are now stored in the framework itself along with
286
- the JavaScript. This will make it easier to include the latest version of
311
+ the JavaScript. This will make it easier to include the latest version of
287
312
  the SproutCore framework in you app without having to install a new set of
288
- build tools. This should basically eliminate the only frequently changing
313
+ build tools. This should basically eliminate the only frequently changing
289
314
  part of the build tools.
290
315
 
291
- * SC.SourceList and SC.ListItemView properties now use "content..Key"
316
+ * SC.SourceList and SC.ListItemView properties now use "content..Key"
292
317
  convention for naming properties. If you have built code with the old
293
318
  "content..Property" conventions, you will need to update your code.
294
319
 
@@ -303,7 +328,7 @@ native counterparts including mixed style and full styling support.
303
328
  * Added SC.Validatable mixin that can be applied to any view to make it work
304
329
  with validators. SC.FieldView now incorporates this mixin.
305
330
 
306
- * Now if you add initMixin() to a mixin, it will be called automatically
331
+ * Now if you add initMixin() to a mixin, it will be called automatically
307
332
  whenever an object that includes the mixin is instantiated. You can use this
308
333
  to perform any setup necessary for the mixin.
309
334
 
@@ -311,12 +336,12 @@ to perform any setup necessary for the mixin.
311
336
  be consistent with the rest of the API.
312
337
 
313
338
  * Added updateContentWithValueObserver to SC.Control that will relay changes
314
- to the value property back to the content object if you use the default
339
+ to the value property back to the content object if you use the default
315
340
  implementation.
316
341
 
317
- * Changed SC.Control observers for various states that were once private to
342
+ * Changed SC.Control observers for various states that were once private to
318
343
  public methods. This way you can override them in your subclasses if you need
319
- to perform some extra processing and you want to make sure you do them in the
344
+ to perform some extra processing and you want to make sure you do them in the
320
345
  right order. You can also just add more observers as well.
321
346
 
322
347
  * Added JSDoc info for Validators, SC.FieldView, SC.CheckboxFieldView
@@ -329,14 +354,14 @@ methods on SC.View that are 7x faster than prototype's version.
329
354
 
330
355
  * Integrated SC.Control into SC.ButtonView
331
356
 
332
- * Changed SC.ButtonView.labelText and SC.ButtonView.labelSelector to
357
+ * Changed SC.ButtonView.labelText and SC.ButtonView.labelSelector to
333
358
  SC.ButtonView.title and SC.ButtonView.titleSelector to be more consistant with current naming conventions.
334
359
 
335
360
  * [FIX] Some doc tags were wrong in SC.ScrollView and others.
336
361
 
337
362
  * Improved documentations on SC.ImageView.
338
363
 
339
- * SC.ImageView now includes the SC.Control mixin and can accept either a
364
+ * SC.ImageView now includes the SC.Control mixin and can accept either a
340
365
  CSS class name or a URL as its value. This makes it easy to switch an image
341
366
  from using a sprite to use a custom-generated image and back again.
342
367
 
@@ -347,7 +372,7 @@ own application, courtesy of IconDrawer (http://www.icondrawer.com).
347
372
  changes to multiple properties on content. This should capture a very common pattern requires by collection item views. Most control-list SC.Views will
348
373
  eventually adopt this mixin.
349
374
 
350
- * Added ListItemView which will be used for rendering content in list views
375
+ * Added ListItemView which will be used for rendering content in list views
351
376
  and source list views. ListViewItem can render a name, icon, and optional
352
377
  unread count.
353
378
 
@@ -362,45 +387,45 @@ unread count.
362
387
  * [FIX] Optimization in fmt() would through an exception if you passed it a
363
388
  value that did not support toString().
364
389
 
365
- * Moved selection management methods from CollectionController in independent
366
- SC.SelectionSupport mixin. This mixin is now used by both
367
- SC.CollectionController and SC.ArrayController so you can use either one to
368
- manage a selection state. You can also apply this mixin to your own
369
- controllers to manage selection state if you like (though this is not required
390
+ * Moved selection management methods from CollectionController in independent
391
+ SC.SelectionSupport mixin. This mixin is now used by both
392
+ SC.CollectionController and SC.ArrayController so you can use either one to
393
+ manage a selection state. You can also apply this mixin to your own
394
+ controllers to manage selection state if you like (though this is not required
370
395
  to manage selections.)
371
396
 
372
- * Began to separate CSS rules into a core.css and a theme.css. The core.css
373
- styles are generally required by SproutCore and should apply even if you build
374
- your own theme. The theme.css rules apply to the SproutCore theme only and
397
+ * Began to separate CSS rules into a core.css and a theme.css. The core.css
398
+ styles are generally required by SproutCore and should apply even if you build
399
+ your own theme. The theme.css rules apply to the SproutCore theme only and
375
400
  can be overriden by your own CSS.
376
401
 
377
- * Added SC.SourceListView and sc-theme styles for source lists. Source lists
378
- support grouping if you enable this feature. See the new Collections2 tab in
402
+ * Added SC.SourceListView and sc-theme styles for source lists. Source lists
403
+ support grouping if you enable this feature. See the new Collections2 tab in
379
404
  the SampleControls app for an example source list.
380
405
 
381
- * Added SC.TableView. This feature is in progress. See the new
406
+ * Added SC.TableView. This feature is in progress. See the new
382
407
  Collections2 tab in the SampleControls app for an example table view.
383
408
 
384
- * Changed asHTML and asText properties to innerHTML and innerText to match
409
+ * Changed asHTML and asText properties to innerHTML and innerText to match
385
410
  their DOM equivalents.
386
411
 
387
- * Renamed SC.CollectionItem mixin to SC.Control mixin. SC.Control mixin now
388
- provides some standard functionality for all interactive controls such as
412
+ * Renamed SC.CollectionItem mixin to SC.Control mixin. SC.Control mixin now
413
+ provides some standard functionality for all interactive controls such as
389
414
  handling selection states, enabled and focus states.
390
415
 
391
- * Removed support for :resize_options property in view helper, since
392
- auto-resizing is no longer supported in SC.View (it never worked right anyway
416
+ * Removed support for :resize_options property in view helper, since
417
+ auto-resizing is no longer supported in SC.View (it never worked right anyway
393
418
  and was not functionally very usable.)
394
419
 
395
- * innerText property now uses TextNodes, making it about 50% faster than
420
+ * innerText property now uses TextNodes, making it about 50% faster than
396
421
  innerHTML on FireFox.
397
422
 
398
- * Added view helpers for list_view, scroll_view, grid_view, source_list_view,
423
+ * Added view helpers for list_view, scroll_view, grid_view, source_list_view,
399
424
  and table_view. Also refactored collection view helpers into their own file.
400
425
 
401
- * [FIX] CollectionView is now able to render items in groups.
426
+ * [FIX] CollectionView is now able to render items in groups.
402
427
 
403
- * [FIX] SC.ObjectController: Avoid unwanted commit when oldValue == null && newValue == ''.
428
+ * [FIX] SC.ObjectController: Avoid unwanted commit when oldValue == null && newValue == ''.
404
429
 
405
430
 
406
431
  == 0.9.0 2008-03-08
data/Manifest.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  app_generators/sproutcore/sproutcore_generator.rb
2
2
  app_generators/sproutcore/templates/README
3
- app_generators/sproutcore/templates/sc-config.rb
3
+ app_generators/sproutcore/templates/sc-config
4
4
  app_generators/sproutcore/USAGE
5
5
  bin/sc-build
6
6
  bin/sc-gen
@@ -156,6 +156,7 @@ frameworks/sproutcore/tests/foundation/timer/invokeLater.rhtml
156
156
  frameworks/sproutcore/tests/foundation/timer/isPaused.rhtml
157
157
  frameworks/sproutcore/tests/foundation/timer/schedule.rhtml
158
158
  frameworks/sproutcore/tests/globals/window.rhtml
159
+ frameworks/sproutcore/tests/models/model.rhtml
159
160
  frameworks/sproutcore/tests/panes/pane.rhtml
160
161
  frameworks/sproutcore/tests/views/checkbox.rhtml
161
162
  frameworks/sproutcore/tests/views/collection/base.rhtml
data/README.txt CHANGED
@@ -17,7 +17,7 @@ SproutCore comes loaded with a lot of features you would normally find in a full
17
17
  5. Efficient controls for rendering lists of items.
18
18
 
19
19
  6. Efficient page loading optimized for handling large numbers of JavaScript controls.
20
-
20
+
21
21
  ==== Quick Start
22
22
 
23
23
  1. To install the SproutCore build tools, just install the ruby gem:
data/Rakefile CHANGED
@@ -1,9 +1,9 @@
1
- require 'config/requirements'
2
- require 'config/hoe' # setup Hoe + all gem configuration
3
-
4
- APP_ROOT = File.expand_path(File.dirname(__FILE__))
5
-
6
- # Set directories you want ignored in the manifest.
7
- IGNORE_DIRS = ['assets', 'pkg', 'samples', 'doc']
8
-
1
+ require 'config/requirements'
2
+ require 'config/hoe' # setup Hoe + all gem configuration
3
+
4
+ APP_ROOT = File.expand_path(File.dirname(__FILE__))
5
+
6
+ # Set directories you want ignored in the manifest.
7
+ IGNORE_DIRS = ['assets', 'pkg', 'samples', 'doc']
8
+
9
9
  Dir['tasks/**/*.rake'].each { |rake| load rake }
@@ -1,5 +1,4 @@
1
1
  Description:
2
-
3
-
2
+
3
+
4
4
  Usage:
5
-
@@ -1,14 +1,14 @@
1
1
  require 'sproutcore/generator_helper'
2
2
 
3
3
  class SproutcoreGenerator < RubiGen::Base
4
-
4
+
5
5
  DEFAULT_SHEBANG = File.join(Config::CONFIG['bindir'],
6
6
  Config::CONFIG['ruby_install_name'])
7
-
7
+
8
8
  default_options :author => nil
9
-
9
+
10
10
  attr_reader :name
11
-
11
+
12
12
  def initialize(runtime_args, runtime_options = {})
13
13
  super
14
14
  usage if args.empty?
@@ -22,16 +22,16 @@ class SproutcoreGenerator < RubiGen::Base
22
22
  # Ensure appropriate folder(s) exists
23
23
  m.directory ''
24
24
  BASEDIRS.each { |path| m.directory path }
25
-
25
+
26
26
  # Create stubs
27
- m.template_copy_each %w(README sc-config.rb)
28
- # m.dependency "install_rubigen_scripts", [destination_root, 'sproutcore'],
27
+ m.template_copy_each %w(README sc-config)
28
+ # m.dependency "install_rubigen_scripts", [destination_root, 'sproutcore'],
29
29
  # :shebang => options[:shebang], :collision => :force
30
-
30
+
31
31
  # Create initial client
32
- m.dependency "client", [@name, "--library=#{@destination_root}"],
32
+ m.dependency "client", [@name, "--library=#{@destination_root}"],
33
33
  :shebang => options[:shebang], :collision => :force
34
-
34
+
35
35
  end
36
36
  end
37
37
 
@@ -54,7 +54,7 @@ EOS
54
54
  # "Default: none") { |options[:author]| }
55
55
  opts.on("-v", "--version", "Show the #{File.basename($0)} version number and quit.")
56
56
  end
57
-
57
+
58
58
  def extract_options
59
59
  # for each option, extract it into a local variable (and create an "attr_reader :author" at the top)
60
60
  # Templates can access these value via the attr_reader-generated methods, but not the
@@ -65,4 +65,4 @@ EOS
65
65
  # Installation skeleton. Intermediate directories are automatically
66
66
  # created so don't sweat their absence here.
67
67
  BASEDIRS = %w(clients frameworks lib public log)
68
- end
68
+ end
@@ -1,51 +1,51 @@
1
1
  == Welcome to SproutCore Builder
2
2
 
3
3
  This is an application package for building a SproutCore application. To get
4
- started, edit your JavaScript application in the clients directory (we've
4
+ started, edit your JavaScript application in the clients directory (we've
5
5
  already created one for you.)
6
6
 
7
7
  Then, start the SproutCore Dev Server by running from this directory:
8
8
 
9
- sc-server
9
+ sc-server
10
10
 
11
11
  This takes all the same arguments as mongrel. You can now visit your app
12
12
  by going to:
13
13
 
14
- http://localhost:3000/<%= base_name %>
14
+ http://localhost:4020/<%= base_name %>
15
15
 
16
16
  == What Goes Where
17
17
 
18
18
  Here is a brief description of the various parts of the SproutCore app:
19
19
 
20
- * *clients:* Each folder in the clients directory contains a single-page
21
- application you can load in your web browser. By default the URL to reach
22
- each application is the /directory-name. You will do most of your editing
20
+ * *clients:* Each folder in the clients directory contains a single-page
21
+ application you can load in your web browser. By default the URL to reach
22
+ each application is the /directory-name. You will do most of your editing
23
23
  here.
24
-
24
+
25
25
  * *frameworks:* Each folder in the frameworks directory is a SproutCore
26
26
  library that your client applications can use. No HTML will be generated
27
27
  for these frameworks, but any JavaScript, CSS or other images you place
28
28
  in here will be accessible through your web browser.
29
-
30
- * *public:* This directory contains any other static resources your other
31
- apps needs to be able to use. If you have static HTML or other basic
29
+
30
+ * *public:* This directory contains any other static resources your other
31
+ apps needs to be able to use. If you have static HTML or other basic
32
32
  files you want to have access to. If you start your server in production
33
33
  mode, cached output will also be saved into this directory.
34
-
35
- * *lib:* Any ruby files you place in this directory will be automatically
34
+
35
+ * *lib:* Any ruby files you place in this directory will be automatically
36
36
  loaded when the sproutcore server start or when you do a static build.
37
37
  If you write any custom view helpers, you can place them here.
38
-
38
+
39
39
  * *setup.yaml:* This is a config file that you can use to set various load
40
40
  options for the clients and frameworks in your app. The default options are
41
41
  specified in the default: group. You can override the default for specific
42
42
  frameworks or clients by naming them.
43
-
43
+
44
44
  == Using Frameworks
45
45
 
46
46
  Frameworks are automatically automatically available in your app. You can
47
47
  also name frameworks available anywhere in your load path (including those
48
- installed in gems).
48
+ installed in gems).
49
49
 
50
50
  The SproutCore gem comes with the latest versions of prototype, sproutcore,
51
51
  and sproutapp frameworks installed. All you need to do is indicate that
@@ -53,25 +53,28 @@ you require them.
53
53
 
54
54
  == Deploying your SproutCore App
55
55
 
56
- Normally you will use the sc-server to host your application while you are
56
+ Normally you will use the sc-server to host your application while you are
57
57
  developing your code. Once you are ready to deploy, however, there are two
58
58
  ways you can do it:
59
59
 
60
- ==== 1. Use sc-server in production.
60
+ ==== 1. Use sc-server in production.
61
61
 
62
- The SproutCore server can be run in a production mode that will simply generate and cache web-optimized versions of all of your resources upon request. For a low-traffic or newer site, this approach is an easy way to get your code into production. You just replace your directory with your latest files and the sc-server will start serving the new resources.
62
+ The SproutCore server can be run in a production mode that will simply
63
+ generate and cache web-optimized versions of all of your resources upon
64
+ request. For a low-traffic or newer site, this approach is an easy way to
65
+ get your code into production. You just replace your directory with your
66
+ latest files and the sc-server will start serving the new resources.
63
67
 
64
68
  ==== 2. Do a static build
65
69
 
66
- In general, however, loading all of your resources through a Ruby-app is not the best, especially when you could use a high-speed server such as lighttpd that is optimized for serving static content.
70
+ In general, however, loading all of your resources through a Ruby-app is not
71
+ the best, especially when you could use a high-speed server such as lighttpd
72
+ that is optimized for serving static content.
67
73
 
68
74
  If you want real speed, do a static build of your content and serve it through
69
75
  lighttpd or apache. Do the static build, just run:
70
76
 
71
77
  sc-build all
72
78
 
73
- This will place a directory in tmp/build that contains all of your resources
79
+ This will place a directory in tmp/build that contains all of your resources
74
80
  pre-compiled and ready for static serving.
75
-
76
-
77
-