sproutcore 0.9.13 → 0.9.14
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +19 -0
- data/Manifest.txt +103 -26
- data/app_generators/sproutcore/templates/README +1 -1
- data/bin/sc-build +1 -1
- data/bin/sc-gen +0 -0
- data/bin/sc-ide +278 -0
- data/bin/sc-init +38 -0
- data/bin/sc-install +96 -0
- data/bin/sc-remove +94 -0
- data/bin/sc-server +4 -0
- data/bin/sc-update +94 -0
- data/bin/sproutcore +3 -14
- data/clients/sc_docs/controllers/docs.js +1 -1
- data/clients/sc_docs/models/doc.js +6 -0
- data/clients/sc_docs/views/doc_frame.js +1 -1
- data/clients/sc_test_runner/english.lproj/icons/small/next.png +0 -0
- data/clients/sc_test_runner/english.lproj/icons/small/reset.png +0 -0
- data/frameworks/sproutcore/HISTORY +34 -2
- data/frameworks/sproutcore/controllers/array.js +1 -1
- data/frameworks/sproutcore/controllers/controller.js +1 -1
- data/frameworks/sproutcore/controllers/object.js +9 -6
- data/frameworks/sproutcore/core.js +19 -4
- data/frameworks/sproutcore/english.lproj/blank.gif +0 -0
- data/frameworks/sproutcore/english.lproj/core.css +1 -0
- data/frameworks/sproutcore/english.lproj/menu.css +1 -0
- data/frameworks/sproutcore/foundation/application.js +3 -3
- data/frameworks/sproutcore/foundation/benchmark.js +1 -1
- data/frameworks/sproutcore/foundation/node_descriptor.js +13 -1
- data/frameworks/sproutcore/foundation/page.js +3 -2
- data/frameworks/sproutcore/foundation/path_module.js +33 -16
- data/frameworks/sproutcore/foundation/run_loop.js +1 -1
- data/frameworks/sproutcore/foundation/server.js +68 -18
- data/frameworks/sproutcore/foundation/string.js +1 -1
- data/frameworks/sproutcore/globals/window.js +62 -15
- data/frameworks/sproutcore/lib/core_views.rb +1 -0
- data/frameworks/sproutcore/lib/index.rhtml +4 -3
- data/frameworks/sproutcore/lib/menu_views.rb +2 -2
- data/frameworks/sproutcore/models/collection.js +122 -107
- data/frameworks/sproutcore/models/record.js +2 -2
- data/frameworks/sproutcore/panes/manager.js +1 -1
- data/frameworks/sproutcore/panes/overlay.js +3 -3
- data/frameworks/sproutcore/tests/controllers/object.rhtml +26 -0
- data/frameworks/sproutcore/tests/views/collection/incremental_rendering.rhtml +2 -2
- data/frameworks/sproutcore/views/button/disclosure.js +1 -1
- data/frameworks/sproutcore/views/collection/collection.js +19 -15
- data/frameworks/sproutcore/views/collection/source_list.js +1 -1
- data/frameworks/sproutcore/views/collection/table.js +2 -2
- data/frameworks/sproutcore/views/error_explanation.js +1 -1
- data/frameworks/sproutcore/views/field/checkbox_field.js +1 -1
- data/frameworks/sproutcore/views/field/field.js +1 -1
- data/frameworks/sproutcore/views/field/radio_field.js +1 -1
- data/frameworks/sproutcore/views/field/select_field.js +1 -1
- data/frameworks/sproutcore/views/form.js +1 -1
- data/frameworks/sproutcore/views/image.js +1 -1
- data/frameworks/sproutcore/views/menu_item.js +1 -1
- data/frameworks/sproutcore/views/popup_button.js +1 -1
- data/frameworks/sproutcore/views/popup_menu.js +1 -1
- data/frameworks/sproutcore/views/progress.js +4 -2
- data/frameworks/sproutcore/views/radio_group.js +1 -1
- data/frameworks/sproutcore/views/scroll.js +1 -1
- data/frameworks/sproutcore/views/source_list_group.js +1 -1
- data/frameworks/sproutcore/views/split.js +1 -1
- data/frameworks/sproutcore/views/tab.js +3 -1
- data/frameworks/sproutcore/views/view.js +19 -3
- data/jsdoc/README.txt +89 -57
- data/jsdoc/app/frame/Chain.js +102 -0
- data/jsdoc/app/frame/Dumper.js +144 -0
- data/jsdoc/app/frame/Hash.js +47 -0
- data/jsdoc/app/frame/Link.js +142 -0
- data/jsdoc/app/frame/Namespace.js +10 -0
- data/jsdoc/app/frame/Opt.js +134 -0
- data/jsdoc/app/frame/Reflection.js +26 -0
- data/jsdoc/app/frame/String.js +93 -0
- data/jsdoc/app/frame/Testrun.js +129 -0
- data/jsdoc/app/frame.js +33 -0
- data/jsdoc/app/handlers/FOODOC.js +26 -0
- data/jsdoc/app/handlers/XMLDOC/DomReader.js +159 -0
- data/jsdoc/app/handlers/XMLDOC/XMLDoc.js +16 -0
- data/jsdoc/app/handlers/XMLDOC/XMLParse.js +292 -0
- data/jsdoc/app/handlers/XMLDOC.js +26 -0
- data/jsdoc/app/lib/JSDOC/DocComment.js +200 -0
- data/jsdoc/app/lib/JSDOC/DocTag.js +294 -0
- data/jsdoc/app/lib/JSDOC/JsDoc.js +180 -0
- data/jsdoc/app/lib/JSDOC/JsPlate.js +100 -0
- data/jsdoc/app/lib/JSDOC/Lang.js +144 -0
- data/jsdoc/app/lib/JSDOC/Parser.js +109 -0
- data/jsdoc/app/lib/JSDOC/PluginManager.js +33 -0
- data/jsdoc/app/lib/JSDOC/Symbol.js +600 -0
- data/jsdoc/app/lib/JSDOC/SymbolSet.js +220 -0
- data/jsdoc/app/lib/JSDOC/TextStream.js +41 -0
- data/jsdoc/app/lib/JSDOC/Token.js +18 -0
- data/jsdoc/app/lib/JSDOC/TokenReader.js +323 -0
- data/jsdoc/app/lib/JSDOC/TokenStream.js +133 -0
- data/jsdoc/app/lib/JSDOC/Util.js +32 -0
- data/jsdoc/app/lib/JSDOC/Walker.js +416 -0
- data/jsdoc/app/lib/JSDOC.js +97 -0
- data/jsdoc/app/main.js +74 -0
- data/jsdoc/app/plugins/commentSrcJson.js +19 -0
- data/jsdoc/app/plugins/frameworkPrototype.js +16 -0
- data/jsdoc/app/plugins/functionCall.js +10 -0
- data/jsdoc/app/plugins/publishSrcHilite.js +62 -0
- data/jsdoc/app/plugins/sproutcoreTags.js +26 -0
- data/jsdoc/app/plugins/symbolLink.js +9 -0
- data/jsdoc/app/plugins/tagParamConfig.js +31 -0
- data/jsdoc/app/plugins/tagSynonyms.js +43 -0
- data/jsdoc/app/run.js +339 -137
- data/jsdoc/changes.txt +47 -0
- data/jsdoc/conf/sample.conf +31 -0
- data/jsdoc/java/build.xml +36 -0
- data/jsdoc/java/build_1.4.xml +36 -0
- data/jsdoc/java/classes/js.jar +0 -0
- data/jsdoc/java/src/JsDebugRun.java +21 -0
- data/jsdoc/java/src/JsRun.java +21 -0
- data/jsdoc/jsdebug.jar +0 -0
- data/jsdoc/jsrun.jar +0 -0
- data/jsdoc/t/TestDoc.js +144 -0
- data/jsdoc/t/runner.js +13 -0
- data/jsdoc/templates/sproutcore/allclasses.tmpl +17 -0
- data/jsdoc/templates/sproutcore/allfiles.tmpl +56 -0
- data/jsdoc/templates/sproutcore/class.tmpl +408 -326
- data/jsdoc/templates/sproutcore/index.tmpl +30 -31
- data/jsdoc/templates/sproutcore/publish.js +173 -81
- data/jsdoc/templates/sproutcore/static/default.css +191 -0
- data/jsdoc/templates/sproutcore/static/header.html +2 -0
- data/jsdoc/templates/sproutcore/static/index.html +19 -0
- data/jsdoc/templates/sproutcore/symbol.tmpl +35 -0
- data/jsdoc/test/addon.js +24 -0
- data/jsdoc/test/anon_inner.js +14 -0
- data/jsdoc/test/augments.js +31 -0
- data/jsdoc/test/augments2.js +26 -0
- data/jsdoc/test/borrows.js +41 -0
- data/jsdoc/test/borrows2.js +23 -0
- data/jsdoc/test/config.js +22 -0
- data/jsdoc/test/constructs.js +18 -0
- data/jsdoc/test/encoding.js +10 -0
- data/jsdoc/test/encoding_other.js +12 -0
- data/jsdoc/test/functions_anon.js +39 -0
- data/jsdoc/test/functions_nested.js +33 -0
- data/jsdoc/test/global.js +13 -0
- data/jsdoc/test/globals.js +25 -0
- data/jsdoc/test/ignore.js +10 -0
- data/jsdoc/test/inner.js +16 -0
- data/jsdoc/test/jsdoc_test.js +477 -0
- data/jsdoc/test/lend.js +33 -0
- data/jsdoc/test/memberof.js +20 -0
- data/jsdoc/test/memberof_constructor.js +15 -0
- data/jsdoc/test/name.js +19 -0
- data/jsdoc/test/namespace_nested.js +23 -0
- data/jsdoc/test/nocode.js +13 -0
- data/jsdoc/test/oblit_anon.js +20 -0
- data/jsdoc/test/overview.js +20 -0
- data/jsdoc/test/param_inline.js +37 -0
- data/jsdoc/test/params_optional.js +8 -0
- data/jsdoc/test/prototype.js +17 -0
- data/jsdoc/test/prototype_nested.js +9 -0
- data/jsdoc/test/prototype_oblit.js +13 -0
- data/jsdoc/test/prototype_oblit_constructor.js +24 -0
- data/jsdoc/test/public.js +10 -0
- data/jsdoc/test/shared.js +42 -0
- data/jsdoc/test/shared2.js +2 -0
- data/jsdoc/test/shortcuts.js +22 -0
- data/jsdoc/test/static_this.js +13 -0
- data/jsdoc/test/synonyms.js +23 -0
- data/jsdoc/test/tosource.js +23 -0
- data/jsdoc/test/variable_redefine.js +14 -0
- data/jsdoc/test.js +304 -0
- data/lib/sproutcore/build_tools/resource_builder.rb +6 -1
- data/lib/sproutcore/bundle_installer.rb +268 -0
- data/lib/sproutcore/jsdoc.rb +7 -6
- data/lib/sproutcore/library.rb +38 -0
- data/lib/sproutcore/merb/bundle_controller.rb +8 -4
- data/lib/sproutcore/version.rb +1 -1
- data/lib/sproutcore.rb +1 -1
- data/script/destroy +0 -0
- data/script/generate +0 -0
- data/script/txt2html +0 -0
- metadata +117 -29
- data/clients/view_builder/core.js +0 -19
- data/clients/view_builder/english.lproj/body.css +0 -149
- data/clients/view_builder/english.lproj/body.rhtml +0 -18
- data/clients/view_builder/english.lproj/strings.js +0 -14
- data/clients/view_builder/main.js +0 -37
- data/jsdoc/app/DocFile.js +0 -137
- data/jsdoc/app/DocTag.js +0 -110
- data/jsdoc/app/Doclet.js +0 -63
- data/jsdoc/app/Dumper.js +0 -143
- data/jsdoc/app/JsDoc.js +0 -103
- data/jsdoc/app/JsHilite.js +0 -45
- data/jsdoc/app/JsIO.js +0 -163
- data/jsdoc/app/JsParse.js +0 -385
- data/jsdoc/app/JsPlate.js +0 -130
- data/jsdoc/app/JsTestrun.js +0 -129
- data/jsdoc/app/JsToke.js +0 -564
- data/jsdoc/app/Symbol.js +0 -298
- data/jsdoc/app/Transformer.js +0 -14
- data/jsdoc/app/Util.js +0 -97
- data/jsdoc/app/js.jar +0 -0
- data/jsdoc/plugins/min.js +0 -316
- data/jsdoc/plugins/strip.js +0 -20
- data/jsdoc/templates/sproutcore/default.css +0 -191
- data/jsdoc/templates/sproutcore/index.html +0 -13
- data/jsdoc/templates/sproutcore/prototype.js +0 -4186
- 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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
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
|
-
|
1155
|
-
|
1156
|
-
|
1157
|
-
|
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
|
-
|
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
|
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
|
-
//
|
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
|
-
//
|
81
|
+
// console.log('computeFrame(%@)'.fmt($H(f).inspect())) ;
|
82
82
|
return f ;
|
83
83
|
},
|
84
84
|
|
@@ -32,7 +32,7 @@ SC.CheckboxFieldView = SC.FieldView.extend(
|
|
32
32
|
valueBindingDefault: SC.Binding.Bool,
|
33
33
|
|
34
34
|
init: function() {
|
35
|
-
|
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
|
-
|
184
|
+
sc_super();
|
185
185
|
(isEnabled) ? this.enableField() : this.disableField();
|
186
186
|
}.observes('isEnabled'),
|
187
187
|
|
@@ -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
|
-
|
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
|
-
|
155
|
+
sc_super() ;
|
156
156
|
this.valueObserver() ;
|
157
157
|
if (this.rootElement.src) {
|
158
158
|
this.set('imageWidth',parseInt(this.rootElement.width,0)) ;
|
@@ -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 (
|
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
|
-
|
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
|
-
|
97
|
-
|
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
|
}
|
@@ -50,7 +50,7 @@ SC.ScrollView = SC.ContainerView.extend(SC.Scrollable, {
|
|
50
50
|
}.observes('canScrollHorizontal'),
|
51
51
|
|
52
52
|
init: function() {
|
53
|
-
|
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 ==
|
80
|
+
if ((key == '*') || (groupVisibleKey && (key == groupVisibleKey))) {
|
81
81
|
|
82
82
|
if (groupVisibleKey) {
|
83
83
|
|
@@ -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.
|
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
|
-
|
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(
|
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
|
-
|
6
|
-
|
7
|
-
|
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
|
-
|
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
|
19
|
+
project homepage at http://code.google.com/p/jsdoc-toolkit/
|
14
20
|
|
15
|
-
|
16
|
-
|
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
|
28
|
-
|
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
|
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
|
-
|
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
|
-
|
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
|
47
|
-
and templates subdirectories from the standard JsDoc
|
48
|
-
distribution
|
49
|
-
|
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
|
-
|
52
|
-
|
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
|
-
|
68
|
+
For help (usage notes) enter this on the command line:
|
55
69
|
|
56
|
-
|
57
|
-
you would specify that like so:
|
70
|
+
$ java -jar jsrun.jar app/run.js --help
|
58
71
|
|
59
|
-
|
72
|
+
More information about the various command line options used by JsDoc
|
73
|
+
Toolkit are available on the project wiki.
|
60
74
|
|
61
|
-
|
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
|
-
|
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
|
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
|
-
|
82
|
+
$ java -jar jsrun.jar app/run.js -T
|
73
83
|
|
74
|
-
To
|
75
|
-
command
|
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
|
-
|
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
|
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
|
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
|
-
|
98
|
-
|
99
|
-
|
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
|
-
|
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
|