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
@@ -19,8 +19,14 @@ sc_require('views/scroll');
19
19
  @extends SC.ScrollerView
20
20
  @since SproutCore 1.0
21
21
  */
22
+ SC.MenuScrollerView = SC.ScrollerView.extend(
23
+ /** @scope SC.MenuScrollerView.prototype */ {
22
24
 
23
- SC.MenuScrollerView = SC.ScrollerView.extend({
25
+ /**
26
+ @type Array
27
+ @default ['sc-menu-scroller-view']
28
+ @see SC.View#classNames
29
+ */
24
30
  classNames: ['sc-menu-scroller-view'],
25
31
 
26
32
  // ..........................................................
@@ -28,7 +34,10 @@ SC.MenuScrollerView = SC.ScrollerView.extend({
28
34
  //
29
35
 
30
36
  /**
31
- Used to set the scrolling direction of the scroller.
37
+ Used to set the scrolling direction of the scroller.
38
+
39
+ @type Boolean
40
+ @default NO
32
41
  */
33
42
  scrollDown: NO,
34
43
 
@@ -36,7 +45,9 @@ SC.MenuScrollerView = SC.ScrollerView.extend({
36
45
  The scroller offset value. This value will adjust between the minimum
37
46
  and maximum values that you set. Default is 0.
38
47
 
39
- @property
48
+ @field
49
+ @type Number
50
+ @observes maximum
40
51
  */
41
52
  value: function(key, val) {
42
53
  if (val !== undefined) {
@@ -56,7 +67,8 @@ SC.MenuScrollerView = SC.ScrollerView.extend({
56
67
 
57
68
  When set less than the height of the scroller, the scroller is disabled.
58
69
 
59
- @property {Number}
70
+ @type Number
71
+ @default 0
60
72
  */
61
73
  maximum: 0,
62
74
 
@@ -64,22 +76,30 @@ SC.MenuScrollerView = SC.ScrollerView.extend({
64
76
  YES if enable scrollbar, NO to disable it. Scrollbars will automatically
65
77
  disable if the maximum scroll width does not exceed their capacity.
66
78
 
67
- @property
79
+ @type Boolean
80
+ @default YES
68
81
  */
69
82
  isEnabled: YES,
70
83
 
71
84
  /**
72
85
  Determine the layout direction. Determines whether the scrollbar should
73
86
  appear horizontal or vertical. This must be set when the view is created.
74
- Changing this once the view has been created will have no effect.
87
+ Changing this once the view has been created will have no effect. Possible
88
+ values:
75
89
 
76
- @property
90
+ - SC.LAYOUT_VERTICAL
91
+ - SC.LAYOUT_HORIZONTAL
92
+
93
+ @type String
94
+ @default SC.LAYOUT_VERTICAL
77
95
  */
78
96
  layoutDirection: SC.LAYOUT_VERTICAL,
79
97
 
80
98
  /**
81
99
  Amount to scroll one vertical line.
82
- Defaults to 20px.
100
+
101
+ @type Number
102
+ @default 20
83
103
  */
84
104
  verticalLineScroll: 20,
85
105
 
@@ -87,16 +107,20 @@ SC.MenuScrollerView = SC.ScrollerView.extend({
87
107
  This function overrides the default function in SC.Scroller as
88
108
  menus only have vertical scrolling.
89
109
 
90
- @property {String}
110
+ @field
111
+ @type String
112
+ @default 'verticalScrollOffset'
91
113
  */
92
114
  ownerScrollValueKey: function() {
93
- return 'verticalScrollOffset' ;
115
+ return 'verticalScrollOffset';
94
116
  }.property('layoutDirection').cacheable(),
95
117
 
118
+
96
119
  // ..........................................................
97
120
  // INTERNAL SUPPORT
98
121
  //
99
122
 
123
+ /** @private */
100
124
  init: function() {
101
125
  // Set the scrollerThickness based on controlSize
102
126
  switch (this.get('controlSize')) {
@@ -120,6 +144,7 @@ SC.MenuScrollerView = SC.ScrollerView.extend({
120
144
  return sc_super();
121
145
  },
122
146
 
147
+ /** @private */
123
148
  render: function(context, firstTime) {
124
149
  context.addClass('sc-vertical') ;
125
150
  context.addClass(this.get('controlSize'));
@@ -130,6 +155,7 @@ SC.MenuScrollerView = SC.ScrollerView.extend({
130
155
  context.setClass('disabled', !this.get('isEnabled')) ;
131
156
  },
132
157
 
158
+ /** @private */
133
159
  didCreateLayer: function() {
134
160
  // var callback, amt, layer;
135
161
  //
@@ -143,33 +169,32 @@ SC.MenuScrollerView = SC.ScrollerView.extend({
143
169
  // layer.scrollTop = amt ;
144
170
  },
145
171
 
172
+ /** @private */
146
173
  willDestroyLayer: function() {
147
174
  var callback = this._sc_scroller_scrollDidChange ;
148
175
  SC.Event.remove(this.$(), 'scroll', this, callback) ;
149
176
  },
150
177
 
178
+ /** @private */
151
179
  mouseEntered: function(evt) {
152
180
  this.set('isMouseOver', YES);
153
181
  this._invokeScrollOnMouseOver();
154
182
  },
155
183
 
184
+ /** @private */
156
185
  mouseExited: function(evt) {
157
186
  this.set('isMouseOver', NO);
158
187
  },
159
188
 
160
- /** @private */
161
-
162
189
  /**
163
- This function overrides the default function in SC.Scroller.
190
+ This function overrides the default function in SC.Scroller.
164
191
  SC.MenuScroller and SC.MenuScroll use valueBinding so this function is
165
192
  not neccesary.
166
193
  */
167
- _sc_scroller_valueDidChange: function() {
168
-
169
- }.observes('value'),
194
+ _sc_scroller_valueDidChange: function() {}.observes('value'),
170
195
 
171
196
 
172
- // after 50msec, fire event again
197
+ /** @private */
173
198
  _sc_scroller_armScrollTimer: function() {
174
199
  if (!this._sc_scrollTimer) {
175
200
  SC.RunLoop.begin() ;
@@ -179,6 +204,7 @@ SC.MenuScrollerView = SC.ScrollerView.extend({
179
204
  }
180
205
  },
181
206
 
207
+ /** @private */
182
208
  _sc_scroller_scrollDidChange: function() {
183
209
  var now = Date.now(),
184
210
  last = this._sc_lastScroll,
@@ -200,7 +226,7 @@ SC.MenuScrollerView = SC.ScrollerView.extend({
200
226
  },
201
227
 
202
228
 
203
- /**
229
+ /** @private
204
230
  Scroll the menu if it is is an up or down arrow. This is called by
205
231
  the function that simulates mouseOver.
206
232
  */
@@ -223,7 +249,8 @@ SC.MenuScrollerView = SC.ScrollerView.extend({
223
249
  return YES;
224
250
  },
225
251
 
226
- /**
252
+ /** @private
253
+
227
254
  We use this function to simulate mouseOver. It checks for the flag
228
255
  isMouseOver which is turned on when mouseEntered is called and turned off
229
256
  when mouseExited is called.
@@ -238,12 +265,38 @@ SC.MenuScrollerView = SC.ScrollerView.extend({
238
265
  });
239
266
 
240
267
  /**
241
- Default metrics for scroller size.
268
+ @static
269
+ @type Number
270
+ @default 18
242
271
  */
243
272
  SC.MenuScrollerView.REGULAR_SCROLLER_THICKNESS = 18;
273
+
274
+ /**
275
+ @static
276
+ @type Number
277
+ @default 10
278
+ */
244
279
  SC.MenuScrollerView.TINY_SCROLLER_THICKNESS = 10;
280
+
281
+ /**
282
+ @static
283
+ @type Number
284
+ @default 14
285
+ */
245
286
  SC.MenuScrollerView.SMALL_SCROLLER_THICKNESS = 14;
287
+
288
+ /**
289
+ @static
290
+ @type Number
291
+ @default 23
292
+ */
246
293
  SC.MenuScrollerView.LARGE_SCROLLER_THICKNESS = 23;
294
+
295
+ /**
296
+ @static
297
+ @type Number
298
+ @default 26
299
+ */
247
300
  SC.MenuScrollerView.HUGE_SCROLLER_THICKNESS = 26;
248
301
 
249
302
 
@@ -259,10 +312,17 @@ SC.MenuScrollerView.HUGE_SCROLLER_THICKNESS = 26;
259
312
  @extends SC.ScrollView
260
313
  @since SproutCore 1.0
261
314
  */
262
- SC.MenuScrollView = SC.ScrollView.extend({
315
+ SC.MenuScrollView = SC.ScrollView.extend(
316
+ /** @scope SC.MenuScrollView.prototype */{
263
317
 
318
+ /**
319
+ @type Array
320
+ @default ['sc-menu-scroll-view']
321
+ @see SC.View#classNames
322
+ */
264
323
  classNames: ['sc-menu-scroll-view'],
265
324
 
325
+
266
326
  // ..........................................................
267
327
  // PROPERTIES
268
328
  //
@@ -273,7 +333,8 @@ SC.MenuScrollView = SC.ScrollView.extend({
273
333
  size and the size of the scroll view. If horizontal scrolling is
274
334
  disabled, this will always return 0.
275
335
 
276
- @property {Number}
336
+ @type Number
337
+ @default 0
277
338
  */
278
339
  maximumHorizontalScrollOffset: 0,
279
340
 
@@ -286,7 +347,8 @@ SC.MenuScrollView = SC.ScrollView.extend({
286
347
  YES if the view should maintain a horizontal scroller. This property
287
348
  must be set when the view is created.
288
349
 
289
- @property {Boolean}
350
+ @type Boolean
351
+ @default NO
290
352
  */
291
353
  hasHorizontalScroller: NO,
292
354
 
@@ -295,7 +357,8 @@ SC.MenuScrollView = SC.ScrollView.extend({
295
357
  instance when the ScrollView is created unless hasHorizontalScroller is
296
358
  NO.
297
359
 
298
- @property {SC.View}
360
+ @type SC.View
361
+ @default SC.MenuScrollerView
299
362
  */
300
363
  horizontalScrollerView: SC.MenuScrollerView,
301
364
 
@@ -306,7 +369,8 @@ SC.MenuScrollView = SC.ScrollView.extend({
306
369
  hasHorizontalScroller to NO to avoid creating a scroller view in the
307
370
  first place.
308
371
 
309
- @property {Boolean}
372
+ @type Boolean
373
+ @default NO
310
374
  */
311
375
  isHorizontalScrollerVisible: NO,
312
376
 
@@ -314,14 +378,18 @@ SC.MenuScrollView = SC.ScrollView.extend({
314
378
  Returns YES if the view both has a horizontal scroller, the scroller is
315
379
  visible.
316
380
 
317
- @property {Boolean}
381
+ @type Boolean
382
+ @default NO
318
383
  */
319
384
  canScrollHorizontal: NO,
320
385
 
321
386
  /**
322
387
  If YES, the horizontal scroller will autohide if the contentView is
323
388
  smaller than the visible area. You must set hasHorizontalScroller to YES
324
- for this property to have any effect.
389
+ for this property to have any effect.
390
+
391
+ @type Boolean
392
+ @default NO
325
393
  */
326
394
  autohidesHorizontalScroller: NO,
327
395
 
@@ -329,7 +397,8 @@ SC.MenuScrollView = SC.ScrollView.extend({
329
397
  YES if the view shuld maintain a vertical scroller. This property must
330
398
  be set when the view is created.
331
399
 
332
- @property {Boolean}
400
+ @type Boolean
401
+ @default YES
333
402
  */
334
403
  hasVerticalScroller: YES,
335
404
 
@@ -337,7 +406,8 @@ SC.MenuScrollView = SC.ScrollView.extend({
337
406
  The vertical scroller view class. This will be replaced with a view
338
407
  instance when the ScrollView is created unless hasVerticalScroller is NO.
339
408
 
340
- @property {SC.View}
409
+ @type SC.View
410
+ @default SC.MenuScrollerView
341
411
  */
342
412
  verticalScrollerView: SC.MenuScrollerView,
343
413
  verticalScrollerView2: SC.MenuScrollerView,
@@ -346,17 +416,24 @@ SC.MenuScrollView = SC.ScrollView.extend({
346
416
  YES if the vertical scroller should be visible. For SC.MenuScroll the
347
417
  vertical scroller is always there we just hide the arrows to scroll.
348
418
 
349
- @property {Boolean}
419
+ @type Boolean
420
+ @default YES
350
421
  */
351
422
  isVerticalScrollerVisible: YES,
352
423
 
353
-
424
+ /**
425
+ @type Boolean
426
+ @default YES
427
+ */
354
428
  canScrollVertical: YES,
355
429
 
356
430
  /**
357
431
  If YES, the vertical scroller will autohide if the contentView is
358
432
  smaller than the visible area. You must set hasVerticalScroller to YES
359
- for this property to have any effect.
433
+ for this property to have any effect.
434
+
435
+ @type Boolean
436
+ @default YES
360
437
  */
361
438
  autohidesVerticalScroller: YES,
362
439
 
@@ -364,7 +441,8 @@ SC.MenuScrollView = SC.ScrollView.extend({
364
441
  Use this property to set the 'bottom' offset of your vertical scroller,
365
442
  to make room for a thumb view or other accessory view. Default is 0.
366
443
 
367
- @property {Number}
444
+ @type Number
445
+ @default 0
368
446
  */
369
447
  verticalScrollerBottom: 0,
370
448
 
@@ -375,6 +453,9 @@ SC.MenuScrollView = SC.ScrollView.extend({
375
453
 
376
454
  /**
377
455
  Control Size for Menu content: change verticalLineScroll
456
+
457
+ @type String
458
+ @default SC.REGULAR_CONTROL_SIZE
378
459
  */
379
460
  controlSize: SC.REGULAR_CONTROL_SIZE,
380
461
 
@@ -382,13 +463,18 @@ SC.MenuScrollView = SC.ScrollView.extend({
382
463
  The container view that will contain your main content view. You can
383
464
  replace this property with your own custom subclass if you prefer.
384
465
 
385
- @type {SC.ContainerView}
466
+ @type SC.ContainerView
467
+ @default SC.ContainerView
386
468
  */
387
469
  containerView: SC.ContainerView,
388
470
 
389
471
  // ..........................................................
390
472
  // METHODS
391
473
  //
474
+
475
+ /**
476
+ @param {SC.View} view
477
+ */
392
478
  scrollToVisible: function(view) {
393
479
  // if no view is passed, do default
394
480
  if (arguments.length === 0) return sc_super();
@@ -418,7 +504,7 @@ SC.MenuScrollView = SC.ScrollView.extend({
418
504
  return this.scrollToRect(vf);
419
505
  },
420
506
 
421
- /**
507
+ /** @private
422
508
  Adjusts the layout for the various internal views. This method is called
423
509
  once when the scroll view is first configured and then anytime a scroller
424
510
  is shown or hidden. You can call this method yourself as well to retile.
@@ -536,6 +622,7 @@ SC.MenuScrollView = SC.ScrollView.extend({
536
622
  this.tile() ; // set up initial tiling
537
623
  },
538
624
 
625
+ /** @private */
539
626
  init: function() {
540
627
  sc_super();
541
628
 
@@ -5,7 +5,22 @@
5
5
  // License: Licensed under MIT license (see license.js)
6
6
  // ==========================================================================
7
7
 
8
- SC.TO_LEFT = "TOLEFT"; SC.TO_RIGHT = "TORIGHT";
8
+ sc_require("views/workspace");
9
+
10
+ /**
11
+ @static
12
+ @type String
13
+ @constant
14
+ */
15
+ SC.TO_LEFT = "TOLEFT";
16
+
17
+ /**
18
+ @static
19
+ @type String
20
+ @constant
21
+ */
22
+ SC.TO_RIGHT = "TORIGHT";
23
+
9
24
 
10
25
  /** @class
11
26
 
@@ -20,26 +35,31 @@ SC.TO_LEFT = "TOLEFT"; SC.TO_RIGHT = "TORIGHT";
20
35
  Of course, this process is animated...
21
36
 
22
37
  @author Alex Iskander
23
- @since SproutCore Quilmes
38
+ @extends SC.WorkspaceView
39
+ @since SproutCore 1.4
24
40
  */
25
-
26
- sc_require("views/workspace");
27
- SC.NavigationView = SC.WorkspaceView.extend({
41
+ SC.NavigationView = SC.WorkspaceView.extend(
42
+ /** @scope SC.NavigationView.prototype */ {
43
+
44
+ /** @private */
28
45
  _views: null,
46
+
47
+ /** @private */
29
48
  _current: null,
30
- navigationContentView: SC.View.extend(),
31
49
 
32
50
  /**
33
- Initializes the NavigationView by creating the view stack.
51
+ @type SC.View
52
+ @default SC.View
34
53
  */
54
+ navigationContentView: SC.View,
55
+
56
+ /** @private */
35
57
  init: function() {
36
58
  sc_super();
37
59
  this._views = [];
38
60
  },
39
61
 
40
- /**
41
- Creates the navigation content view and places it inside the content view.
42
- */
62
+ /** @private */
43
63
  createChildViews: function() {
44
64
  sc_super();
45
65
 
@@ -56,10 +76,7 @@ SC.NavigationView = SC.WorkspaceView.extend({
56
76
  this.contentView.appendChild(content);
57
77
  },
58
78
 
59
- /**
60
- @private
61
- Changes the content of the navigation, updating toolbars, etc., as needed.
62
- */
79
+ /** @private */
63
80
  changeNavigationContent: function(view) {
64
81
  var top = null, bottom = null;
65
82
 
@@ -97,6 +114,8 @@ SC.NavigationView = SC.WorkspaceView.extend({
97
114
 
98
115
  /**
99
116
  Pushes a view into the navigation view stack. The view may have topToolbar and bottomToolbar properties.
117
+
118
+ @param {SC.View} view The view to display
100
119
  */
101
120
  push: function(view) {
102
121
  this._currentDirection = this._current ? SC.TO_LEFT : null;
@@ -109,7 +128,7 @@ SC.NavigationView = SC.WorkspaceView.extend({
109
128
  },
110
129
 
111
130
  /**
112
- Pops a view off the navigation view stack.
131
+ Pops the current view off the navigation view stack.
113
132
  */
114
133
  pop: function() {
115
134
  this._currentDirection = SC.TO_RIGHT;
@@ -123,6 +142,8 @@ SC.NavigationView = SC.WorkspaceView.extend({
123
142
 
124
143
  /**
125
144
  Pops to the specified view on the navigation view stack; the view you pass will become the current view.
145
+
146
+ @param {SC.View} toView The view to display
126
147
  */
127
148
  popToView: function(toView) {
128
149
  this._currentDirection = SC.TO_RIGHT;
@@ -141,7 +162,7 @@ SC.NavigationView = SC.WorkspaceView.extend({
141
162
  this.changeNavigationContent(view);
142
163
  },
143
164
 
144
-
165
+ /** @private */
145
166
  topToolbarDidChange: function() {
146
167
  var active = this.activeTopToolbar, replacement = this.get("topToolbar");
147
168
 
@@ -170,6 +191,7 @@ SC.NavigationView = SC.WorkspaceView.extend({
170
191
  this.invokeOnce("childDidChange");
171
192
  }.observes("topToolbar"),
172
193
 
194
+ /** @private */
173
195
  bottomToolbarDidChange: function() {
174
196
  var active = this.activeBottomToolbar, replacement = this.get("bottomToolbar");
175
197
 
@@ -194,6 +216,7 @@ SC.NavigationView = SC.WorkspaceView.extend({
194
216
  this.invokeOnce("childDidChange");
195
217
  }.observes("topToolbar"),
196
218
 
219
+ /** @private */
197
220
  contentViewDidChange: function() {
198
221
  var active = this.activeNavigationContentView, replacement = this.get("navigationContentView");
199
222
 
@@ -211,6 +234,7 @@ SC.NavigationView = SC.WorkspaceView.extend({
211
234
  this.invokeOnce("childDidChange");
212
235
  }.observes("navigationContentView"),
213
236
 
237
+ /** @private */
214
238
  childDidChange: function() {
215
239
  var replacement = this._pendingBuildIn, active = this._pendingBuildOut;
216
240
  if (active) {
@@ -13,13 +13,13 @@ sc_require("views/toolbar");
13
13
  that handle, well, swiping. In short, they are neat.
14
14
 
15
15
  @extends SC.ToolbarView
16
+ @extends SC.Gesturable
16
17
  @since SproutCore 1.0
17
18
  */
18
- SC.NavigationBarView = SC.ToolbarView.extend(SC.Gesturable, {
19
- gestures: ["swipeGesture"],
20
- swipeGesture: SC.SwipeGesture,
19
+ SC.NavigationBarView = SC.ToolbarView.extend(SC.Gesturable,
20
+ /** @scope SC.NavigationBarView.prototype */{
21
21
 
22
-
22
+ /** @private */
23
23
  init: function() {
24
24
  sc_super();
25
25
 
@@ -31,13 +31,10 @@ SC.NavigationBarView = SC.ToolbarView.extend(SC.Gesturable, {
31
31
  }
32
32
  },
33
33
 
34
- /**
35
- @private
36
- Mixies in animatable and the navigation bar transitions.
37
- */
34
+ /** @private */
38
35
  mixinAnimatable: function() {
39
36
  this.mixin(SC.Animatable);
40
- this.transitions = this.navigationTransitions;
37
+ this.transitions = this.navigationTransitions;
41
38
  },
42
39
 
43
40
  /**
@@ -56,10 +53,18 @@ SC.NavigationBarView = SC.ToolbarView.extend(SC.Gesturable, {
56
53
  opacity: 1
57
54
  },
58
55
 
59
- //
60
- // GESTURE SUPPORT
61
- //
56
+
57
+ // ..........................................................
58
+ // Gesture Support
59
+ //
62
60
 
61
+ /** @private */
62
+ gestures: ["swipeGesture"],
63
+
64
+ /** @private */
65
+ swipeGesture: SC.SwipeGesture,
66
+
67
+ /** @private */
63
68
  swipe: function(gesture, touch, direction) {
64
69
  var lookingFor = (direction === SC.SWIPE_LEFT) ? "isSwipeLeft" : "isSwipeRight",
65
70
  cv = this.get("childViews"),
@@ -80,16 +85,17 @@ SC.NavigationBarView = SC.ToolbarView.extend(SC.Gesturable, {
80
85
 
81
86
  },
82
87
 
83
- //
84
- // BUILD IN/OUT
85
- //
86
88
 
87
- // for various reasons, including the fact that mixing in init is VERY BAD, we do this lazily.
89
+ // ..........................................................
90
+ // View Build Support
91
+ //
92
+
93
+ /** @private */
88
94
  resetBuild: function() {
89
95
  if (!this.isAnimatable) this.mixinAnimatable();
90
96
  },
91
97
 
92
- // callback
98
+ /** @private */
93
99
  didFinishTransition: function() {
94
100
  if (this.isBuildingIn) {
95
101
  // and please continue
@@ -97,6 +103,7 @@ SC.NavigationBarView = SC.ToolbarView.extend(SC.Gesturable, {
97
103
  } else if (this.isBuildingOut) this.buildOutDidFinish();
98
104
  },
99
105
 
106
+ /** @private */
100
107
  preBuildIn: function() {
101
108
  // first, fade this view out
102
109
  this.disableAnimation();
@@ -121,6 +128,7 @@ SC.NavigationBarView = SC.ToolbarView.extend(SC.Gesturable, {
121
128
  }
122
129
  },
123
130
 
131
+ /** @private */
124
132
  buildIn: function() {
125
133
  // first, we do the precursor
126
134
  this.preBuildIn();
@@ -129,6 +137,7 @@ SC.NavigationBarView = SC.ToolbarView.extend(SC.Gesturable, {
129
137
  this.invokeLater("startBuildIn", 10);
130
138
  },
131
139
 
140
+ /** @private */
132
141
  startBuildIn: function() {
133
142
  this.adjust("opacity", 1);
134
143
 
@@ -141,6 +150,7 @@ SC.NavigationBarView = SC.ToolbarView.extend(SC.Gesturable, {
141
150
  }
142
151
  },
143
152
 
153
+ /** @private */
144
154
  buildOut: function() {
145
155
  this.adjust("opacity", 0);
146
156
 
@@ -153,7 +163,7 @@ SC.NavigationBarView = SC.ToolbarView.extend(SC.Gesturable, {
153
163
  }
154
164
  },
155
165
 
156
- /* CHILD VIEWS */
166
+ /** @private */
157
167
  mixinNavigationChild: function(child) {
158
168
  if (child.isAnimatable) return;
159
169