sproutcore 0.9.13 → 0.9.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. data/History.txt +19 -0
  2. data/Manifest.txt +103 -26
  3. data/app_generators/sproutcore/templates/README +1 -1
  4. data/bin/sc-build +1 -1
  5. data/bin/sc-gen +0 -0
  6. data/bin/sc-ide +278 -0
  7. data/bin/sc-init +38 -0
  8. data/bin/sc-install +96 -0
  9. data/bin/sc-remove +94 -0
  10. data/bin/sc-server +4 -0
  11. data/bin/sc-update +94 -0
  12. data/bin/sproutcore +3 -14
  13. data/clients/sc_docs/controllers/docs.js +1 -1
  14. data/clients/sc_docs/models/doc.js +6 -0
  15. data/clients/sc_docs/views/doc_frame.js +1 -1
  16. data/clients/sc_test_runner/english.lproj/icons/small/next.png +0 -0
  17. data/clients/sc_test_runner/english.lproj/icons/small/reset.png +0 -0
  18. data/frameworks/sproutcore/HISTORY +34 -2
  19. data/frameworks/sproutcore/controllers/array.js +1 -1
  20. data/frameworks/sproutcore/controllers/controller.js +1 -1
  21. data/frameworks/sproutcore/controllers/object.js +9 -6
  22. data/frameworks/sproutcore/core.js +19 -4
  23. data/frameworks/sproutcore/english.lproj/blank.gif +0 -0
  24. data/frameworks/sproutcore/english.lproj/core.css +1 -0
  25. data/frameworks/sproutcore/english.lproj/menu.css +1 -0
  26. data/frameworks/sproutcore/foundation/application.js +3 -3
  27. data/frameworks/sproutcore/foundation/benchmark.js +1 -1
  28. data/frameworks/sproutcore/foundation/node_descriptor.js +13 -1
  29. data/frameworks/sproutcore/foundation/page.js +3 -2
  30. data/frameworks/sproutcore/foundation/path_module.js +33 -16
  31. data/frameworks/sproutcore/foundation/run_loop.js +1 -1
  32. data/frameworks/sproutcore/foundation/server.js +68 -18
  33. data/frameworks/sproutcore/foundation/string.js +1 -1
  34. data/frameworks/sproutcore/globals/window.js +62 -15
  35. data/frameworks/sproutcore/lib/core_views.rb +1 -0
  36. data/frameworks/sproutcore/lib/index.rhtml +4 -3
  37. data/frameworks/sproutcore/lib/menu_views.rb +2 -2
  38. data/frameworks/sproutcore/models/collection.js +122 -107
  39. data/frameworks/sproutcore/models/record.js +2 -2
  40. data/frameworks/sproutcore/panes/manager.js +1 -1
  41. data/frameworks/sproutcore/panes/overlay.js +3 -3
  42. data/frameworks/sproutcore/tests/controllers/object.rhtml +26 -0
  43. data/frameworks/sproutcore/tests/views/collection/incremental_rendering.rhtml +2 -2
  44. data/frameworks/sproutcore/views/button/disclosure.js +1 -1
  45. data/frameworks/sproutcore/views/collection/collection.js +19 -15
  46. data/frameworks/sproutcore/views/collection/source_list.js +1 -1
  47. data/frameworks/sproutcore/views/collection/table.js +2 -2
  48. data/frameworks/sproutcore/views/error_explanation.js +1 -1
  49. data/frameworks/sproutcore/views/field/checkbox_field.js +1 -1
  50. data/frameworks/sproutcore/views/field/field.js +1 -1
  51. data/frameworks/sproutcore/views/field/radio_field.js +1 -1
  52. data/frameworks/sproutcore/views/field/select_field.js +1 -1
  53. data/frameworks/sproutcore/views/form.js +1 -1
  54. data/frameworks/sproutcore/views/image.js +1 -1
  55. data/frameworks/sproutcore/views/menu_item.js +1 -1
  56. data/frameworks/sproutcore/views/popup_button.js +1 -1
  57. data/frameworks/sproutcore/views/popup_menu.js +1 -1
  58. data/frameworks/sproutcore/views/progress.js +4 -2
  59. data/frameworks/sproutcore/views/radio_group.js +1 -1
  60. data/frameworks/sproutcore/views/scroll.js +1 -1
  61. data/frameworks/sproutcore/views/source_list_group.js +1 -1
  62. data/frameworks/sproutcore/views/split.js +1 -1
  63. data/frameworks/sproutcore/views/tab.js +3 -1
  64. data/frameworks/sproutcore/views/view.js +19 -3
  65. data/jsdoc/README.txt +89 -57
  66. data/jsdoc/app/frame/Chain.js +102 -0
  67. data/jsdoc/app/frame/Dumper.js +144 -0
  68. data/jsdoc/app/frame/Hash.js +47 -0
  69. data/jsdoc/app/frame/Link.js +142 -0
  70. data/jsdoc/app/frame/Namespace.js +10 -0
  71. data/jsdoc/app/frame/Opt.js +134 -0
  72. data/jsdoc/app/frame/Reflection.js +26 -0
  73. data/jsdoc/app/frame/String.js +93 -0
  74. data/jsdoc/app/frame/Testrun.js +129 -0
  75. data/jsdoc/app/frame.js +33 -0
  76. data/jsdoc/app/handlers/FOODOC.js +26 -0
  77. data/jsdoc/app/handlers/XMLDOC/DomReader.js +159 -0
  78. data/jsdoc/app/handlers/XMLDOC/XMLDoc.js +16 -0
  79. data/jsdoc/app/handlers/XMLDOC/XMLParse.js +292 -0
  80. data/jsdoc/app/handlers/XMLDOC.js +26 -0
  81. data/jsdoc/app/lib/JSDOC/DocComment.js +200 -0
  82. data/jsdoc/app/lib/JSDOC/DocTag.js +294 -0
  83. data/jsdoc/app/lib/JSDOC/JsDoc.js +180 -0
  84. data/jsdoc/app/lib/JSDOC/JsPlate.js +100 -0
  85. data/jsdoc/app/lib/JSDOC/Lang.js +144 -0
  86. data/jsdoc/app/lib/JSDOC/Parser.js +109 -0
  87. data/jsdoc/app/lib/JSDOC/PluginManager.js +33 -0
  88. data/jsdoc/app/lib/JSDOC/Symbol.js +600 -0
  89. data/jsdoc/app/lib/JSDOC/SymbolSet.js +220 -0
  90. data/jsdoc/app/lib/JSDOC/TextStream.js +41 -0
  91. data/jsdoc/app/lib/JSDOC/Token.js +18 -0
  92. data/jsdoc/app/lib/JSDOC/TokenReader.js +323 -0
  93. data/jsdoc/app/lib/JSDOC/TokenStream.js +133 -0
  94. data/jsdoc/app/lib/JSDOC/Util.js +32 -0
  95. data/jsdoc/app/lib/JSDOC/Walker.js +416 -0
  96. data/jsdoc/app/lib/JSDOC.js +97 -0
  97. data/jsdoc/app/main.js +74 -0
  98. data/jsdoc/app/plugins/commentSrcJson.js +19 -0
  99. data/jsdoc/app/plugins/frameworkPrototype.js +16 -0
  100. data/jsdoc/app/plugins/functionCall.js +10 -0
  101. data/jsdoc/app/plugins/publishSrcHilite.js +62 -0
  102. data/jsdoc/app/plugins/sproutcoreTags.js +26 -0
  103. data/jsdoc/app/plugins/symbolLink.js +9 -0
  104. data/jsdoc/app/plugins/tagParamConfig.js +31 -0
  105. data/jsdoc/app/plugins/tagSynonyms.js +43 -0
  106. data/jsdoc/app/run.js +339 -137
  107. data/jsdoc/changes.txt +47 -0
  108. data/jsdoc/conf/sample.conf +31 -0
  109. data/jsdoc/java/build.xml +36 -0
  110. data/jsdoc/java/build_1.4.xml +36 -0
  111. data/jsdoc/java/classes/js.jar +0 -0
  112. data/jsdoc/java/src/JsDebugRun.java +21 -0
  113. data/jsdoc/java/src/JsRun.java +21 -0
  114. data/jsdoc/jsdebug.jar +0 -0
  115. data/jsdoc/jsrun.jar +0 -0
  116. data/jsdoc/t/TestDoc.js +144 -0
  117. data/jsdoc/t/runner.js +13 -0
  118. data/jsdoc/templates/sproutcore/allclasses.tmpl +17 -0
  119. data/jsdoc/templates/sproutcore/allfiles.tmpl +56 -0
  120. data/jsdoc/templates/sproutcore/class.tmpl +408 -326
  121. data/jsdoc/templates/sproutcore/index.tmpl +30 -31
  122. data/jsdoc/templates/sproutcore/publish.js +173 -81
  123. data/jsdoc/templates/sproutcore/static/default.css +191 -0
  124. data/jsdoc/templates/sproutcore/static/header.html +2 -0
  125. data/jsdoc/templates/sproutcore/static/index.html +19 -0
  126. data/jsdoc/templates/sproutcore/symbol.tmpl +35 -0
  127. data/jsdoc/test/addon.js +24 -0
  128. data/jsdoc/test/anon_inner.js +14 -0
  129. data/jsdoc/test/augments.js +31 -0
  130. data/jsdoc/test/augments2.js +26 -0
  131. data/jsdoc/test/borrows.js +41 -0
  132. data/jsdoc/test/borrows2.js +23 -0
  133. data/jsdoc/test/config.js +22 -0
  134. data/jsdoc/test/constructs.js +18 -0
  135. data/jsdoc/test/encoding.js +10 -0
  136. data/jsdoc/test/encoding_other.js +12 -0
  137. data/jsdoc/test/functions_anon.js +39 -0
  138. data/jsdoc/test/functions_nested.js +33 -0
  139. data/jsdoc/test/global.js +13 -0
  140. data/jsdoc/test/globals.js +25 -0
  141. data/jsdoc/test/ignore.js +10 -0
  142. data/jsdoc/test/inner.js +16 -0
  143. data/jsdoc/test/jsdoc_test.js +477 -0
  144. data/jsdoc/test/lend.js +33 -0
  145. data/jsdoc/test/memberof.js +20 -0
  146. data/jsdoc/test/memberof_constructor.js +15 -0
  147. data/jsdoc/test/name.js +19 -0
  148. data/jsdoc/test/namespace_nested.js +23 -0
  149. data/jsdoc/test/nocode.js +13 -0
  150. data/jsdoc/test/oblit_anon.js +20 -0
  151. data/jsdoc/test/overview.js +20 -0
  152. data/jsdoc/test/param_inline.js +37 -0
  153. data/jsdoc/test/params_optional.js +8 -0
  154. data/jsdoc/test/prototype.js +17 -0
  155. data/jsdoc/test/prototype_nested.js +9 -0
  156. data/jsdoc/test/prototype_oblit.js +13 -0
  157. data/jsdoc/test/prototype_oblit_constructor.js +24 -0
  158. data/jsdoc/test/public.js +10 -0
  159. data/jsdoc/test/shared.js +42 -0
  160. data/jsdoc/test/shared2.js +2 -0
  161. data/jsdoc/test/shortcuts.js +22 -0
  162. data/jsdoc/test/static_this.js +13 -0
  163. data/jsdoc/test/synonyms.js +23 -0
  164. data/jsdoc/test/tosource.js +23 -0
  165. data/jsdoc/test/variable_redefine.js +14 -0
  166. data/jsdoc/test.js +304 -0
  167. data/lib/sproutcore/build_tools/resource_builder.rb +6 -1
  168. data/lib/sproutcore/bundle_installer.rb +268 -0
  169. data/lib/sproutcore/jsdoc.rb +7 -6
  170. data/lib/sproutcore/library.rb +38 -0
  171. data/lib/sproutcore/merb/bundle_controller.rb +8 -4
  172. data/lib/sproutcore/version.rb +1 -1
  173. data/lib/sproutcore.rb +1 -1
  174. data/script/destroy +0 -0
  175. data/script/generate +0 -0
  176. data/script/txt2html +0 -0
  177. metadata +117 -29
  178. data/clients/view_builder/core.js +0 -19
  179. data/clients/view_builder/english.lproj/body.css +0 -149
  180. data/clients/view_builder/english.lproj/body.rhtml +0 -18
  181. data/clients/view_builder/english.lproj/strings.js +0 -14
  182. data/clients/view_builder/main.js +0 -37
  183. data/jsdoc/app/DocFile.js +0 -137
  184. data/jsdoc/app/DocTag.js +0 -110
  185. data/jsdoc/app/Doclet.js +0 -63
  186. data/jsdoc/app/Dumper.js +0 -143
  187. data/jsdoc/app/JsDoc.js +0 -103
  188. data/jsdoc/app/JsHilite.js +0 -45
  189. data/jsdoc/app/JsIO.js +0 -163
  190. data/jsdoc/app/JsParse.js +0 -385
  191. data/jsdoc/app/JsPlate.js +0 -130
  192. data/jsdoc/app/JsTestrun.js +0 -129
  193. data/jsdoc/app/JsToke.js +0 -564
  194. data/jsdoc/app/Symbol.js +0 -298
  195. data/jsdoc/app/Transformer.js +0 -14
  196. data/jsdoc/app/Util.js +0 -97
  197. data/jsdoc/app/js.jar +0 -0
  198. data/jsdoc/plugins/min.js +0 -316
  199. data/jsdoc/plugins/strip.js +0 -20
  200. data/jsdoc/templates/sproutcore/default.css +0 -191
  201. data/jsdoc/templates/sproutcore/index.html +0 -13
  202. data/jsdoc/templates/sproutcore/prototype.js +0 -4186
  203. data/jsdoc/templates/sproutcore/splash.html +0 -7
@@ -236,6 +236,32 @@ Test.context("SC.ObjectController", {
236
236
  this.single.didCommitChanges.shouldEqual(YES) ;
237
237
  },
238
238
 
239
+ "Should update both values when commitChanges() on content objects" : function() {
240
+ cc = SC.CollectionController.create({
241
+ allowsEmptySelection: false,
242
+ allowsMultipleSelection: false
243
+ });
244
+ var oc = SC.ObjectController.create({
245
+ contentBinding: 'cc.selection',
246
+ commitChangesImmediately: false
247
+ });
248
+ var Contact = SC.Record.extend({});
249
+
250
+ var rcrds = Contact.collection();
251
+ cc.set('content', rcrds);
252
+ rcrds.refresh();
253
+ var single = Contact.create({'test' : 'NAME1', 'value' : 0});
254
+
255
+ rcrds.count().shouldEqual(1);
256
+
257
+ oc.set('test', 'NAME2');
258
+ oc.set('value', 123);
259
+
260
+ $ok(oc.commitChanges()).shouldEqual(YES);
261
+ single.get('test').shouldEqual('NAME2');
262
+ single.get('value').shouldEqual(123);
263
+ },
264
+
239
265
  "Support content objects that implement SC.Array but are not arrays": function() {
240
266
  this.c.set('content', this.dummy_a) ;
241
267
 
@@ -155,7 +155,7 @@ Test.context("CASE 3: Autoscrolling, no incremental rendering, no custom layout"
155
155
  }),
156
156
 
157
157
  init: function() {
158
- arguments.callee.base.apply(this, arguments) ;
158
+ sc_super() ;
159
159
  this.setStyle({ overflow: "auto", height: '200px' }) ;
160
160
  }
161
161
  }) ;
@@ -198,7 +198,7 @@ Test.context("CASE 4: Autoscrolling, no incremental rendering, custom layout",
198
198
  },
199
199
 
200
200
  init: function() {
201
- arguments.callee.base.apply(this, arguments) ;
201
+ sc_super() ;
202
202
  this.setStyle({ overflow: "auto", height: '200px' }) ;
203
203
  }
204
204
 
@@ -33,7 +33,7 @@ SC.DisclosureView = SC.ButtonView.extend(
33
33
  valueBindingDefault: SC.Binding.Bool,
34
34
 
35
35
  init: function() {
36
- arguments.callee.base.apply(this,arguments) ;
36
+ sc_super() ;
37
37
  if (this.get('value') == this.get('toggleOnValue')) {
38
38
  this.set('isSelected', true) ;
39
39
  }
@@ -670,11 +670,6 @@ SC.CollectionView = SC.View.extend(SC.CollectionViewDelegate,
670
670
  // updateChildren again.
671
671
  var clippingFrame = this._lastClippingFrame = this.get('clippingFrame') ;
672
672
 
673
- // this is a workaround for the clippingFrame bug in ie7 clippingFrame is always returning dimensions 0,0
674
- if(clippingFrame.width==0 && clippingFrame.height==0){
675
- clippingFrame = this._lastClippingFrame = f;
676
- }
677
-
678
673
  // STEP 2: Calculate the new range of content to display in
679
674
  // the clipping frame. Determine if we need to do a full update or
680
675
  // not.
@@ -709,10 +704,13 @@ SC.CollectionView = SC.View.extend(SC.CollectionViewDelegate,
709
704
  var key = SC.guidFor(c) ;
710
705
  var itemView = this._insertItemViewFor(c, groupBy, idx) ;
711
706
 
712
- // add item view to new hash and remove from old hash.
713
- itemViewsByContent[key] = itemView;
714
-
715
- delete this._itemViewsByContent[key];
707
+ if(itemView)
708
+ {
709
+ // add item view to new hash and remove from old hash.
710
+ itemViewsByContent[key] = itemView;
711
+
712
+ delete this._itemViewsByContent[key];
713
+ }
716
714
  }
717
715
 
718
716
  // Now iterate through the old hash. Any left over item views should
@@ -1151,11 +1149,14 @@ SC.CollectionView = SC.View.extend(SC.CollectionViewDelegate,
1151
1149
 
1152
1150
  // negative length == remove item views
1153
1151
  if (length < 0) {
1154
- while(++length < 0) {
1155
- var c = content.objectAt(start + length) ;
1156
- var itemView = this.itemViewForContent(c) ;
1157
- if (itemView) this._removeItemView(itemView, groupBy) ;
1158
- }
1152
+ // TEMPORARY OPTIMIZATION: Do not remove views when they go out of
1153
+ // range. This way they don't need to be created/addred later on.
1154
+ //
1155
+ // while(++length < 0) {
1156
+ // var c = content.objectAt(start + length) ;
1157
+ // var itemView = this.itemViewForContent(c) ;
1158
+ // if (itemView) this._removeItemView(itemView, groupBy) ;
1159
+ // }
1159
1160
 
1160
1161
  // positive length == add item views.
1161
1162
  } else if (length > 0) {
@@ -1475,6 +1476,9 @@ SC.CollectionView = SC.View.extend(SC.CollectionViewDelegate,
1475
1476
  */
1476
1477
  scrollToContent: function(record) {
1477
1478
  // find the itemView. if not present, add one.
1479
+ var content = Array.from(this.get('content'));
1480
+ if (content.indexOf(record) < 0) return ; // do nothing if not in content.
1481
+
1478
1482
  var itemView = this.itemViewForContent(record) ;
1479
1483
  if (!itemView) {
1480
1484
  var content = Array.from(this.get('content')) ;
@@ -2608,7 +2612,7 @@ SC.CollectionView = SC.View.extend(SC.CollectionViewDelegate,
2608
2612
  this._itemViewPool= [];
2609
2613
  this._groupViewPool= [];
2610
2614
 
2611
- arguments.callee.base.apply(this, arguments) ;
2615
+ sc_super() ;
2612
2616
  this._dropTargetObserver();
2613
2617
  },
2614
2618
 
@@ -153,7 +153,7 @@ SC.SourceListView = SC.CollectionView.extend(
153
153
  // cached group rows to make sure we get an accurate count.
154
154
  updateChildren: function(deep) {
155
155
  if (deep) this._groupRows = null ;
156
- return arguments.callee.base.apply(this, arguments) ;
156
+ return sc_super() ;
157
157
  },
158
158
 
159
159
  // determines if the group at the specified content index is visible or
@@ -43,7 +43,7 @@ SC.TableView = SC.CollectionView.extend(
43
43
  var min = Math.max(0,Math.floor(SC.minY(frame) / rowHeight)-1) ;
44
44
  var max = Math.ceil(SC.maxY(frame) / rowHeight) ;
45
45
  var ret = { start: min, length: max - min } ;
46
- // console.log('contentRangeInFrame(%@) = %@'.fmt($H(frame).inspect(), $H(ret).inspect()));
46
+ // console.log('contentRangeInFrame(%@) = %@'.fmt($H(frame).inspect(), $H(ret).inspect()));
47
47
  //if (frame.height < 100) debugger ;
48
48
  return ret ;
49
49
  },
@@ -78,7 +78,7 @@ SC.TableView = SC.CollectionView.extend(
78
78
 
79
79
  f.x = f.y = 0;
80
80
  f.height = Math.max(f.height, rows * rowHeight) ;
81
- // console.log('computeFrame(%@)'.fmt($H(f).inspect())) ;
81
+ // console.log('computeFrame(%@)'.fmt($H(f).inspect())) ;
82
82
  return f ;
83
83
  },
84
84
 
@@ -51,7 +51,7 @@ SC.ErrorExplanationView = SC.View.extend(SC.Control,
51
51
  }.observes('value'),
52
52
 
53
53
  init: function() {
54
- arguments.callee.base.apply(this,arguments) ;
54
+ sc_super() ;
55
55
  this._valueObserver() ;
56
56
  }
57
57
 
@@ -32,7 +32,7 @@ SC.CheckboxFieldView = SC.FieldView.extend(
32
32
  valueBindingDefault: SC.Binding.Bool,
33
33
 
34
34
  init: function() {
35
- arguments.callee.base.apply(this,arguments) ;
35
+ sc_super() ;
36
36
  var f = this.fieldValueDidChange.bind(this, false) ;
37
37
  Event.observe(this.rootElement,'click', f) ;
38
38
  }
@@ -181,7 +181,7 @@ SC.FieldView = SC.View.extend(SC.Control, SC.Validatable,
181
181
  */
182
182
  isEnabledObserver: function() {
183
183
  isEnabled = this.get('isEnabled') ;
184
- arguments.callee.base.apply(this, arguments);
184
+ sc_super();
185
185
  (isEnabled) ? this.enableField() : this.disableField();
186
186
  }.observes('isEnabled'),
187
187
 
@@ -102,7 +102,7 @@ SC.RadioFieldView = SC.FieldView.extend(
102
102
  },
103
103
 
104
104
  init: function() {
105
- arguments.callee.base.apply(this,arguments) ;
105
+ sc_super() ;
106
106
 
107
107
  // find all inputs.
108
108
  this._fields = {} ;
@@ -269,7 +269,7 @@ SC.SelectFieldView = SC.FieldView.extend(
269
269
  // rebuild the menu when this happens, but only one time.
270
270
  _objectsItemObserver: function(item, key, value) {
271
271
  if (item.didChangeFor(this._guid, key)) {
272
- console.log('rebuildMenu') ;
272
+ // console.log('rebuildMenu') ;
273
273
  this._rebuildMenu() ;
274
274
  }
275
275
  },
@@ -453,7 +453,7 @@ SC.FormView = SC.View.extend({
453
453
 
454
454
  // When the form is first created, go find all the fields and save them.
455
455
  init: function() {
456
- arguments.callee.base.apply(this,arguments) ;
456
+ sc_super() ;
457
457
 
458
458
  // disable the normal submission system so we can take over.
459
459
  if (this.rootElement && this.rootElement.tagName.toLowerCase() == "form") {
@@ -152,7 +152,7 @@ SC.ImageView = SC.View.extend(SC.Control,
152
152
  },
153
153
 
154
154
  init: function() {
155
- arguments.callee.base.apply(this,arguments) ;
155
+ sc_super() ;
156
156
  this.valueObserver() ;
157
157
  if (this.rootElement.src) {
158
158
  this.set('imageWidth',parseInt(this.rootElement.width,0)) ;
@@ -81,7 +81,7 @@ SC.MenuItemView = SC.ButtonView.extend({
81
81
 
82
82
  mouseUp: function(evt)
83
83
  {
84
- arguments.callee.base.apply(this, arguments);
84
+ sc_super();
85
85
  this._closeParentMenu();
86
86
  },
87
87
  didTriggerAction: function()
@@ -23,7 +23,7 @@ SC.PopupButtonView = SC.ButtonView.extend({
23
23
  if (!this.get('isEnabled')) return false;
24
24
 
25
25
  // is it our own keyEquivalent?
26
- if (arguments.callee.base.apply(this,arguments)) return true;
26
+ if (sc_super()) return true;
27
27
 
28
28
  // is it any of our menu items keyEquivalent?
29
29
  var menu = this.get('menu');
@@ -113,7 +113,7 @@ SC.PopupMenuView = SC.View.extend({
113
113
  if (!target) sender.set('isEnabled', false);
114
114
  }
115
115
  // call the superclasses _show method to make the menu visible
116
- arguments.callee.base.apply(this, arguments);
116
+ sc_super();
117
117
  },
118
118
 
119
119
  resizeWithOldParentSize: function() {
@@ -93,8 +93,8 @@ SC.ProgressView = SC.View.extend({
93
93
  var isIndeterminate = this.get('isIndeterminate') ;
94
94
  var isEnabled = this.get('isEnabled') ;
95
95
 
96
- Element.setClassName(this,'indeterminate',isIndeterminate) ;
97
- Element.setClassName(this,'disabled',!isEnabled) ;
96
+ this.setClassName('indeterminate',isIndeterminate);
97
+ this.setClassName('disabled',!isEnabled);
98
98
 
99
99
  // compute value for setting the width of the inner progress
100
100
  var value ;
@@ -109,6 +109,8 @@ SC.ProgressView = SC.View.extend({
109
109
  value = (value - minimum) / (maximum - minimum) ;
110
110
  if (value > 1.0) value = 1.0 ;
111
111
  }
112
+ if(isNaN(value))
113
+ value = 0.0;
112
114
  value = value * 100 ;
113
115
  if (this.innerView) this.innerView.setStyle({ width: (value + '%') }) ;
114
116
  }
@@ -19,7 +19,7 @@ SC.RadioGroupView = SC.View.extend({
19
19
 
20
20
  // PRIVATE METHODS
21
21
  init: function() {
22
- arguments.callee.base.apply(this, arguments) ;
22
+ sc_super() ;
23
23
 
24
24
  // find the list of buttons to update and set them up.
25
25
  var loc = this.outlets.length ;
@@ -50,7 +50,7 @@ SC.ScrollView = SC.ContainerView.extend(SC.Scrollable, {
50
50
  }.observes('canScrollHorizontal'),
51
51
 
52
52
  init: function() {
53
- arguments.callee.base.apply(this, arguments) ;
53
+ sc_super() ;
54
54
  this._canScrollVerticalObserver() ;
55
55
  this._canScrollHorizontalObserver() ;
56
56
  },
@@ -77,7 +77,7 @@ SC.SourceListGroupView = SC.View.extend(SC.Control, SC.DelegateSupport, {
77
77
 
78
78
  // set the group visibility if changed
79
79
  var groupVisibleKey = this.getDelegateProperty(this.displayDelegate, 'groupVisibleKey') ;
80
- if ((key == '*') || (groupVisibleKey && (key == groupVisibileKey))) {
80
+ if ((key == '*') || (groupVisibleKey && (key == groupVisibleKey))) {
81
81
 
82
82
  if (groupVisibleKey) {
83
83
 
@@ -282,7 +282,7 @@ SC.SplitView = SC.View.extend(SC.DelegateSupport,
282
282
 
283
283
  /** @private */
284
284
  init: function() {
285
- arguments.callee.base.apply(this, arguments) ;
285
+ sc_super() ;
286
286
  this.addClassName(this.get('layoutDirection')) ;
287
287
  }
288
288
 
@@ -6,6 +6,8 @@
6
6
  require('views/view') ;
7
7
  require('views/container') ;
8
8
 
9
+ SC.TAB_VIEW_TAB_REGEXP = /Tab$/ ;
10
+
9
11
  /** @class
10
12
 
11
13
  To use a TabView, just declare the views and buttons you want to manage
@@ -56,7 +58,7 @@ SC.TabView = SC.ContainerView.extend(
56
58
  while(--loc >= 0) {
57
59
  var outlet = this.outlets[loc] ;
58
60
  // look for outlets ending in 'Tab'
59
- if (outlet.slice(outlet.length-3,outlet.length) == "Tab") {
61
+ if (outlet.match(SC.TAB_VIEW_TAB_REGEXP)) {
60
62
  var key = outlet.slice(0,-3) ; // remove 'Tab'
61
63
  var tab = view.get(outlet) ; // find tab view
62
64
  var button = view.get(key + 'Button') ; // find button view (opt)
@@ -115,8 +115,12 @@ SC.View = SC.Responder.extend(SC.PathModule, SC.DelegateSupport,
115
115
  // call notices.
116
116
  view.didAddToParent(this, beforeView) ;
117
117
  this.didAddChild(view, beforeView) ;
118
-
119
- return this ;
118
+ try{
119
+ return this ;
120
+ }finally{
121
+ if(beforeElement)
122
+ beforeElement=null;
123
+ }
120
124
  },
121
125
 
122
126
  /**
@@ -163,7 +167,11 @@ SC.View = SC.Responder.extend(SC.PathModule, SC.DelegateSupport,
163
167
 
164
168
  view.didRemoveFromParent(this) ;
165
169
  this.didRemoveChild(view);
170
+ try{
166
171
  return this;
172
+ }finally{
173
+ el=null;
174
+ }
167
175
  },
168
176
 
169
177
  /**
@@ -2197,11 +2205,19 @@ if (SC.Platform.IE) {
2197
2205
  SC.View._collectInnerFrame = function() {
2198
2206
  var el = this.rootElement ;
2199
2207
  var hasLayout = (el.currentStyle) ? el.currentStyle.hasLayout : NO ;
2208
+ var borderTopWidth = parseInt(el.currentStyle.borderTopWidth, 0) || 0 ;
2209
+ var borderBottomWidth = parseInt(el.currentStyle.borderBottomWidth, 0) || 0 ;
2210
+ var scrollHeight = el.offsetHeight-borderTopWidth-borderBottomWidth;
2211
+ if(el.clientWidth > el.scrollWidth)
2212
+ {
2213
+ scrollHeight-15;
2214
+ }
2215
+
2200
2216
  return {
2201
2217
  x: el.offsetLeft,
2202
2218
  y: el.offsetTop,
2203
2219
  width: (hasLayout) ? Math.min(el.scrollWidth, el.clientWidth) : el.scrollWidth,
2204
- height: (hasLayout) ? Math.min(el.scrollHeight, el.clientHeight) : el.scrollHeight
2220
+ height: (hasLayout) ? Math.min(scrollHeight, el.clientHeight) : scrollHeight
2205
2221
  };
2206
2222
  } ;
2207
2223
 
data/jsdoc/README.txt CHANGED
@@ -1,104 +1,136 @@
1
- =====================================================================
1
+ ======================================================================
2
2
 
3
3
  DESCRIPTION:
4
4
 
5
- JsDoc Toolkit is an automatic documentation generation tool for
6
- JavaScript. It is written in JavaScript and is run from a command line
7
- (or terminal) using Mozilla Rhino JavaScript engine. Using this tool
8
- you can automatically turn JavaDoc-like comments in your JavaScript
9
- source code into published output, such as HTML or XML.
5
+ ** NOTICE ** THIS VERSION OF THE SOFTWARE IS "BETA," MEANING IT IS IS
6
+ NOT YET READY FOR USE IN A PRODUCTION ENVIRONEMNT. IT IS MADE
7
+ AVAILABLE FOR PREVIEW AND TESTING PURPOSES ONLY.
10
8
 
11
- For more information, to report a bug or to browse the technical
9
+ This is Version 2 of JsDoc Toolkit, an automatic documentation
10
+ generation tool for JavaScript. It is written in JavaScript and is run
11
+ from a command line (or terminal) using the Java runtime engine.
12
+
13
+ Using this tool you can automatically turn JavaDoc-like comments in
14
+ your JavaScript source code into published output files, such as HTML
15
+ or XML.
16
+
17
+ For more information, to report a bug, or to browse the technical
12
18
  documentation for this tool please visit the official JsDoc Toolkit
13
- project homepage: http://code.google.com/p/jsdoc-toolkit/
19
+ project homepage at http://code.google.com/p/jsdoc-toolkit/
14
20
 
15
- This project is based on the JSDoc.pm tool, created by Michael
16
- Mathews, maintained by Gabriel Reid. More information on JsDoc can
17
- be found on the JSDoc.pm homepage: http://jsdoc.sourceforge.net/
21
+ For the most up-to-date documentation on Version 2 of JsDoc Toolkit
22
+ see the Verion 2 wiki at http://jsdoctoolkit.org/wiki
18
23
 
19
- Complete documentation on JsDoc Toolkit can be found on the project
20
- wiki at http://code.google.com/p/jsdoc-toolkit/w/list
21
24
 
25
+ ======================================================================
26
+
27
+ REQUIREMENTS:
28
+
29
+ JsDoc Toolkit is known to work with:
30
+ java version "1.6.0_03"
31
+ Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
32
+ on Windows XP,
33
+ and java version "1.5.0_13"
34
+ Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05-241)
35
+ on Mac OS X 10.4.
22
36
 
23
- =====================================================================
37
+ Other versions of java may or may not work with JsDoc Toolkit.
38
+
39
+ ======================================================================
24
40
 
25
41
  USAGE:
26
42
 
27
- Running JsDoc Toolkit on your desktop requires you to have Java
28
- installed and the Mozilla Rhino JavaScript jar file (named "js.jar")
29
- available. A copy of this jar file is included with the JsDoc Toolkit
30
- distribution. To download Rhino yourself or to find out more go to
31
- the official Rhino web page: http://www.mozilla.org/rhino/
43
+ Running JsDoc Toolkit requires you to have Java installed on your
44
+ computer. For more information see http://www.java.com/getjava/
32
45
 
33
- Before running the JsDoc Toolkit app you must change your current
46
+ Before running the JsDoc Toolkit app you should change your current
34
47
  working directory to the jsdoc-toolkit folder. Then follow the
35
48
  examples below, or as shown on the project wiki.
36
49
 
37
50
  On a computer running Windows a valid command line to run JsDoc
38
51
  Toolkit might look like this:
39
52
 
40
- > java -jar app\js.jar app\run.js -a -t=templates\htm test\data\test.js
53
+ > java -jar jsrun.jar app\run.js -a -t=templates\jsdoc mycode.js
41
54
 
42
55
  On Mac OS X or Linux the same command would look like this:
43
56
 
44
- $ java -jar app/js.jar app/run.js -a -t=templates/htm test/data/test.js
57
+ $ java -jar jsrun.jar app/run.js -a -t=templates/jsdoc mycode.js
45
58
 
46
- The above assumes your current working directory contains the app, test
47
- and templates subdirectories from the standard JsDoc Toolkit
48
- distribution. If you have the js.jar file saved to a place in your
49
- system's Java CLASSPATH, it can safely be omitted from the command.
59
+ The above assumes your current working directory contains jsrun.jar,
60
+ the "app" and "templates" subdirectories from the standard JsDoc
61
+ Toolkit distribution and that the relative path to the code you wish
62
+ to document is "mycode.js".
50
63
 
51
- To run JsDoc Toolkit from any directory, specify the path to the app
52
- folder like so:
64
+ The output documentation files will be saved to a new directory named
65
+ "out" (by default) in the current directory, or if you specify a
66
+ -d=somewhere_else option, to the somewhere_else directory.
53
67
 
54
- > java -Djsdoc.dir=%BASE_DIR% -jar %RHINO% %RUN% %OPTS% %SRC_FILES%
68
+ For help (usage notes) enter this on the command line:
55
69
 
56
- So assuming the JsDoc Toolkit "app" directory is in "lib\jsdoc-toolkit"
57
- you would specify that like so:
70
+ $ java -jar jsrun.jar app/run.js --help
58
71
 
59
- > java -Djsdoc.dir=lib\jsdoc-toolkit <etc>
72
+ More information about the various command line options used by JsDoc
73
+ Toolkit are available on the project wiki.
60
74
 
61
- The output documentation files will be saved to a new directory named
62
- "js_docs_out" (by default) in the current directory, or if you specify
63
- a -d=somewhere_else option, to the somewhere_else directory.
75
+ ======================================================================
64
76
 
65
- For help (usage notes) enter this on the command line:
66
-
67
- > java -jar app\js.jar app\run.js -h
77
+ TESTING:
68
78
 
69
- To run the unit tests included with JsDoc Toolkit enter this on the
70
- command line:
79
+ To run the suite of unit tests included with JsDoc Toolkit enter this
80
+ on the command line:
71
81
 
72
- > java -jar app\js.jar test\run.js
82
+ $ java -jar jsrun.jar app/run.js -T
73
83
 
74
- To run any example in the included examples enter this on the
75
- command line:
84
+ To see a dump of the internal data structure that JsDoc Toolkit has
85
+ built from your source files use this command:
76
86
 
77
- $ java -jar app/js.jar examples/run.js -a examples/data/whatever.js
87
+ $ java -jar jsrun.jar app/run.js mycode.js -Z
78
88
 
79
89
 
80
- =====================================================================
90
+ ======================================================================
81
91
 
82
92
  LICENSE:
83
93
 
94
+ JSDoc.pm
95
+
96
+ This project is based on the JSDoc.pm tool, created by Michael
97
+ Mathews and Gabriel Reid. More information on JsDoc.pm can
98
+ be found on the JSDoc.pm homepage: http://jsdoc.sourceforge.net/
99
+
100
+ Complete documentation on JsDoc Toolkit can be found on the project
101
+ wiki at http://code.google.com/p/jsdoc-toolkit/w/list
102
+
103
+ Rhino
104
+
84
105
  Rhino (JavaScript in Java) is open source and licensed by Mozilla
85
- under the MPL 1.1 or later/GPL 2.0 or later licenses, the text of which
86
- is available at http://www.mozilla.org/MPL/
106
+ under the MPL 1.1 or later/GPL 2.0 or later licenses, the text of
107
+ which is available at http://www.mozilla.org/MPL/
87
108
 
88
- You can obtain the source code for Rhino via the Mozilla web site at
109
+ You can obtain the source code for Rhino from the Mozilla web site at
89
110
  http://www.mozilla.org/rhino/download.html
90
111
 
91
- The Tango base icon theme is licensed under the Creative Commons
92
- Attribution Share-Alike license. The palette is in the public domain.
93
- For more details visit the Tango! Desktop Project page at
94
- http://tango.freedesktop.org/Tango_Desktop_Project
95
-
96
112
  JsDoc Toolkit is a larger work that uses the Rhino JavaScript engine
97
- without modification and without any claims whatsoever. The portions of
98
- code specific to JsDoc Toolkit are open source and licensed under the
99
- X11/MIT License.
113
+ but is not derived from it in any way. The Rhino library is used
114
+ without modification and without any claims whatsoever.
115
+
116
+ The Rhino Debugger
117
+
118
+ You can obtain more information about the Rhino Debugger from the
119
+ Mozilla web site at http://www.mozilla.org/rhino/debugger.html
120
+
121
+ JsDoc Toolkit is a larger work that uses the Rhino Debugger but
122
+ is not derived from it in any way. The Rhino Debugger is used
123
+ without modification and without any claims whatsoever.
124
+
125
+ JsDoc Toolkit
126
+
127
+ All code specific to JsDoc Toolkit are free, open source and licensed
128
+ for use under the X11/MIT License.
129
+
130
+ JsDoc Toolkit is Copyright (c)2008 Michael Mathews <micmath@gmail.com>
100
131
 
101
- Copyright (c) 2007 Michael Mathews <micmath@gmail.com>
132
+ This program is free software; you can redistribute it and/or
133
+ modify it under the terms below.
102
134
 
103
135
  Permission is hereby granted, free of charge, to any person obtaining
104
136
  a copy of this software and associated documentation files (the