sproutcore 1.5.0.rc.1 → 1.5.0.rc.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (193) hide show
  1. data/CHANGELOG +4 -0
  2. data/VERSION.yml +1 -1
  3. data/lib/frameworks/sproutcore/Buildfile +9 -4
  4. data/lib/frameworks/sproutcore/README.md +1 -0
  5. data/lib/frameworks/sproutcore/design/{TestRunner_Design.gaffle → TestRunner_Design.graffle}/QuickLook/Preview.pdf +0 -0
  6. data/lib/frameworks/sproutcore/design/{TestRunner_Design.gaffle → TestRunner_Design.graffle}/QuickLook/Thumbnail.tiff +0 -0
  7. data/lib/frameworks/sproutcore/design/{TestRunner_Design.gaffle → TestRunner_Design.graffle}/data.plist +0 -0
  8. data/lib/frameworks/sproutcore/design/{TestRunner_Design.gaffle → TestRunner_Design.graffle}/image10.png +0 -0
  9. data/lib/frameworks/sproutcore/design/{TestRunner_Design.gaffle → TestRunner_Design.graffle}/image11.png +0 -0
  10. data/lib/frameworks/sproutcore/design/{TestRunner_Design.gaffle → TestRunner_Design.graffle}/image13.png +0 -0
  11. data/lib/frameworks/sproutcore/design/{TestRunner_Design.gaffle → TestRunner_Design.graffle}/image15.png +0 -0
  12. data/lib/frameworks/sproutcore/design/{TestRunner_Design.gaffle → TestRunner_Design.graffle}/image16.png +0 -0
  13. data/lib/frameworks/sproutcore/design/{TestRunner_Design.gaffle → TestRunner_Design.graffle}/image17.png +0 -0
  14. data/lib/frameworks/sproutcore/design/{TestRunner_Design.gaffle → TestRunner_Design.graffle}/image18.png +0 -0
  15. data/lib/frameworks/sproutcore/design/{TestRunner_Design.gaffle → TestRunner_Design.graffle}/image19.png +0 -0
  16. data/lib/frameworks/sproutcore/design/{TestRunner_Design.gaffle → TestRunner_Design.graffle}/image22.tiff +0 -0
  17. data/lib/frameworks/sproutcore/design/{TestRunner_Design.gaffle → TestRunner_Design.graffle}/image23.png +0 -0
  18. data/lib/frameworks/sproutcore/design/{TestRunner_Design.gaffle → TestRunner_Design.graffle}/image24.png +0 -0
  19. data/lib/frameworks/sproutcore/design/{TestRunner_Design.gaffle → TestRunner_Design.graffle}/image25.png +0 -0
  20. data/lib/frameworks/sproutcore/design/{TestRunner_Design.gaffle → TestRunner_Design.graffle}/image30.png +0 -0
  21. data/lib/frameworks/sproutcore/design/{TestRunner_Design.gaffle → TestRunner_Design.graffle}/image31.png +0 -0
  22. data/lib/frameworks/sproutcore/design/{TestRunner_Design.gaffle → TestRunner_Design.graffle}/image8.png +0 -0
  23. data/lib/frameworks/sproutcore/design/{TestRunner_Design.gaffle → TestRunner_Design.graffle}/image9.png +0 -0
  24. data/lib/frameworks/sproutcore/frameworks/animation/core.js +23 -25
  25. data/lib/frameworks/sproutcore/frameworks/bootstrap/system/browser.js +160 -0
  26. data/lib/frameworks/sproutcore/frameworks/core_foundation/controllers/array.js +73 -82
  27. data/lib/frameworks/sproutcore/frameworks/core_foundation/core.js +1 -3
  28. data/lib/frameworks/sproutcore/frameworks/{handlebars/extensions → core_foundation/ext/handlebars}/bind.js +110 -7
  29. data/lib/frameworks/sproutcore/frameworks/{handlebars/extensions → core_foundation/ext/handlebars}/collection.js +10 -7
  30. data/lib/frameworks/sproutcore/frameworks/{handlebars/extensions → core_foundation/ext/handlebars}/localization.js +1 -1
  31. data/lib/frameworks/sproutcore/frameworks/{handlebars/extensions → core_foundation/ext/handlebars}/view.js +4 -2
  32. data/lib/frameworks/sproutcore/frameworks/{handlebars/extensions.js → core_foundation/ext/handlebars.js} +0 -57
  33. data/lib/frameworks/sproutcore/frameworks/core_foundation/ext/object.js +1 -3
  34. data/lib/frameworks/sproutcore/frameworks/core_foundation/mixins/template_helpers/text_field_support.js +11 -0
  35. data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/main.js +1 -3
  36. data/lib/frameworks/sproutcore/frameworks/core_foundation/panes/pane.js +2 -4
  37. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/application.js +14 -16
  38. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/builder.js +29 -37
  39. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/datetime.js +0 -0
  40. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/event.js +71 -19
  41. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/locale.js +3 -7
  42. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/page.js +5 -7
  43. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/selection_set.js +1 -3
  44. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/sparse_array.js +4 -0
  45. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/timer.js +21 -27
  46. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/utils.js +3 -5
  47. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controllers/array/array_case.js +3 -3
  48. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/controllers/object/single_enumerable_case.js +1 -1
  49. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/system/sparse_array.js +1 -1
  50. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/template/handlebars.js +93 -1
  51. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/clippingFrame.js +1 -1
  52. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/convertLayouts.js +13 -11
  53. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/layer.js +2 -6
  54. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/layoutStyle.js +4 -4
  55. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/theme.js +2 -0
  56. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/view/view.js +4 -4
  57. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/template.js +6 -2
  58. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/template_collection.js +87 -32
  59. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/view/layout.js +21 -25
  60. data/lib/frameworks/sproutcore/frameworks/datastore/data_sources/cascade.js +15 -19
  61. data/lib/frameworks/sproutcore/frameworks/datastore/data_sources/data_source.js +114 -167
  62. data/lib/frameworks/sproutcore/frameworks/datastore/data_sources/fixtures.js +4 -4
  63. data/lib/frameworks/sproutcore/frameworks/datastore/models/child_attribute.js +4 -6
  64. data/lib/frameworks/sproutcore/frameworks/datastore/models/children_attribute.js +2 -4
  65. data/lib/frameworks/sproutcore/frameworks/datastore/models/fetched_attribute.js +7 -7
  66. data/lib/frameworks/sproutcore/frameworks/datastore/models/many_attribute.js +18 -20
  67. data/lib/frameworks/sproutcore/frameworks/datastore/models/record.js +74 -72
  68. data/lib/frameworks/sproutcore/frameworks/datastore/models/record_attribute.js +36 -29
  69. data/lib/frameworks/sproutcore/frameworks/datastore/models/single_attribute.js +2 -2
  70. data/lib/frameworks/sproutcore/frameworks/datastore/system/child_array.js +97 -78
  71. data/lib/frameworks/sproutcore/frameworks/datastore/system/many_array.js +117 -97
  72. data/lib/frameworks/sproutcore/frameworks/datastore/system/nested_store.js +13 -13
  73. data/lib/frameworks/sproutcore/frameworks/datastore/system/query.js +111 -108
  74. data/lib/frameworks/sproutcore/frameworks/datastore/system/record_array.js +231 -198
  75. data/lib/frameworks/sproutcore/frameworks/datastore/system/store.js +146 -145
  76. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/query/builders.js +21 -21
  77. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/record_array/flush.js +49 -50
  78. data/lib/frameworks/sproutcore/frameworks/datetime/{system → frameworks/core/system}/datetime.js +122 -171
  79. data/lib/frameworks/sproutcore/frameworks/datetime/{tests → frameworks/core/tests}/system/datetime.js +0 -0
  80. data/lib/frameworks/sproutcore/frameworks/datetime/{resources → frameworks/localized/resources}/strings.js +0 -0
  81. data/lib/frameworks/sproutcore/frameworks/datetime/frameworks/localized/system/datetime.js +91 -0
  82. data/lib/frameworks/sproutcore/frameworks/desktop/core.js +18 -2
  83. data/lib/frameworks/sproutcore/frameworks/desktop/mixins/border.js +23 -16
  84. data/lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_fast_path.js +56 -45
  85. data/lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_group.js +5 -2
  86. data/lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_row_delegate.js +21 -19
  87. data/lib/frameworks/sproutcore/frameworks/desktop/mixins/collection_view_delegate.js +82 -77
  88. data/lib/frameworks/sproutcore/frameworks/desktop/mixins/navigation_builder.js +18 -12
  89. data/lib/frameworks/sproutcore/frameworks/desktop/mixins/scrollable.js +29 -17
  90. data/lib/frameworks/sproutcore/frameworks/desktop/panes/alert.js +148 -107
  91. data/lib/frameworks/sproutcore/frameworks/desktop/panes/menu.js +31 -16
  92. data/lib/frameworks/sproutcore/frameworks/desktop/panes/modal.js +16 -13
  93. data/lib/frameworks/sproutcore/frameworks/desktop/panes/palette.js +38 -17
  94. data/lib/frameworks/sproutcore/frameworks/desktop/panes/panel.js +37 -25
  95. data/lib/frameworks/sproutcore/frameworks/desktop/panes/picker.js +247 -144
  96. data/lib/frameworks/sproutcore/frameworks/desktop/panes/select_button.js +155 -100
  97. data/lib/frameworks/sproutcore/frameworks/desktop/panes/sheet.js +39 -17
  98. data/lib/frameworks/sproutcore/frameworks/desktop/protocols/drag_data_source.js +9 -6
  99. data/lib/frameworks/sproutcore/frameworks/desktop/protocols/drag_source.js +18 -22
  100. data/lib/frameworks/sproutcore/frameworks/desktop/protocols/drop_target.js +27 -17
  101. data/lib/frameworks/sproutcore/frameworks/desktop/system/drag.js +77 -44
  102. data/lib/frameworks/sproutcore/frameworks/desktop/system/undo_manager.js +68 -33
  103. data/lib/frameworks/sproutcore/frameworks/desktop/views/button.js +168 -110
  104. data/lib/frameworks/sproutcore/frameworks/desktop/views/checkbox.js +37 -5
  105. data/lib/frameworks/sproutcore/frameworks/desktop/views/collection.js +187 -123
  106. data/lib/frameworks/sproutcore/frameworks/desktop/views/date_field.js +73 -49
  107. data/lib/frameworks/sproutcore/frameworks/desktop/views/disclosure.js +34 -9
  108. data/lib/frameworks/sproutcore/frameworks/desktop/views/file.js +51 -14
  109. data/lib/frameworks/sproutcore/frameworks/desktop/views/grid.js +38 -8
  110. data/lib/frameworks/sproutcore/frameworks/desktop/views/image_button.js +15 -9
  111. data/lib/frameworks/sproutcore/frameworks/desktop/views/list.js +54 -34
  112. data/lib/frameworks/sproutcore/frameworks/desktop/views/list_item.js +113 -42
  113. data/lib/frameworks/sproutcore/frameworks/desktop/views/master_detail.js +84 -28
  114. data/lib/frameworks/sproutcore/frameworks/desktop/views/menu_item.js +67 -51
  115. data/lib/frameworks/sproutcore/frameworks/desktop/views/menu_scroll.js +122 -35
  116. data/lib/frameworks/sproutcore/frameworks/desktop/views/navigation.js +40 -16
  117. data/lib/frameworks/sproutcore/frameworks/desktop/views/navigation_bar.js +28 -18
  118. data/lib/frameworks/sproutcore/frameworks/desktop/views/popup_button.js +27 -31
  119. data/lib/frameworks/sproutcore/frameworks/desktop/views/progress.js +118 -68
  120. data/lib/frameworks/sproutcore/frameworks/desktop/views/radio.js +117 -61
  121. data/lib/frameworks/sproutcore/frameworks/desktop/views/scene.js +23 -16
  122. data/lib/frameworks/sproutcore/frameworks/desktop/views/scroll.js +241 -77
  123. data/lib/frameworks/sproutcore/frameworks/desktop/views/scroller.js +134 -69
  124. data/lib/frameworks/sproutcore/frameworks/desktop/views/segment.js +107 -25
  125. data/lib/frameworks/sproutcore/frameworks/desktop/views/segmented.js +125 -48
  126. data/lib/frameworks/sproutcore/frameworks/desktop/views/select.js +165 -69
  127. data/lib/frameworks/sproutcore/frameworks/desktop/views/select_field.js +73 -24
  128. data/lib/frameworks/sproutcore/frameworks/desktop/views/separator.js +19 -5
  129. data/lib/frameworks/sproutcore/frameworks/desktop/views/source_list.js +16 -4
  130. data/lib/frameworks/sproutcore/frameworks/desktop/views/source_list_group.js +14 -7
  131. data/lib/frameworks/sproutcore/frameworks/desktop/views/split.js +43 -37
  132. data/lib/frameworks/sproutcore/frameworks/desktop/views/split_divider.js +8 -1
  133. data/lib/frameworks/sproutcore/frameworks/desktop/views/stacked.js +14 -3
  134. data/lib/frameworks/sproutcore/frameworks/desktop/views/static_content.js +16 -2
  135. data/lib/frameworks/sproutcore/frameworks/desktop/views/tab.js +99 -0
  136. data/lib/frameworks/sproutcore/frameworks/desktop/views/thumb.js +13 -1
  137. data/lib/frameworks/sproutcore/frameworks/desktop/views/toolbar.js +58 -8
  138. data/lib/frameworks/sproutcore/frameworks/desktop/views/web.js +34 -18
  139. data/lib/frameworks/sproutcore/frameworks/desktop/views/well.js +25 -9
  140. data/lib/frameworks/sproutcore/frameworks/desktop/views/workspace.js +70 -36
  141. data/lib/frameworks/sproutcore/frameworks/foundation/controllers/tree.js +10 -5
  142. data/lib/frameworks/sproutcore/frameworks/foundation/debug/control_test_pane.js +28 -17
  143. data/lib/frameworks/sproutcore/frameworks/foundation/delegates/inline_text_field.js +41 -43
  144. data/lib/frameworks/sproutcore/frameworks/foundation/gestures/pinch.js +42 -4
  145. data/lib/frameworks/sproutcore/frameworks/foundation/gestures/swipe.js +94 -4
  146. data/lib/frameworks/sproutcore/frameworks/foundation/gestures/tap.js +41 -1
  147. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/auto_mixin.js +2 -0
  148. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/auto_resize.js +18 -9
  149. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/collection_content.js +7 -5
  150. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/content_display.js +7 -8
  151. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/content_value_support.js +34 -24
  152. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/control.js +48 -18
  153. data/lib/frameworks/sproutcore/frameworks/foundation/mixins/inline_text_field.js +1 -0
  154. data/lib/frameworks/sproutcore/frameworks/foundation/system/utils/misc.js +1 -2
  155. data/lib/frameworks/sproutcore/frameworks/foundation/tasks/preload_bundle.js +1 -1
  156. data/lib/frameworks/sproutcore/frameworks/foundation/tests/mixins/inline_text_field/beginEditing.js +0 -11
  157. data/lib/frameworks/sproutcore/frameworks/foundation/validators/date_time.js +1 -1
  158. data/lib/frameworks/sproutcore/frameworks/foundation/views/text_field.js +8 -0
  159. data/lib/frameworks/sproutcore/frameworks/qunit/README.md +24 -0
  160. data/lib/frameworks/sproutcore/frameworks/qunit/package.json +21 -0
  161. data/lib/frameworks/sproutcore/frameworks/qunit/qunit/qunit.css +215 -0
  162. data/lib/frameworks/sproutcore/frameworks/qunit/qunit/qunit.js +1442 -0
  163. data/lib/frameworks/sproutcore/frameworks/qunit/test/headless.html +24 -0
  164. data/lib/frameworks/sproutcore/frameworks/qunit/test/index.html +18 -0
  165. data/lib/frameworks/sproutcore/frameworks/qunit/test/logs.html +17 -0
  166. data/lib/frameworks/sproutcore/frameworks/qunit/test/logs.js +150 -0
  167. data/lib/frameworks/sproutcore/frameworks/qunit/test/same.js +1421 -0
  168. data/lib/frameworks/sproutcore/frameworks/qunit/test/test.js +314 -0
  169. data/lib/frameworks/sproutcore/frameworks/runtime/core.js +1 -1
  170. data/lib/frameworks/sproutcore/frameworks/runtime/mixins/array.js +369 -60
  171. data/lib/frameworks/sproutcore/frameworks/runtime/mixins/enumerable.js +2 -405
  172. data/lib/frameworks/sproutcore/frameworks/runtime/mixins/observable.js +3 -9
  173. data/lib/frameworks/sproutcore/frameworks/runtime/private/property_chain.js +50 -45
  174. data/lib/frameworks/sproutcore/frameworks/runtime/system/binding.js +20 -1
  175. data/lib/frameworks/sproutcore/frameworks/runtime/system/object.js +0 -9
  176. data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/guidFor.js +1 -1
  177. data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/array.js +36 -14
  178. data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/enumerable/enumerable.js +0 -34
  179. data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/enumerable/enumerable_observers.js +50 -61
  180. data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/observable.js +2 -2
  181. data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/propertyChanges.js +1 -1
  182. data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/registerDependentKeys.js +45 -1
  183. data/lib/frameworks/sproutcore/frameworks/runtime/tests/mixins/propertyChanges.js +1 -1
  184. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/object/bindings.js +5 -0
  185. data/lib/frameworks/sproutcore/frameworks/runtime/tests/system/object/enhance.js +1 -1
  186. data/lib/frameworks/sproutcore/frameworks/testing/core.js +3 -0
  187. data/lib/frameworks/sproutcore/frameworks/testing/system/plan.js +0 -1
  188. data/lib/frameworks/sproutcore/frameworks/testing/system/runner.js +0 -1
  189. data/lib/gen/html_app/templates/apps/@target_name@/@target_name@.js +1 -1
  190. data/vendor/chance/lib/chance/instance.rb +8 -6
  191. metadata +41 -31
  192. data/lib/frameworks/sproutcore/frameworks/testing/jquery.js +0 -3559
  193. data/lib/frameworks/sproutcore/frameworks/testing/qunit.js +0 -827
@@ -12,7 +12,23 @@
12
12
 
13
13
  Usually it is best to leave this property set to NO in order to prever the
14
14
  user from inadvertantly losing data by pressing the backspace key.
15
-
16
- @property {Boolean}
15
+
16
+ @static
17
+ @type Boolean
18
+ @default NO
17
19
  */
18
20
  SC.allowsBackspaceToPreviousPage = NO;
21
+
22
+ /**
23
+ @type String
24
+ @static
25
+ @constant
26
+ */
27
+ SC.HORIZONTAL_ORIENTATION = 'horizontal';
28
+
29
+ /**
30
+ @type String
31
+ @static
32
+ @constant
33
+ */
34
+ SC.VERTICAL_ORIENTATION = 'vertical' ;
@@ -15,6 +15,10 @@ SC.BORDER_NONE = null ;
15
15
 
16
16
  /**
17
17
  @namespace
18
+ @deprecated
19
+
20
+ The SC.Border mixin has be deprecated in favour of applying border properties
21
+ to an SC.View's layout object. See {@link SC.View#layout}.
18
22
 
19
23
  The Border mixin can be applied to any view to give it a visual border.
20
24
  In addition to specifying the mixin itself, you should specify the border
@@ -28,20 +32,21 @@ SC.BORDER_NONE = null ;
28
32
 
29
33
  SproutCore pre-defines several useful border styles including:
30
34
 
31
- - SC.BORDER_BEZEL - displays an inlaid bezel
32
- - SC.BORDER_BLACK - displays a black border
33
- - SC.BORDER_GRAY - displays a gray border
34
- - SC.BORDER_TOP - displays a border on the top only
35
- - SC.BORDER_BOTTOM - displays a border on the bottom only
36
- - SC.BORDER_NONE - disables the border
35
+ - SC.BORDER_BEZEL - displays an inlaid bezel
36
+ - SC.BORDER_BLACK - displays a black border
37
+ - SC.BORDER_GRAY - displays a gray border
38
+ - SC.BORDER_TOP - displays a border on the top only
39
+ - SC.BORDER_BOTTOM - displays a border on the bottom only
40
+ - SC.BORDER_NONE - disables the border
37
41
 
38
42
  @since SproutCore 1.0
39
43
  */
40
44
  SC.Border = {
45
+
41
46
  /**
42
47
  The thickness of the top border.
43
48
 
44
- @property {Number}
49
+ @type Number
45
50
  @commonTask Border Dimensions
46
51
  */
47
52
  borderTop: 0,
@@ -49,7 +54,7 @@ SC.Border = {
49
54
  /**
50
55
  The thickness of the right border.
51
56
 
52
- @property {Number}
57
+ @type Number
53
58
  @commonTask Border Dimensions
54
59
  */
55
60
  borderRight: 0,
@@ -57,7 +62,7 @@ SC.Border = {
57
62
  /**
58
63
  The thickness of the bottom border.
59
64
 
60
- @property {Number}
65
+ @type Number
61
66
  @commonTask Border Dimensions
62
67
  */
63
68
  borderBottom: 0,
@@ -65,7 +70,7 @@ SC.Border = {
65
70
  /**
66
71
  The thickness of the left border.
67
72
 
68
- @property {Number}
73
+ @type Number
69
74
  @commonTask Border Dimensions
70
75
  */
71
76
  borderLeft: 0,
@@ -73,12 +78,13 @@ SC.Border = {
73
78
  /**
74
79
  The style of the border. You may specify a color string (like 'red' or
75
80
  '#fff'), a CSS class name, or one of:
76
- - SC.BORDER_BEZEL
77
- - SC.BORDER_BLACK
78
- - SC.BORDER_GRAY
79
- - SC.BORDER_TOP
80
- - SC.BORDER_BOTTOM
81
- - SC.BORDER_NONE
81
+
82
+ - SC.BORDER_BEZEL
83
+ - SC.BORDER_BLACK
84
+ - SC.BORDER_GRAY
85
+ - SC.BORDER_TOP
86
+ - SC.BORDER_BOTTOM
87
+ - SC.BORDER_NONE
82
88
 
83
89
  If you specify a CSS class name, it must end in "-border".
84
90
  */
@@ -132,6 +138,7 @@ SC.Border = {
132
138
  }
133
139
  },
134
140
 
141
+ /** @private */
135
142
  _sc_border_borderDimensionsDidChange: function(){
136
143
  var borderTop = this.get('borderTop'),
137
144
  borderRight = this.get('borderRight'),
@@ -4,11 +4,15 @@
4
4
  // Portions ©2008-2011 Apple Inc. All rights reserved.
5
5
  // License: Licensed under MIT license (see license.js)
6
6
  // ==========================================================================
7
+
7
8
  /**
9
+ @namespace
10
+
8
11
  An experimental CollectionView mixin that makes it extremely fast under
9
12
  certain circumstances, including for mobile devices.
10
13
  */
11
14
  SC.CollectionFastPath = {
15
+
12
16
  //
13
17
  // ITEM VIEW CLASS/INSTANCE MANAGEMENT
14
18
  //
@@ -20,6 +24,8 @@ SC.CollectionFastPath = {
20
24
  Returns the pool for a given example view.
21
25
 
22
26
  The pool is calculated based on the guid for the example view class.
27
+
28
+ @param {SC.View} exampleView
23
29
  */
24
30
  poolForExampleView: function(exampleView) {
25
31
  var poolKey = "_pool_" + SC.guidFor(exampleView);
@@ -30,6 +36,9 @@ SC.CollectionFastPath = {
30
36
  /**
31
37
  Creates an item view from a given example view, configuring it with basic settings
32
38
  and the supplied attributes.
39
+
40
+ @param {SC.View} exampleView
41
+ @param {Hash} attrs
33
42
  */
34
43
  createItemViewFromExampleView: function(exampleView, attrs) {
35
44
  // create the example view
@@ -48,6 +57,10 @@ SC.CollectionFastPath = {
48
57
  return ret;
49
58
  },
50
59
 
60
+ /**
61
+ @param {SC.View} itemView
62
+ @param {Hash} attrs
63
+ */
51
64
  configureItemView: function(itemView, attrs) {
52
65
  // set settings. Self explanatory.
53
66
  itemView.beginPropertyChanges();
@@ -68,6 +81,9 @@ SC.CollectionFastPath = {
68
81
 
69
82
  /**
70
83
  Configures a pooled view, calling .awakeFromPool if it is defined.
84
+
85
+ @param {SC.View} itemView
86
+ @param {Hash} attrs
71
87
  */
72
88
  wakePooledView: function(itemView, attrs) {
73
89
  // configure
@@ -80,6 +96,9 @@ SC.CollectionFastPath = {
80
96
  /**
81
97
  Gets an item view from an example view, from a pool if possible, and otherwise
82
98
  by generating it.
99
+
100
+ @param {SC.View} exampleView
101
+ @param {Hash} attrs
83
102
  */
84
103
  allocateItemView: function(exampleView, attrs) {
85
104
  // we will try to get it from a pool. This will fill ret. If ret is not
@@ -109,6 +128,8 @@ SC.CollectionFastPath = {
109
128
  This is called for one of two purposes: to release a view that is no longer displaying,
110
129
  or to release an older cached version of a view that needed to be replaced because the
111
130
  example view changed.
131
+
132
+ @param {SC.View} itemView
112
133
  */
113
134
  releaseItemView: function(itemView) {
114
135
  // if it is not poolable, there is not much we can do.
@@ -123,10 +144,8 @@ SC.CollectionFastPath = {
123
144
  if (itemView.hibernateInPool) itemView.hibernateInPool(pool, this);
124
145
  },
125
146
 
126
- /**
147
+ /** @private
127
148
  Returns YES if the item at the index is a group.
128
-
129
- @private
130
149
  */
131
150
  contentIndexIsGroup: function(view, content, index) {
132
151
  var contentDelegate = this.get("contentDelegate");
@@ -142,8 +161,7 @@ SC.CollectionFastPath = {
142
161
  return isGroupView;
143
162
  },
144
163
 
145
- /**
146
- @private
164
+ /** @private
147
165
  Determines the example view for a content index. There are two optional parameters that will
148
166
  speed things up: contentObject and isGroupView. If you don't supply them, they must be computed.
149
167
  */
@@ -168,15 +186,12 @@ SC.CollectionFastPath = {
168
186
  return ExampleView;
169
187
  },
170
188
 
171
- /**
189
+ /** @private
172
190
  This may seem somewhat awkward, but it is for memory performance: this fills in a hash
173
191
  YOU provide with the properties for the given content index.
174
192
 
175
193
  Properties include both the attributes given to the view and some CollectionView tracking
176
194
  properties, most importantly the exampleView.
177
-
178
-
179
- @private
180
195
  */
181
196
  setAttributesForItem: function(item, index, attrs) {
182
197
  var del = this.get('contentDelegate'),
@@ -204,15 +219,11 @@ SC.CollectionFastPath = {
204
219
  if (!attrs.layout) attrs.layout = ExampleView.prototype.layout;
205
220
  },
206
221
 
207
-
208
-
209
-
210
222
  //
211
223
  // ITEM LOADING/DOM MANAGEMENT
212
224
  //
213
225
 
214
- /**
215
- @private
226
+ /** @private
216
227
  Returns mapped item views for the supplied item.
217
228
  */
218
229
  mappedViewsForItem: function(item, map) {
@@ -220,8 +231,7 @@ SC.CollectionFastPath = {
220
231
  return map[SC.guidFor(item)];
221
232
  },
222
233
 
223
- /**
224
- @private
234
+ /** @private
225
235
  Returns the mapped view for an item at the specified index.
226
236
  */
227
237
  mappedViewForItem: function(item, idx, map) {
@@ -231,8 +241,7 @@ SC.CollectionFastPath = {
231
241
  return m[idx];
232
242
  },
233
243
 
234
- /**
235
- @private
244
+ /** @private
236
245
  Maps a view to an item/index combination.
237
246
  */
238
247
  mapView: function(item, index, view, map) {
@@ -249,7 +258,7 @@ SC.CollectionFastPath = {
249
258
  imap._length++;
250
259
  },
251
260
 
252
- /**
261
+ /** @private
253
262
  Unmaps a view from an item/index combination.
254
263
  */
255
264
  unmapView: function(item, index, map) {
@@ -274,6 +283,8 @@ SC.CollectionFastPath = {
274
283
  Returns the item view for the given content index.
275
284
  NOTE: THIS WILL ADD THE VIEW TO DOM TEMPORARILY (it will be cleaned if
276
285
  it is not used). As such, use sparingly.
286
+
287
+ @param {Number} index
277
288
  */
278
289
  itemViewForContentIndex: function(index) {
279
290
  var content = this.get("content");
@@ -298,8 +309,7 @@ SC.CollectionFastPath = {
298
309
  return view;
299
310
  },
300
311
 
301
- /**
302
- @private
312
+ /** @private
303
313
  Returns the nearest item view index to the supplied index mapped to the item.
304
314
  */
305
315
  nearestMappedViewIndexForItem: function(item, index, map) {
@@ -326,8 +336,7 @@ SC.CollectionFastPath = {
326
336
  return nearest;
327
337
  },
328
338
 
329
- /**
330
- @private
339
+ /** @private
331
340
  Remaps the now showing views to their new indexes (if they have moved).
332
341
  */
333
342
  remapItemViews: function(nowShowing) {
@@ -394,6 +403,9 @@ SC.CollectionFastPath = {
394
403
 
395
404
  /**
396
405
  Reloads.
406
+
407
+ @param {SC.IndexSet} nowShowing
408
+ @param {Boolean} scrollOnly
397
409
  */
398
410
  reloadIfNeeded: function(nowShowing, scrollOnly) {
399
411
  var content = this.get("content"), invalid;
@@ -450,6 +462,8 @@ SC.CollectionFastPath = {
450
462
 
451
463
  /**
452
464
  Loops through remove queue and removes.
465
+
466
+ @param {Hash} oldMap
453
467
  */
454
468
  processRemovals: function(oldMap) {
455
469
  var content = this.get("content");
@@ -469,8 +483,7 @@ SC.CollectionFastPath = {
469
483
  }
470
484
  },
471
485
 
472
- /**
473
- @private
486
+ /** @private
474
487
  Loops through update queue and... updates.
475
488
  */
476
489
  processUpdates: function(invalid) {
@@ -485,8 +498,7 @@ SC.CollectionFastPath = {
485
498
  }, this);
486
499
  },
487
500
 
488
- /**
489
- @private
501
+ /** @private
490
502
  Loops through add queue and, well, adds.
491
503
  */
492
504
  processAdds: function() {
@@ -502,8 +514,7 @@ SC.CollectionFastPath = {
502
514
  }
503
515
  },
504
516
 
505
- /**
506
- @private
517
+ /** @private
507
518
  Clear all DOM pools.
508
519
  */
509
520
  clearDOMPools: function() {
@@ -513,10 +524,13 @@ SC.CollectionFastPath = {
513
524
  }
514
525
  },
515
526
 
527
+ /**
528
+ @type Number
529
+ @default 10
530
+ */
516
531
  domPoolSize: 10,
517
532
 
518
- /**
519
- @private
533
+ /** @private
520
534
  Clears a specific DOM pool.
521
535
  */
522
536
  clearDOMPool: function(pool) {
@@ -537,8 +551,7 @@ SC.CollectionFastPath = {
537
551
  pool.length = Math.min(pool.length, this.domPoolSize);
538
552
  },
539
553
 
540
- /**
541
- @private
554
+ /** @private
542
555
  Returns the DOM pool for the given exampleView.
543
556
  */
544
557
  domPoolForExampleView: function(exampleView) {
@@ -548,8 +561,7 @@ SC.CollectionFastPath = {
548
561
  return pool;
549
562
  },
550
563
 
551
- /**
552
- @private
564
+ /** @private
553
565
  Tries to find an item for the given example view in a dom pool.
554
566
  If one could not be found, returns null.
555
567
  */
@@ -561,8 +573,7 @@ SC.CollectionFastPath = {
561
573
  return view;
562
574
  },
563
575
 
564
- /**
565
- @private
576
+ /** @private
566
577
  Sends a view to a DOM pool.
567
578
  */
568
579
  sendToDOMPool: function(view) {
@@ -574,8 +585,7 @@ SC.CollectionFastPath = {
574
585
  if (view.sleepInDOMPool) view.sleepInDOMPool();
575
586
  },
576
587
 
577
- /**
578
- @private
588
+ /** @private
579
589
  Adds an item view (grabbing the actual item from one of the pools if possible).
580
590
  */
581
591
  addItemView: function(exampleView, object, index) {
@@ -616,8 +626,7 @@ SC.CollectionFastPath = {
616
626
  return view;
617
627
  },
618
628
 
619
- /**
620
- @private
629
+ /** @private
621
630
  Removes an item view.
622
631
  */
623
632
  removeItemView: function(current) {
@@ -653,17 +662,19 @@ SC.CollectionFastPath = {
653
662
  },
654
663
 
655
664
 
656
- /**
665
+ /** @private
657
666
  Tells ScrollView that this should receive live updates during touch scrolling.
658
667
  We are so fast, aren't we?
659
668
  */
660
669
  _lastTopUpdate: 0,
670
+
671
+ /** @private */
661
672
  _lastLeftUpdate: 0,
673
+
674
+ /** @private */
662
675
  _tolerance: 100,
663
676
 
664
- /**
665
- The fast-path that computes a special
666
- */
677
+ /** @private */
667
678
  touchScrollDidChange: function(left, top) {
668
679
  // prevent getting too many in close succession.
669
680
  if (Date.now() - this._lastTouchScrollTime < 25) return;
@@ -8,8 +8,6 @@
8
8
  /**
9
9
  @namespace
10
10
 
11
- TODO: Add full description of SC.CollectionGroup
12
-
13
11
  Any view you want to use as a group view in a collection must include this
14
12
  mixin.
15
13
 
@@ -17,6 +15,11 @@
17
15
  */
18
16
  SC.CollectionGroup = {
19
17
 
18
+ /**
19
+ @type Array
20
+ @default ['sc-collection-group']
21
+ @see SC.View#classNames
22
+ */
20
23
  classNames: ['sc-collection-group']
21
24
 
22
25
  };
@@ -6,53 +6,55 @@
6
6
  // ==========================================================================
7
7
 
8
8
 
9
-
10
9
  /**
11
10
  @namespace
12
11
 
13
- CollectionRowDelegates are consulted by SC.ListView and SC.TableView to
14
- control the height of rows, including specifying custom heights for
15
- specific rows.
16
-
17
- You can implement a custom row height in one of two ways.
12
+ CollectionRowDelegates are consulted by SC.ListView and SC.TableView to
13
+ control the height of rows, including specifying custom heights for
14
+ specific rows.
18
15
 
16
+ You can implement a custom row height in one of two ways.
19
17
  */
20
18
  SC.CollectionRowDelegate = {
21
19
 
22
- /** walk like a duck */
20
+ /**
21
+ Walk like a duck.
22
+
23
+ @type Boolean
24
+ @default YES
25
+ */
23
26
  isCollectionRowDelegate: YES,
24
27
 
25
28
  /**
26
- Default item height. Size of an item without spacing or padding.
27
- Unless you implement some custom row height
29
+ Size of an item without spacing or padding.
30
+ Unless you implement some custom row height
28
31
  support, this row height will be used for all items.
29
32
 
30
- @property
31
33
  @type Number
34
+ @default 18
32
35
  */
33
36
  itemHeight: 18,
34
37
 
35
38
  /**
36
- Default row spacing. This inserts empty space between rows that you can use for borders.
39
+ This inserts empty space between rows that you can use for borders.
37
40
 
38
- @property
39
41
  @type Number
42
+ @default 0
40
43
  */
41
44
  rowSpacing: 0,
42
45
 
43
46
  /**
44
- Default row padding. This is useful if you are using a custom item view that needs to be padded.
47
+ This is useful if you are using a custom item view that needs to be padded.
45
48
  This value is added to the top and bottom of the itemHeight.
46
49
 
47
- @property
48
50
  @type Number
51
+ @default 0
49
52
  */
50
53
  rowPadding: 0,
51
54
 
52
55
  /**
53
56
  Total row height used for calculation. Equal to itemHeight + twice rowPadding.
54
57
 
55
- @property
56
58
  @type Number
57
59
  */
58
60
  rowHeight: function(key, value) {
@@ -68,11 +70,10 @@ SC.CollectionRowDelegate = {
68
70
  }.property('itemHeight', 'rowPadding'),
69
71
 
70
72
  /**
71
- Index set of rows that should have a custom row height. If you need
72
- certains rows to have a custom row height, then set this property to a
73
+ Index set of rows that should have a custom row height. If you need
74
+ certains rows to have a custom row height, then set this property to a
73
75
  non-null value. Otherwise leave it blank to disable custom row heights.
74
76
 
75
- @property
76
77
  @type SC.IndexSet
77
78
  */
78
79
  customRowHeightIndexes: null,
@@ -90,6 +91,7 @@ SC.CollectionRowDelegate = {
90
91
  @returns {Number} row height
91
92
  */
92
93
  contentIndexRowHeight: function(view, content, contentIndex) {
93
- return this.get('rowHeight');
94
+ return this.get('rowHeight');
94
95
  }
96
+
95
97
  };