sproutcore 1.0.1003 → 1.0.1008

Sign up to get free protection for your applications and to get access to all the features.
Files changed (276) hide show
  1. data/Buildfile +15 -3
  2. data/Rakefile +3 -7
  3. data/VERSION.yml +2 -2
  4. data/buildtasks/manifest.rake +2 -0
  5. data/frameworks/sproutcore/Buildfile +2 -0
  6. data/frameworks/sproutcore/HISTORY +218 -203
  7. data/frameworks/sproutcore/README +47 -6
  8. data/frameworks/sproutcore/apps/tests/english.lproj/main_page.css +4 -0
  9. data/frameworks/sproutcore/design/Design Charts.graffle +2945 -4332
  10. data/frameworks/sproutcore/frameworks/bootstrap/README +9 -0
  11. data/frameworks/sproutcore/frameworks/bootstrap/core.js +7 -0
  12. data/frameworks/sproutcore/frameworks/bootstrap/setup_body_class_names.js +10 -0
  13. data/frameworks/sproutcore/frameworks/bootstrap/system/browser.js +28 -0
  14. data/frameworks/sproutcore/frameworks/bootstrap/system/loader.js +45 -0
  15. data/frameworks/sproutcore/frameworks/datastore/models/many_attribute.js +9 -8
  16. data/frameworks/sproutcore/frameworks/datastore/models/record.js +49 -9
  17. data/frameworks/sproutcore/frameworks/datastore/models/record_attribute.js +9 -0
  18. data/frameworks/sproutcore/frameworks/datastore/models/single_attribute.js +3 -2
  19. data/frameworks/sproutcore/frameworks/datastore/system/nested_store.js +81 -8
  20. data/frameworks/sproutcore/frameworks/datastore/system/query.js +26 -5
  21. data/frameworks/sproutcore/frameworks/datastore/system/record_array.js +47 -0
  22. data/frameworks/sproutcore/frameworks/datastore/system/store.js +164 -32
  23. data/frameworks/sproutcore/frameworks/datastore/tests/models/many_attribute.js +32 -4
  24. data/frameworks/sproutcore/frameworks/datastore/tests/models/record/error_methods.js +56 -0
  25. data/frameworks/sproutcore/frameworks/datastore/tests/models/record/normalize.js +1 -1
  26. data/frameworks/sproutcore/frameworks/datastore/tests/models/record/unknownProperty.js +15 -0
  27. data/frameworks/sproutcore/frameworks/datastore/tests/models/record/writeAttribute.js +16 -1
  28. data/frameworks/sproutcore/frameworks/datastore/tests/models/record_attribute.js +1 -1
  29. data/frameworks/sproutcore/frameworks/datastore/tests/models/single_attribute.js +22 -1
  30. data/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/chain.js +32 -1
  31. data/frameworks/sproutcore/frameworks/datastore/tests/system/nested_store/core_methods.js +70 -0
  32. data/frameworks/sproutcore/frameworks/datastore/tests/system/query/evaluation.js +12 -0
  33. data/frameworks/sproutcore/frameworks/datastore/tests/system/record_array/error_methods.js +50 -0
  34. data/frameworks/sproutcore/frameworks/datastore/tests/system/store/commitRecord.js +9 -9
  35. data/frameworks/sproutcore/frameworks/datastore/tests/system/store/core_methods.js +8 -1
  36. data/frameworks/sproutcore/frameworks/datastore/tests/system/store/dataHashDidChange.js +79 -0
  37. data/frameworks/sproutcore/frameworks/datastore/tests/system/store/dataSourceCallbacks.js +24 -0
  38. data/frameworks/sproutcore/frameworks/datastore/tests/system/store/error_methods.js +62 -0
  39. data/frameworks/sproutcore/frameworks/datastore/tests/system/store/init.js +2 -0
  40. data/frameworks/sproutcore/frameworks/debug/core.js +10 -6
  41. data/frameworks/sproutcore/frameworks/designer/controllers/page_design.js +43 -18
  42. data/frameworks/sproutcore/frameworks/designer/core.js +10 -0
  43. data/frameworks/sproutcore/frameworks/designer/english.lproj/selection_handles.css +58 -0
  44. data/frameworks/sproutcore/frameworks/designer/{views/mixins → mixins}/button.js +0 -0
  45. data/frameworks/sproutcore/frameworks/designer/views/{controls/button.js → button.js} +6 -2
  46. data/frameworks/sproutcore/frameworks/designer/views/designer.js +566 -136
  47. data/frameworks/sproutcore/frameworks/designer/views/selection_handles.js +77 -0
  48. data/frameworks/sproutcore/frameworks/desktop/core.js +12 -0
  49. data/frameworks/sproutcore/frameworks/desktop/english.lproj/alert.css +1 -1
  50. data/frameworks/sproutcore/frameworks/desktop/english.lproj/drag.css +3 -2
  51. data/frameworks/sproutcore/frameworks/desktop/english.lproj/list_item.css +0 -36
  52. data/frameworks/sproutcore/frameworks/desktop/english.lproj/menu.css +14 -0
  53. data/frameworks/sproutcore/frameworks/desktop/english.lproj/modal.css +4 -0
  54. data/frameworks/sproutcore/frameworks/desktop/english.lproj/slider.css +2 -0
  55. data/frameworks/sproutcore/frameworks/desktop/english.lproj/tab.css +0 -4
  56. data/frameworks/sproutcore/frameworks/desktop/mixins/collection_view_delegate.js +8 -5
  57. data/frameworks/sproutcore/frameworks/desktop/panes/alert.js +2 -2
  58. data/frameworks/sproutcore/frameworks/desktop/panes/menu.js +100 -111
  59. data/frameworks/sproutcore/frameworks/desktop/panes/panel.js +1 -1
  60. data/frameworks/sproutcore/frameworks/desktop/panes/picker.js +51 -13
  61. data/frameworks/sproutcore/frameworks/desktop/panes/{drop_down.js → select_button.js} +70 -109
  62. data/frameworks/sproutcore/frameworks/desktop/panes/sheet.js +8 -0
  63. data/frameworks/sproutcore/frameworks/desktop/system/root_responder.js +69 -23
  64. data/frameworks/sproutcore/frameworks/desktop/system/undo_manager.js +4 -4
  65. data/frameworks/sproutcore/frameworks/desktop/tests/panes/menu/methods.js +2 -0
  66. data/frameworks/sproutcore/frameworks/desktop/tests/panes/{dropDown → select_button}/methods.js +15 -11
  67. data/frameworks/sproutcore/frameworks/desktop/tests/panes/{dropDown → select_button}/ui.js +22 -22
  68. data/frameworks/sproutcore/frameworks/desktop/tests/views/button/methods.js +1 -1
  69. data/frameworks/sproutcore/frameworks/desktop/tests/views/checkbox/methods.js +0 -1
  70. data/frameworks/sproutcore/frameworks/desktop/tests/views/collection/deleteSelection.js +1 -1
  71. data/frameworks/sproutcore/frameworks/desktop/tests/views/collection/deselect.js +19 -3
  72. data/frameworks/sproutcore/frameworks/desktop/tests/views/collection/itemViewForContentIndex.js +1 -1
  73. data/frameworks/sproutcore/frameworks/desktop/tests/views/collection/mouse.js +53 -28
  74. data/frameworks/sproutcore/frameworks/desktop/tests/views/collection/select.js +6 -6
  75. data/frameworks/sproutcore/frameworks/desktop/tests/views/collection/selectNextItem.js +23 -9
  76. data/frameworks/sproutcore/frameworks/desktop/tests/views/collection/selectPreviousItem.js +24 -10
  77. data/frameworks/sproutcore/frameworks/desktop/tests/views/list/rowHeightForContentIndex.js +1 -1
  78. data/frameworks/sproutcore/frameworks/desktop/tests/views/list/ui_row_heights.js +1 -1
  79. data/frameworks/sproutcore/frameworks/desktop/tests/views/progress/ui.js +10 -3
  80. data/frameworks/sproutcore/frameworks/desktop/tests/views/radio/methods.js +1 -1
  81. data/frameworks/sproutcore/frameworks/desktop/tests/views/scroll/ui.js +50 -28
  82. data/frameworks/sproutcore/frameworks/desktop/tests/views/scroller/methods.js +6 -6
  83. data/frameworks/sproutcore/frameworks/desktop/tests/views/segmented/methods.js +3 -3
  84. data/frameworks/sproutcore/frameworks/desktop/tests/views/segmented/ui.js +8 -8
  85. data/frameworks/sproutcore/frameworks/desktop/tests/views/select_field/methods.js +1 -1
  86. data/frameworks/sproutcore/frameworks/desktop/tests/views/tab/methods.js +1 -1
  87. data/frameworks/sproutcore/frameworks/desktop/views/button.js +5 -3
  88. data/frameworks/sproutcore/frameworks/desktop/views/checkbox.js +4 -3
  89. data/frameworks/sproutcore/frameworks/desktop/views/collection.js +125 -96
  90. data/frameworks/sproutcore/frameworks/desktop/views/grid.js +1 -0
  91. data/frameworks/sproutcore/frameworks/desktop/views/list.js +68 -18
  92. data/frameworks/sproutcore/frameworks/desktop/views/list_item.js +134 -56
  93. data/frameworks/sproutcore/frameworks/desktop/views/menu_item.js +18 -11
  94. data/frameworks/sproutcore/frameworks/desktop/views/menu_scroll.js +562 -2
  95. data/frameworks/sproutcore/frameworks/desktop/views/popup_button.js +13 -0
  96. data/frameworks/sproutcore/frameworks/desktop/views/progress.js +11 -8
  97. data/frameworks/sproutcore/frameworks/desktop/views/radio.js +7 -7
  98. data/frameworks/sproutcore/frameworks/desktop/views/scroll.js +99 -33
  99. data/frameworks/sproutcore/frameworks/desktop/views/scroller.js +3 -7
  100. data/frameworks/sproutcore/frameworks/desktop/views/segmented.js +0 -7
  101. data/frameworks/sproutcore/frameworks/desktop/views/separator.js +2 -3
  102. data/frameworks/sproutcore/frameworks/desktop/views/slider.js +0 -8
  103. data/frameworks/sproutcore/frameworks/desktop/views/source_list_group.js +1 -1
  104. data/frameworks/sproutcore/frameworks/desktop/views/split.js +27 -7
  105. data/frameworks/sproutcore/frameworks/desktop/views/tab.js +2 -6
  106. data/frameworks/sproutcore/frameworks/foundation/controllers/array.js +15 -10
  107. data/frameworks/sproutcore/frameworks/foundation/controllers/tree.js +20 -1
  108. data/frameworks/sproutcore/frameworks/foundation/debug/control_test_pane.js +1 -1
  109. data/frameworks/sproutcore/frameworks/foundation/english.lproj/bootstrap.rhtml +3 -6
  110. data/frameworks/sproutcore/frameworks/foundation/english.lproj/button_view.css +3 -0
  111. data/frameworks/sproutcore/frameworks/foundation/english.lproj/core.css +8 -0
  112. data/frameworks/sproutcore/frameworks/foundation/english.lproj/inline_editor.css +12 -0
  113. data/frameworks/sproutcore/frameworks/foundation/english.lproj/label.css +11 -0
  114. data/frameworks/sproutcore/frameworks/foundation/english.lproj/text_field.css +13 -0
  115. data/frameworks/sproutcore/frameworks/foundation/mixins/button.js +1 -2
  116. data/frameworks/sproutcore/frameworks/foundation/mixins/inline_text_field.js +70 -21
  117. data/frameworks/sproutcore/frameworks/foundation/mixins/selection_support.js +88 -54
  118. data/frameworks/sproutcore/frameworks/foundation/mixins/static_layout.js +0 -25
  119. data/frameworks/sproutcore/frameworks/foundation/mixins/string.js +23 -2
  120. data/frameworks/sproutcore/frameworks/foundation/panes/pane.js +34 -23
  121. data/frameworks/sproutcore/frameworks/foundation/private/tree_item_observer.js +20 -0
  122. data/frameworks/sproutcore/frameworks/foundation/system/benchmark.js +32 -23
  123. data/frameworks/sproutcore/frameworks/foundation/system/browser.js +2 -2
  124. data/frameworks/sproutcore/frameworks/foundation/system/bundle.js +77 -15
  125. data/frameworks/sproutcore/frameworks/foundation/system/core_query.js +5 -4
  126. data/frameworks/sproutcore/frameworks/foundation/system/cursor.js +1 -1
  127. data/frameworks/sproutcore/frameworks/foundation/system/render_context.js +22 -7
  128. data/frameworks/sproutcore/frameworks/foundation/system/request.js +466 -309
  129. data/frameworks/sproutcore/frameworks/foundation/system/responder.js +2 -1
  130. data/frameworks/sproutcore/frameworks/foundation/system/response.js +457 -0
  131. data/frameworks/sproutcore/frameworks/foundation/system/root_responder.js +66 -15
  132. data/frameworks/sproutcore/frameworks/foundation/system/routes.js +4 -4
  133. data/frameworks/sproutcore/frameworks/foundation/system/timer.js +6 -4
  134. data/frameworks/sproutcore/frameworks/foundation/system/utils.js +46 -8
  135. data/frameworks/sproutcore/frameworks/foundation/tests/controllers/array/array_case.js +17 -0
  136. data/frameworks/sproutcore/frameworks/foundation/tests/controllers/array/enum_case.js +18 -5
  137. data/frameworks/sproutcore/frameworks/foundation/tests/controllers/array/null_case.js +1 -1
  138. data/frameworks/sproutcore/frameworks/foundation/tests/mixins/staticLayout.js +0 -2
  139. data/frameworks/sproutcore/frameworks/foundation/tests/mixins/string.js +11 -0
  140. data/frameworks/sproutcore/frameworks/foundation/tests/private/tree_item_observer/group_case.js +14 -14
  141. data/frameworks/sproutcore/frameworks/foundation/tests/system/builder.js +2 -2
  142. data/frameworks/sproutcore/frameworks/foundation/tests/system/core_query/jquery_core.js +15 -3
  143. data/frameworks/sproutcore/frameworks/foundation/tests/system/datetime.js +1 -1
  144. data/frameworks/sproutcore/frameworks/foundation/tests/system/locale.js +8 -7
  145. data/frameworks/sproutcore/frameworks/foundation/tests/system/render_context/tag.js +3 -2
  146. data/frameworks/sproutcore/frameworks/foundation/tests/system/request.js +51 -44
  147. data/frameworks/sproutcore/frameworks/foundation/tests/system/root_responder/targetForAction.js +2 -2
  148. data/frameworks/sproutcore/frameworks/foundation/tests/system/timer/isPaused.js +4 -4
  149. data/frameworks/sproutcore/frameworks/foundation/tests/system/timer/performAction.js +2 -0
  150. data/frameworks/sproutcore/frameworks/foundation/tests/validators/credit_card.js +9 -9
  151. data/frameworks/sproutcore/frameworks/foundation/tests/validators/number.js +2 -2
  152. data/frameworks/sproutcore/frameworks/foundation/tests/views/container/ui.js +3 -3
  153. data/frameworks/sproutcore/frameworks/foundation/tests/views/image/ui.js +10 -3
  154. data/frameworks/sproutcore/frameworks/foundation/tests/views/label/ui.js +2 -2
  155. data/frameworks/sproutcore/frameworks/foundation/tests/views/pane/append_remove.js +14 -0
  156. data/frameworks/sproutcore/frameworks/foundation/tests/views/text_field/methods.js +5 -5
  157. data/frameworks/sproutcore/frameworks/foundation/tests/views/text_field/ui.js +1 -11
  158. data/frameworks/sproutcore/frameworks/foundation/tests/views/view/clippingFrame.js +2 -2
  159. data/frameworks/sproutcore/frameworks/foundation/tests/views/view/destroyLayer.js +2 -4
  160. data/frameworks/sproutcore/frameworks/foundation/tests/views/view/findLayerInParentLayer.js +2 -4
  161. data/frameworks/sproutcore/frameworks/foundation/tests/views/view/insertBefore.js +1 -1
  162. data/frameworks/sproutcore/frameworks/foundation/tests/views/view/layoutStyle.js +0 -2
  163. data/frameworks/sproutcore/frameworks/foundation/validators/password.js +5 -5
  164. data/frameworks/sproutcore/frameworks/foundation/validators/validator.js +4 -2
  165. data/frameworks/sproutcore/frameworks/foundation/views/field.js +5 -8
  166. data/frameworks/sproutcore/frameworks/foundation/views/label.js +21 -5
  167. data/frameworks/sproutcore/frameworks/foundation/views/text_field.js +112 -69
  168. data/frameworks/sproutcore/frameworks/foundation/views/view.js +67 -6
  169. data/frameworks/sproutcore/frameworks/runtime/core.js +51 -2
  170. data/frameworks/sproutcore/frameworks/runtime/mixins/observable.js +4 -1
  171. data/frameworks/sproutcore/frameworks/runtime/system/binding.js +2 -1
  172. data/frameworks/sproutcore/frameworks/runtime/system/enumerator.js +5 -4
  173. data/frameworks/sproutcore/frameworks/runtime/system/index_set.js +6 -1
  174. data/frameworks/sproutcore/frameworks/runtime/system/logger.js +408 -0
  175. data/frameworks/sproutcore/frameworks/runtime/system/object.js +15 -4
  176. data/frameworks/sproutcore/frameworks/runtime/system/selection_set.js +30 -2
  177. data/frameworks/sproutcore/frameworks/runtime/tests/core/IsEqual.js +5 -1
  178. data/frameworks/sproutcore/frameworks/runtime/tests/core/beget.js +1 -1
  179. data/frameworks/sproutcore/frameworks/runtime/tests/core/compare.js +3 -3
  180. data/frameworks/sproutcore/frameworks/runtime/tests/core/guidFor.js +2 -0
  181. data/frameworks/sproutcore/frameworks/runtime/tests/core/isArray.js +1 -1
  182. data/frameworks/sproutcore/frameworks/runtime/tests/core/itemType.js +2 -1
  183. data/frameworks/sproutcore/frameworks/runtime/tests/core/tupleForPropertyPath.js +2 -2
  184. data/frameworks/sproutcore/frameworks/runtime/tests/mixins/observable/propertyChanges.js +1 -1
  185. data/frameworks/sproutcore/frameworks/runtime/tests/mixins/propertyChanges.js +1 -0
  186. data/frameworks/sproutcore/frameworks/runtime/tests/system/binding.js +11 -7
  187. data/frameworks/sproutcore/frameworks/runtime/tests/system/error.js +3 -2
  188. data/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/add.js +18 -1
  189. data/frameworks/sproutcore/frameworks/runtime/tests/system/index_set/remove.js +1 -1
  190. data/frameworks/sproutcore/frameworks/runtime/tests/system/logger.js +165 -0
  191. data/frameworks/sproutcore/frameworks/runtime/tests/system/object/bindings.js +3 -0
  192. data/frameworks/sproutcore/frameworks/runtime/tests/system/selection_set/copy.js +1 -1
  193. data/frameworks/sproutcore/frameworks/runtime/tests/system/selection_set/indexSetForSource.js +13 -0
  194. data/frameworks/sproutcore/frameworks/runtime/tests/system/selection_set/remove.js +24 -0
  195. data/frameworks/sproutcore/frameworks/runtime/tests/system/sparse_array.js +32 -13
  196. data/frameworks/sproutcore/frameworks/testing/english.lproj/runner.css +2 -2
  197. data/frameworks/sproutcore/frameworks/testing/english.lproj/testsuite.css +7 -2
  198. data/frameworks/sproutcore/lib/index.rhtml +6 -20
  199. data/frameworks/sproutcore/themes/standard_theme/Source/sc-theme-repeat-x.psd +0 -0
  200. data/frameworks/sproutcore/themes/standard_theme/english.lproj/button.css +0 -1
  201. data/frameworks/sproutcore/themes/standard_theme/english.lproj/checkbox.css +5 -4
  202. data/frameworks/sproutcore/themes/standard_theme/english.lproj/collection.css +4 -3
  203. data/frameworks/sproutcore/themes/standard_theme/english.lproj/disclosure.css +7 -7
  204. data/frameworks/sproutcore/themes/standard_theme/english.lproj/images/sc-theme-repeat-x.png +0 -0
  205. data/frameworks/sproutcore/themes/standard_theme/english.lproj/list_item.css +38 -0
  206. data/frameworks/sproutcore/themes/standard_theme/english.lproj/menu.css +20 -0
  207. data/frameworks/sproutcore/themes/standard_theme/english.lproj/progress.css +1 -0
  208. data/frameworks/sproutcore/themes/standard_theme/english.lproj/radio.css +3 -1
  209. data/frameworks/sproutcore/themes/standard_theme/english.lproj/segmented.css +1 -0
  210. data/frameworks/sproutcore/themes/standard_theme/english.lproj/split_view.css +1 -1
  211. data/frameworks/sproutcore/themes/standard_theme/english.lproj/text_field.css +0 -15
  212. data/gen/data-source/Buildfile +18 -0
  213. data/gen/data-source/README +1 -0
  214. data/gen/data-source/USAGE +15 -0
  215. data/gen/data-source/templates/data_sources/@filename@.js +64 -0
  216. data/lib/sproutcore/builders/combine.rb +23 -0
  217. data/lib/sproutcore/builders/javascript.rb +27 -2
  218. data/lib/sproutcore/buildfile/task.rb +1 -1
  219. data/lib/sproutcore/helpers/entry_sorter.rb +2 -2
  220. data/lib/sproutcore/helpers/static_helper.rb +79 -0
  221. data/lib/sproutcore/models/manifest.rb +2 -2
  222. data/lib/sproutcore/models/target.rb +1 -1
  223. data/lib/sproutcore/tools/build.rb +1 -1
  224. data/lib/sproutcore/tools/docs.rb +3 -3
  225. data/lib/sproutcore/tools/gen.rb +17 -15
  226. data/lib/sproutcore/tools/manifest.rb +9 -9
  227. data/lib/sproutcore/tools/server.rb +3 -3
  228. data/lib/sproutcore/tools.rb +259 -250
  229. data/lib/sproutcore.rb +9 -1
  230. data/spec/buildtasks/manifest/prepare_build_tasks/combine_spec.rb +2 -2
  231. data/spec/fixtures/entry_for_project/frameworks/unrelated/PLACEHOLDER +0 -0
  232. data/spec/fixtures/ordered_entries/apps/no_requires/{lproj → english.lproj}/strings.js +0 -0
  233. data/spec/fixtures/ordered_entries/apps/no_requires/main.js +1 -0
  234. data/spec/fixtures/ordered_entries/apps/no_requires/resources/main_page.js +1 -0
  235. data/spec/fixtures/ordered_entries/apps/no_requires/t.js +1 -0
  236. data/spec/lib/models/manifest/find_entry.rb +12 -0
  237. data/spec/lib/tools/gen_spec.rb +1 -0
  238. data/spec/lib/tools/tools_spec.rb +1 -0
  239. data/sproutcore-abbot.gemspec +36 -44
  240. metadata +43 -44
  241. data/frameworks/sproutcore/frameworks/desktop/english.lproj/images/indicator.gif +0 -0
  242. data/frameworks/sproutcore/frameworks/desktop/english.lproj/images/sc-theme-sprite.png +0 -0
  243. data/frameworks/sproutcore/frameworks/desktop/english.lproj/images/sticky-note.png +0 -0
  244. data/frameworks/sproutcore/frameworks/desktop/views/form.js +0 -594
  245. data/frameworks/sproutcore/themes/standard_theme/english.lproj/images/sc-theme-sprite.png +0 -0
  246. data/lib/thor/CHANGELOG.rdoc +0 -52
  247. data/lib/thor/LICENSE +0 -20
  248. data/lib/thor/README.markdown +0 -76
  249. data/lib/thor/Rakefile +0 -6
  250. data/lib/thor/Thorfile +0 -45
  251. data/lib/thor/bin/rake2thor +0 -83
  252. data/lib/thor/bin/thor +0 -7
  253. data/lib/thor/lib/thor/error.rb +0 -3
  254. data/lib/thor/lib/thor/options.rb +0 -267
  255. data/lib/thor/lib/thor/ordered_hash.rb +0 -64
  256. data/lib/thor/lib/thor/runner.rb +0 -305
  257. data/lib/thor/lib/thor/task.rb +0 -83
  258. data/lib/thor/lib/thor/task_hash.rb +0 -22
  259. data/lib/thor/lib/thor/tasks/package.rb +0 -18
  260. data/lib/thor/lib/thor/tasks.rb +0 -77
  261. data/lib/thor/lib/thor/util.rb +0 -75
  262. data/lib/thor/lib/thor.rb +0 -170
  263. data/lib/thor/script/destroy +0 -14
  264. data/lib/thor/script/generate +0 -14
  265. data/lib/thor/spec/fixtures/task.thor +0 -10
  266. data/lib/thor/spec/options_spec.rb +0 -271
  267. data/lib/thor/spec/ordered_hash_spec.rb +0 -84
  268. data/lib/thor/spec/spec.opts +0 -1
  269. data/lib/thor/spec/spec_helper.rb +0 -30
  270. data/lib/thor/spec/task_spec.rb +0 -11
  271. data/lib/thor/spec/tasks_spec.rb +0 -28
  272. data/lib/thor/spec/thor_runner_spec.rb +0 -194
  273. data/lib/thor/spec/thor_spec.rb +0 -206
  274. data/lib/thor/spec/util_spec.rb +0 -99
  275. data/lib/thor/task.thor +0 -15
  276. data/lib/thor/thor.gemspec +0 -29
@@ -338,7 +338,6 @@ SC.RootResponder = SC.RootResponder.extend(
338
338
  },
339
339
 
340
340
  dragDidStart: function(drag) {
341
- // console.log('dragDidStart called in %@ with %@'.fmt(this, drag));
342
341
  this._mouseDownView = drag ;
343
342
  this._drag = drag ;
344
343
  },
@@ -394,6 +393,11 @@ SC.RootResponder = SC.RootResponder.extend(
394
393
  the keypress event.
395
394
  */
396
395
  keydown: function(evt) {
396
+ // This code is to check for the simulated keypressed event
397
+ if(!evt.kindOf) this._ffevt=null;
398
+ else evt=this._ffevt;
399
+ if (evt === null) return YES;
400
+
397
401
  // Firefox does NOT handle delete here...
398
402
  if (SC.browser.mozilla > 0 && (evt.which === 8)) return true ;
399
403
 
@@ -401,13 +405,25 @@ SC.RootResponder = SC.RootResponder.extend(
401
405
  // send event for modifier key changes, but only stop processing if this
402
406
  // is only a modifier change
403
407
  var ret = this._handleModifierChanges(evt);
404
- if (this._isModifierKey(evt)) return ret;
408
+ var target = evt.target || evt.srcElement;
409
+ var forceBlock = (evt.which === 8) && !SC.allowsBackspaceToPreviousPage && (target === document.body);
410
+
411
+ if (this._isModifierKey(evt)) return (forceBlock ? NO : ret);
405
412
 
406
413
  // if this is a function or non-printable key, try to use this as a key
407
414
  // equivalent. Otherwise, send as a keyDown event so that the focused
408
415
  // responder can do something useful with the event.
416
+ ret = YES ;
409
417
  if (this._isFunctionOrNonPrintableKey(evt)) {
410
-
418
+ // Simulate keydown events for firefox since keypress only triggers once
419
+ // We don't do it in keypress as it doesn't work in certain cases, ie.
420
+ // Caret is at last position and you press down arrow key.
421
+ if (SC.browser.mozilla && evt.keyCode>=37 && evt.keyCode<=40){
422
+ this._ffevt=evt;
423
+ SC.RunLoop.begin();
424
+ this.invokeLater(this.keydown, 50);
425
+ SC.RunLoop.end();
426
+ }
411
427
  // otherwise, send as keyDown event. If no one was interested in this
412
428
  // keyDown event (probably the case), just let the browser do its own
413
429
  // processing.
@@ -415,14 +431,14 @@ SC.RootResponder = SC.RootResponder.extend(
415
431
 
416
432
  // attempt key equivalent if key not handled
417
433
  if (!ret) {
418
- ret = this.attemptKeyEquivalent(evt) ;
419
- return !ret ;
434
+ ret = !this.attemptKeyEquivalent(evt) ;
420
435
  } else {
421
- return evt.hasCustomEventHandling ;
436
+ ret = evt.hasCustomEventHandling ;
437
+ if (ret) forceBlock = NO ; // code asked explicitly to let delete go
422
438
  }
423
439
  }
424
-
425
- return YES ; // otherwise do not handle keydown - wait for keypress
440
+
441
+ return forceBlock ? NO : ret ;
426
442
  },
427
443
 
428
444
  /** @private
@@ -434,9 +450,12 @@ SC.RootResponder = SC.RootResponder.extend(
434
450
  trigger a keyDown.
435
451
  */
436
452
  keypress: function(evt) {
453
+ var ret ;
454
+
437
455
  // delete is handled in keydown() for most browsers
438
456
  if (SC.browser.mozilla > 0 && (evt.which === 8)) {
439
- return this.sendEvent('keyDown', evt) ? evt.hasCustomEventHandling:YES;
457
+ ret = this.sendEvent('keyDown', evt);
458
+ return ret ? (SC.allowsBackspaceToPreviousPage || evt.hasCustomEventHandling) : YES ;
440
459
 
441
460
  // normal processing. send keyDown for printable keys...
442
461
  } else {
@@ -446,6 +465,8 @@ SC.RootResponder = SC.RootResponder.extend(
446
465
  },
447
466
 
448
467
  keyup: function(evt) {
468
+ // to end the simulation of keypress in firefox set the _ffevt to null
469
+ if(this._ffevt) this._ffevt=null;
449
470
  // modifier keys are handled separately by the 'flagsChanged' event
450
471
  // send event for modifier key changes, but only stop processing if this is only a modifier change
451
472
  var ret = this._handleModifierChanges(evt);
@@ -458,7 +479,10 @@ SC.RootResponder = SC.RootResponder.extend(
458
479
  // make sure the window gets focus no matter what. FF is inconsistant
459
480
  // about this.
460
481
  this.focus();
461
-
482
+ if(SC.browser.msie) {
483
+ this._lastMouseDownX = evt.clientX;
484
+ this._lastMouseDownY = evt.clientY;
485
+ }
462
486
  // first, save the click count. Click count resets if your down is
463
487
  // more than 125msec after you last click up.
464
488
  this._clickCount += 1 ;
@@ -468,11 +492,22 @@ SC.RootResponder = SC.RootResponder.extend(
468
492
  evt.clickCount = this._clickCount ;
469
493
 
470
494
  var view = this.targetViewForEvent(evt) ;
495
+ // InlineTextField needs to loose firstResponder whenever you click outside
496
+ // the view. This is a special case as textfields are not supposed to loose
497
+ // focus unless you click on a list, another textfield or an special
498
+ // view/control.
499
+ var fr=null;
500
+ if(view) fr=view.get('pane').get('firstResponder');
501
+
502
+ if(fr && fr.kindOf(SC.InlineTextFieldView) && fr!==view){
503
+ fr.resignFirstResponder();
504
+ }
505
+
471
506
  view = this._mouseDownView = this.sendEvent('mouseDown', evt, view) ;
472
507
  if (view && view.respondsTo('mouseDragged')) this._mouseCanDrag = YES ;
473
508
  } catch (e) {
474
509
 
475
- console.log('Exception during mousedown: %@'.fmt(e)) ;
510
+ console.warn('Exception during mousedown: %@'.fmt(e)) ;
476
511
  this._mouseDownView = null ;
477
512
  this._mouseCanDrag = NO ;
478
513
  throw e;
@@ -489,7 +524,7 @@ SC.RootResponder = SC.RootResponder.extend(
489
524
  sent.
490
525
  */
491
526
  mouseup: function(evt) {
492
- // console.log('mouseup called in %@ with this._mouseDownView = %@'.fmt(this, this._mouseDownView));
527
+
493
528
  try {
494
529
  if (this._drag) {
495
530
  this._drag.tryToPerform('mouseUp', evt) ;
@@ -536,7 +571,6 @@ SC.RootResponder = SC.RootResponder.extend(
536
571
  // cleanup
537
572
  this._mouseCanDrag = NO; this._mouseDownView = null ;
538
573
  } catch (e) {
539
- console.log('Exception during mouseup: %@'.fmt(e)) ;
540
574
  this._drag = null; this._mouseCanDrag = NO; this._mouseDownView = null ;
541
575
  throw e;
542
576
  }
@@ -556,7 +590,6 @@ SC.RootResponder = SC.RootResponder.extend(
556
590
  var view = this.targetViewForEvent(evt) ;
557
591
  var handler = this.sendEvent('mouseWheel', evt, view) ;
558
592
  } catch (e) {
559
- console.log('Exception during mousewheel: %@'.fmt(e)) ;
560
593
  throw e;
561
594
  }
562
595
  return (handler) ? evt.hasCustomEventHandling : YES ;
@@ -565,10 +598,10 @@ SC.RootResponder = SC.RootResponder.extend(
565
598
  _lastHovered: null,
566
599
 
567
600
  /**
568
- This will send mouseOver, mouseOut, and mouseMoved to the views you
569
- hover over. To receive these events, you must implement the method.
570
- If any subviews implement them and return true, then you won't receive
571
- any notices.
601
+ This will send mouseEntered, mouseExited, mousedDragged and mouseMoved
602
+ to the views you hover over. To receive these events, you must implement
603
+ the method. If any subviews implement them and return true, then you won't
604
+ receive any notices.
572
605
 
573
606
  If there is a target mouseDown view, then mouse moved events will also
574
607
  trigger calls to mouseDragged.
@@ -584,7 +617,15 @@ SC.RootResponder = SC.RootResponder.extend(
584
617
  // only do mouse[Moved|Entered|Exited|Dragged] if not in a drag session
585
618
  // drags send their own events, e.g. drag[Moved|Entered|Exited]
586
619
  if (this._drag) {
587
- this._drag.tryToPerform('mouseDragged', evt);
620
+ //IE triggers mousemove at the same time as mousedown
621
+ if(SC.browser.msie){
622
+ if (this._lastMouseDownX !== evt.clientX && this._lastMouseDownY !== evt.clientY) {
623
+ this._drag.tryToPerform('mouseDragged', evt);
624
+ }
625
+ }
626
+ else {
627
+ this._drag.tryToPerform('mouseDragged', evt);
628
+ }
588
629
  } else {
589
630
 
590
631
  var lh = this._lastHovered || [] ;
@@ -619,12 +660,17 @@ SC.RootResponder = SC.RootResponder.extend(
619
660
  // also, if a mouseDownView exists, call the mouseDragged action, if
620
661
  // it exists.
621
662
  if (this._mouseDownView) {
622
- this._mouseDownView.tryToPerform('mouseDragged', evt);
663
+ if(SC.browser.msie){
664
+ if (this._lastMouseDownX !== evt.clientX && this._lastMouseDownY !== evt.clientY) {
665
+ this._mouseDownView.tryToPerform('mouseDragged', evt);
666
+ }
667
+ }
668
+ else {
669
+ this._mouseDownView.tryToPerform('mouseDragged', evt);
670
+ }
623
671
  }
624
-
625
672
  }
626
673
  } catch (e) {
627
- console.log('Exception during mousemove: %@'.fmt(e)) ;
628
674
  throw e;
629
675
  }
630
676
  SC.RunLoop.end();
@@ -639,7 +685,7 @@ SC.RootResponder = SC.RootResponder.extend(
639
685
 
640
686
  selectstart: function(evt) {
641
687
  var result = this.sendEvent('selectStart', evt, this.targetViewForEvent(evt));
642
- return (result !=null ? YES: NO) && (this._mouseCanDrag ? NO : YES);
688
+ return (result !==null ? YES: NO) && (this._mouseCanDrag ? NO : YES);
643
689
  },
644
690
 
645
691
  drag: function() { return false; }
@@ -38,7 +38,7 @@ SC.UndoManager = SC.Object.extend(
38
38
 
39
39
  */
40
40
  undoActionName: function() {
41
- return (this.undoStack) ? this.undoStack.name : null ;
41
+ return this.undoStack ? this.undoStack.name : null ;
42
42
  }.property('undoStack'),
43
43
 
44
44
  /**
@@ -48,7 +48,7 @@ SC.UndoManager = SC.Object.extend(
48
48
 
49
49
  */
50
50
  redoActionName: function() {
51
- return (this.redoStack) ? this.redoStack.name : null ;
51
+ return this.redoStack ? this.redoStack.name : null ;
52
52
  }.property('redoStack'),
53
53
 
54
54
  /**
@@ -132,7 +132,7 @@ SC.UndoManager = SC.Object.extend(
132
132
 
133
133
  // otherwise, create a new active group.
134
134
  } else {
135
- var stack = (this.isUndoing) ? 'redoStack' : 'undoStack' ;
135
+ var stack = this.isUndoing ? 'redoStack' : 'undoStack' ;
136
136
  this._activeGroup = { name: name, actions: [], prev: this.get(stack) } ;
137
137
  this.set(stack, this._activeGroup) ;
138
138
  this.groupingLevel = 1 ;
@@ -150,7 +150,7 @@ SC.UndoManager = SC.Object.extend(
150
150
  } else {
151
151
  this._activeGroup = null ; this.groupingLevel = 0 ;
152
152
  }
153
- this.propertyDidChange((this.isUndoing) ? 'redoStack' : 'undoStack') ;
153
+ this.propertyDidChange(this.isUndoing ? 'redoStack' : 'undoStack') ;
154
154
  },
155
155
 
156
156
  /**
@@ -39,6 +39,7 @@ module('SC.MenuPane#MenuItemTargetIsSet', {
39
39
  });
40
40
 
41
41
  test("Menu sets item target.", function() {
42
+ menu.get('displayItems');
42
43
  menu.append(); // force a rendering of the menu item child views
43
44
  var target = menu.menuItemViews[0].get('target'); // see if the target propagated through
44
45
  menu.remove(); // remove the menu
@@ -47,6 +48,7 @@ test("Menu sets item target.", function() {
47
48
  });
48
49
 
49
50
  test("Menu sets MenuItem.contentCheckboxKey.", function() {
51
+ menu.get('displayItems');
50
52
  menu.append();
51
53
  var key = menu.menuItemViews[0].get('contentCheckboxKey');
52
54
  menu.remove();
@@ -7,9 +7,9 @@
7
7
 
8
8
  /*global module test htmlbody ok equals same stop start */
9
9
 
10
- var pane, view , view1, view2, view3 ;
10
+ var pane, view , view1, view2, view3, view4 ;
11
11
 
12
- module("SC.DropDownMenu",{
12
+ module("SC.SelectButtonView",{
13
13
 
14
14
  //setup
15
15
  setup: function() {
@@ -19,31 +19,35 @@ module("SC.DropDownMenu",{
19
19
  //pane
20
20
  pane = SC.MainPane.create({
21
21
  objs : ["Around","The","World"],
22
+ objs2 : [{ title: "Around", pos: 3},
23
+ { title: "The", pos: 1},
24
+ { title: "World", pos: 2 },
25
+ { title: "Again", pos: 4}],
22
26
  selectedValue: "World",
23
27
  isDue: YES,
24
28
  childViews: [
25
29
 
26
30
  //view1
27
- SC.DropDownMenu.extend({
31
+ SC.SelectButtonView.extend({
28
32
  objects: ["To","Back", "You"],
29
33
  disableSort: NO
30
34
  }),
31
35
 
32
36
  //view2
33
- SC.DropDownMenu.extend({
37
+ SC.SelectButtonView.extend({
34
38
  objects: ["Drop","Down", "Menu"]
35
39
  }),
36
40
 
37
41
  //view3
38
- SC.DropDownMenu.extend({
42
+ SC.SelectButtonView.extend({
39
43
  objectsBinding: '*owner.objs',
40
44
  valueBinding: '*owner.selectedValue',
41
45
  isVisibleBinding: '*owner.isDue'
42
46
  }),
43
47
 
44
48
  //view4
45
- SC.DropDownMenu.extend({
46
- objectsBinding: '*owner.objs',
49
+ SC.SelectButtonView.extend({
50
+ objectsBinding: '*owner.objs2',
47
51
  valueBinding: '*owner.selectedValue',
48
52
  valueKey: 'title',
49
53
  nameKey: 'title',
@@ -91,10 +95,10 @@ test("Check if isVisibleBinding works", function() {
91
95
  });
92
96
 
93
97
  //test4
94
- test("DropDownMenu with objects", function() {
95
- equals(3,view1.objects.length,'The number of options in dropDown Menu should be') ;
96
- equals(null,view1.nameKey,'the dropDownMenu should not have any name key') ;
97
- equals(null,view1.valueKey,'the dropDownMenu should not have any value key') ;
98
+ test("SelectButton with objects", function() {
99
+ equals(3,view1.objects.length,'The number of options in selectButton Menu should be') ;
100
+ equals(null,view1.nameKey,'the selectButton should not have any name key') ;
101
+ equals(null,view1.valueKey,'the selectButton should not have any value key') ;
98
102
  });
99
103
 
100
104
  //test5
@@ -12,49 +12,49 @@ htmlbody('<style> .sc-static-layout { border: 1px red dotted; } </style>');
12
12
  //control test pane
13
13
  var pane = SC.ControlTestPane.design()
14
14
  //sample1
15
- .add("Basic", SC.DropDownMenu, {
15
+ .add("Basic", SC.SelectButtonView, {
16
16
  objects: ['None', 'Low', 'Medium', 'High']
17
17
  })
18
18
 
19
19
  //sample2
20
- .add("Disabled", SC.DropDownMenu, {
20
+ .add("Disabled", SC.SelectButtonView, {
21
21
  isEnabled: NO, objects: ['None', 'Low', 'Medium', 'High']
22
22
  })
23
23
 
24
24
  //sample3
25
- .add("NotVisible", SC.DropDownMenu, {
25
+ .add("NotVisible", SC.SelectButtonView, {
26
26
  isVisible: NO, objects: ['None', 'Low', 'Medium', 'High']
27
27
  })
28
28
 
29
29
  //sample4
30
- .add("SortedObjects", SC.DropDownMenu, {
30
+ .add("SortedObjects", SC.SelectButtonView, {
31
31
  objects:['None', 'Low', 'Medium', 'High']
32
32
  })
33
33
 
34
34
  //sample5
35
- .add("UnsortedObjects", SC.DropDownMenu, {
35
+ .add("UnsortedObjects", SC.SelectButtonView, {
36
36
  objects:['None', 'Low', 'Medium', 'High'],
37
37
  disableSort: YES
38
38
  })
39
39
 
40
40
  //sample6
41
- .add("redraw", SC.DropDownMenu, {
41
+ .add("redraw", SC.SelectButtonView, {
42
42
  layout: { width: '150', right: '0' }
43
43
  })
44
44
 
45
45
  //sample7
46
- .add("DropDownWithIcon", SC.DropDownMenu, {
47
- objects: [{ title: "None", icon: 'drop-down-icon' },
48
- { title: "Low", icon: 'drop-down-icon' },
49
- { title: "Medium", icon: 'drop-down-icon' },
50
- { title: "High", icon: 'drop-down-icon' }],
46
+ .add("SelectButtonWithIcon", SC.SelectButtonView, {
47
+ objects: [{ title: "None", icon: 'select-button-icon' },
48
+ { title: "Low", icon: 'select-button-icon' },
49
+ { title: "Medium", icon: 'select-button-icon' },
50
+ { title: "High", icon: 'select-button-icon' }],
51
51
  nameKey: 'title',
52
52
  iconKey: 'icon',
53
53
  checkboxEnabled: YES
54
54
  })
55
55
 
56
56
  //sample8
57
- .add("SortKey", SC.DropDownMenu, {
57
+ .add("SortKey", SC.SelectButtonView, {
58
58
  objects: [{ title: "None", pos: 3},
59
59
  { title: "Low", pos: 1},
60
60
  { title: "Medium", pos: 2 },
@@ -66,7 +66,7 @@ var pane = SC.ControlTestPane.design()
66
66
  })
67
67
 
68
68
  //sample9
69
- .add("StaticLayout", SC.DropDownMenu, {
69
+ .add("StaticLayout", SC.SelectButtonView, {
70
70
  useStaticLayout: YES,
71
71
  objects:['None', 'Low', 'Medium', 'High'],
72
72
  layout: { width: '150', right: '0' }
@@ -78,17 +78,17 @@ var pane = SC.ControlTestPane.design()
78
78
  // TEST VIEWS
79
79
  //
80
80
 
81
- module('SC.DropDownMenu ui', pane.standardSetup()) ;
81
+ module('SC.SelectButtonView ui', pane.standardSetup()) ;
82
82
 
83
83
  //test1
84
- test("Check the visiblity of the dropDowns", function() {
84
+ test("Check the visiblity of the selectButtons", function() {
85
85
  ok(pane.view('Basic').get('isVisibleInWindow'), 'Basic.isVisibleInWindow should be YES') ;
86
86
  ok(pane.view('Disabled').get('isVisibleInWindow'), 'Disabled.isVisibleInWindow should be YES') ;
87
87
  ok(!pane.view('NotVisible').get('isVisibleInWindow'), 'NotVisible.isVisibleInWindow should be NO') ;
88
88
  ok(pane.view('SortedObjects').get('isVisibleInWindow'), 'SortedObjects.isVisibleInWindow should be YES') ;
89
89
  ok(pane.view('UnsortedObjects').get('isVisibleInWindow'), 'UnsortedObjects.isVisibleInWindow should be YES') ;
90
90
  ok(pane.view('redraw').get('isVisibleInWindow'), 'redraw.isVisibleInWindow should be YES') ;
91
- ok(pane.view('DropDownWithIcon').get('isVisibleInWindow'), 'DropDownWithIcon.isVisibleInWindow should be YES') ;
91
+ ok(pane.view('SelectButtonWithIcon').get('isVisibleInWindow'), 'SelectButtonWithIcon.isVisibleInWindow should be YES') ;
92
92
  ok(pane.view('StaticLayout').get('isVisibleInWindow'), 'StaticLayout.isVisibleInWindow should be YES') ;
93
93
  }) ;
94
94
 
@@ -106,7 +106,7 @@ test("Basic", function() {
106
106
 
107
107
  //test3
108
108
  test("Disabled", function() {
109
- view=pane.view('Disabled').$() ;
109
+ var view=pane.view('Disabled').$() ;
110
110
  ok(view.hasClass('disabled'), 'hasClass(disabled) should be YES') ;
111
111
  ok(view.hasClass('sc-view'), 'hasClass(sc-view) should be YES') ;
112
112
  ok(view.hasClass('sc-button-view'), 'hasClass(sc-button-view) should be YES') ;
@@ -118,7 +118,7 @@ test("Disabled", function() {
118
118
 
119
119
  //test4
120
120
  test("NotVisible", function() {
121
- view=pane.view('NotVisible').$();
121
+ var view=pane.view('NotVisible').$();
122
122
  ok(view.hasClass('sc-view'), 'hasClass(sc-view) should be YES') ;
123
123
  ok(view.hasClass('sc-button-view'), 'hasClass(sc-button-view) should be YES') ;
124
124
  ok(view.hasClass('sc-regular-size'), 'hasClass(sc-regular-size) should be YES') ;
@@ -157,7 +157,7 @@ test("UnsortedObjects", function() {
157
157
 
158
158
  //test7
159
159
  test("redraw", function() {
160
- view=pane.view('redraw');
160
+ var view=pane.view('redraw');
161
161
  ok(view.$().hasClass('sc-view'), 'hasClass(sc-view) should be YES') ;
162
162
  ok(view.$().hasClass('sc-button-view'), 'hasClass(sc-button-view) should be YES') ;
163
163
  ok(view.$().hasClass('sc-regular-size'), 'hasClass(sc-regular-size) should be YES') ;
@@ -174,8 +174,8 @@ test("redraw", function() {
174
174
  }) ;
175
175
 
176
176
  //test8
177
- test("DropDownWithIcon", function() {
178
- view=pane.view('DropDownWithIcon').$();
177
+ test("SelectButtonWithIcon", function() {
178
+ var view=pane.view('SelectButtonWithIcon').$();
179
179
  ok(view.hasClass('icon'), 'hasClass(Icon) should be YES') ;
180
180
  ok(view.hasClass('sc-view'), 'hasClass(sc-view) should be YES') ;
181
181
  ok(view.hasClass('sc-button-view'), 'hasClass(sc-button-view) should be YES') ;
@@ -187,7 +187,7 @@ test("DropDownWithIcon", function() {
187
187
 
188
188
  //test9
189
189
  test("Check if the objects are sorted based on sortKey", function() {
190
- view=pane.view('SortKey');
190
+ var view=pane.view('SortKey');
191
191
  equals('None',view.get('objects')[2].title, 'Third object should be "None" ') ;
192
192
  }) ;
193
193
 
@@ -3,7 +3,7 @@
3
3
  // Copyright: ©2006-2009 Apple Inc. and contributors.
4
4
  // License: Licened under MIT license (see license.js)
5
5
  // ==========================================================================
6
-
6
+ var b;
7
7
 
8
8
  module("SC.ButtonView#actions", {
9
9
  setup: function() {
@@ -103,7 +103,6 @@ test("clicking on the checkbox will change toggle the value", function() {
103
103
  test("pressing mouseDown and then mouseUp anywhere in the checkbox should toggle the selection", function() {
104
104
 
105
105
  var elem = view.get('layer'), input = SC.$('input', elem);
106
-
107
106
  SC.Event.trigger(elem, 'mousedown');
108
107
  ok(view.get('isActive'), 'view should be active');
109
108
  ok(view.get('value'), 'value should not change yet');
@@ -41,7 +41,7 @@ test("canDeleteContent", function() {
41
41
  view.set('canDeleteContent', YES);
42
42
  equals(view.deleteSelection(), YES, 'should return YES if allowed');
43
43
  equals(content.get('length'), afterLen, 'content.length should change');
44
- equals(view.get('selection').get('length'), 0, 'should have empty selection');
44
+ equals(view.get('selection').indexSetForSource(content).get('min'), 3, 'should select an adjacent item');
45
45
  });
46
46
 
47
47
  test("empty selection case", function() {
@@ -27,7 +27,7 @@ module("SC.CollectionView.deselect", {
27
27
  // BASIC OPERATIONS
28
28
  //
29
29
 
30
- test("delect(indexes=Number)", function() {
30
+ test("deselect(indexes=Number)", function() {
31
31
  var expected = SC.SelectionSet.create().add(content,4,4).remove(content,6),
32
32
  actual ;
33
33
 
@@ -38,7 +38,7 @@ test("delect(indexes=Number)", function() {
38
38
  });
39
39
 
40
40
 
41
- test("delect(indexes=IndexSet)", function() {
41
+ test("deselect(indexes=IndexSet)", function() {
42
42
  var actual, expected = SC.SelectionSet.create()
43
43
  .add(content,4,4).remove(content,6,2);
44
44
 
@@ -49,7 +49,7 @@ test("delect(indexes=IndexSet)", function() {
49
49
  });
50
50
 
51
51
 
52
- test("delect() with empty selection", function() {
52
+ test("deselect() with empty selection", function() {
53
53
  var expected = SC.SelectionSet.create(),
54
54
  actual ;
55
55
 
@@ -195,5 +195,21 @@ test("del.collectionViewSelectionForProposedSelection - returns null", function(
195
195
 
196
196
  });
197
197
 
198
+ // ..........................................................
199
+ // SPECIAL CASES
200
+ //
201
+
202
+ test("deselecting a range should remove individual objects in range also", function() {
203
+
204
+ var obj = content.objectAt(1);
205
+ var expected = SC.SelectionSet.create().add(content, 5,3),
206
+ actual;
207
+
208
+ sel.addObject(obj);
209
+ view.deselect(SC.IndexSet.create(0,5));
210
+
211
+ actual = view.get('selection');
212
+ ok(expected.isEqual(actual), 'should remove content[1] from selection (expected: %@ actual: %@)'.fmt(expected, actual));
213
+ });
198
214
 
199
215
 
@@ -269,7 +269,7 @@ test("after making an item visible then invisible again", function() {
269
269
  });
270
270
  equals(view.get('childViews').length, 0, 'precond - should have no childview');
271
271
 
272
- var itemView = view.itemViewForContentIndex(1);
272
+ itemView = view.itemViewForContentIndex(1);
273
273
  equals(itemView.get('parentView'), view, 'itemView has parent view');
274
274
 
275
275