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
data/jsdoc/t/TestDoc.js
ADDED
@@ -0,0 +1,144 @@
|
|
1
|
+
var TestDoc = {
|
2
|
+
fails: 0,
|
3
|
+
plans: 0,
|
4
|
+
passes: 0,
|
5
|
+
results: []
|
6
|
+
};
|
7
|
+
|
8
|
+
TestDoc.record = function(result) {
|
9
|
+
TestDoc.results.push(result);
|
10
|
+
if (typeof result.verdict == "boolean") {
|
11
|
+
if (result.verdict === false) TestDoc.fails++;
|
12
|
+
if (result.verdict === true) TestDoc.passes++;
|
13
|
+
}
|
14
|
+
}
|
15
|
+
|
16
|
+
TestDoc.prove = function(filePath) {
|
17
|
+
if (typeof document != "undefined" && typeof document.write != "undefined") {
|
18
|
+
if (TestDoc.console) print = function(s) { TestDoc.console.appendChild(document.createTextNode(s+"\n")); }
|
19
|
+
else print = function(s) { document.write(s+"<br />"); }
|
20
|
+
}
|
21
|
+
TestDoc.run(TestDoc.readFile(filePath));
|
22
|
+
}
|
23
|
+
|
24
|
+
TestDoc.run = function(src) {
|
25
|
+
try { eval(src); } catch(e) { print("# ERROR! "+e); }
|
26
|
+
|
27
|
+
var chunks = src.split(/\/\*t:/);
|
28
|
+
|
29
|
+
var run = function(chunk) {
|
30
|
+
// local shortcuts
|
31
|
+
var is = TestDoc.assertEquals;
|
32
|
+
var isnt = TestDoc.assertNotEquals;
|
33
|
+
var plan = TestDoc.plan;
|
34
|
+
var requires = TestDoc.requires;
|
35
|
+
|
36
|
+
try { eval(chunk); } catch(e) { print("# ERROR! "+e); }
|
37
|
+
}
|
38
|
+
for (var start = -1, end = 0; (start = src.indexOf("/*t:", end)) > end; start = end) {
|
39
|
+
run(
|
40
|
+
src.substring(
|
41
|
+
start+4,
|
42
|
+
(end = src.indexOf("*/", start))
|
43
|
+
)
|
44
|
+
);
|
45
|
+
}
|
46
|
+
}
|
47
|
+
|
48
|
+
TestDoc.Result = function(verdict, message) {
|
49
|
+
this.verdict = verdict;
|
50
|
+
this.message = message;
|
51
|
+
}
|
52
|
+
|
53
|
+
TestDoc.Result.prototype.toString = function() {
|
54
|
+
if (typeof this.verdict == "boolean") {
|
55
|
+
return (this.verdict? "ok" : "not ok") + " " + (++TestDoc.report.counter) + " - " + this.message;
|
56
|
+
}
|
57
|
+
|
58
|
+
return "# " + this.message;
|
59
|
+
}
|
60
|
+
|
61
|
+
TestDoc.requires = function(file) {
|
62
|
+
if (!TestDoc.requires.loaded[file]) {
|
63
|
+
load(file);
|
64
|
+
TestDoc.requires.loaded[file] = true;
|
65
|
+
}
|
66
|
+
}
|
67
|
+
TestDoc.requires.loaded = {};
|
68
|
+
|
69
|
+
TestDoc.report = function() {
|
70
|
+
TestDoc.report.counter = 0;
|
71
|
+
print("1.."+TestDoc.plans);
|
72
|
+
for (var i = 0; i < TestDoc.results.length; i++) {
|
73
|
+
print(TestDoc.results[i]);
|
74
|
+
}
|
75
|
+
print("----------------------------------------");
|
76
|
+
if (TestDoc.fails == 0 && TestDoc.passes == TestDoc.plans) {
|
77
|
+
print("All tests successful.");
|
78
|
+
}
|
79
|
+
else {
|
80
|
+
print("Failed " + TestDoc.fails + "/" + TestDoc.plans + " tests, "+((TestDoc.plans == 0)? 0 : Math.round(TestDoc.passes/(TestDoc.passes+TestDoc.fails)*10000)/100)+"% okay. Planned to run "+TestDoc.plans+", did run "+(TestDoc.passes+TestDoc.fails)+".")
|
81
|
+
}
|
82
|
+
}
|
83
|
+
|
84
|
+
TestDoc.plan = function(n, message) {
|
85
|
+
TestDoc.plans += n;
|
86
|
+
TestDoc.record(new TestDoc.Result(null, message+" ("+n+" tests)"));
|
87
|
+
}
|
88
|
+
|
89
|
+
TestDoc.assertEquals = function(a, b, message) {
|
90
|
+
var result = (a == b);
|
91
|
+
if (!result) message += "\n#\n# " + a + " does not equal " + b + "\n#";
|
92
|
+
TestDoc.record(new TestDoc.Result(result, message));
|
93
|
+
}
|
94
|
+
|
95
|
+
TestDoc.assertNotEquals = function(a, b, message) {
|
96
|
+
var result = (a != b);
|
97
|
+
if (!result) message += "\n#\n# " + a + " equals " + b + "\n#";
|
98
|
+
TestDoc.record(new TestDoc.Result(result, message));
|
99
|
+
}
|
100
|
+
|
101
|
+
TestDoc.readFile = (function(){
|
102
|
+
// rhino
|
103
|
+
if (typeof readFile == "function") {
|
104
|
+
return function(url) {
|
105
|
+
var text = readFile(url);
|
106
|
+
return text || "";
|
107
|
+
}
|
108
|
+
}
|
109
|
+
|
110
|
+
// a web browser
|
111
|
+
else {
|
112
|
+
return function(url) {
|
113
|
+
var httpRequest;
|
114
|
+
|
115
|
+
if (window.XMLHttpRequest) { // Mozilla, Safari, etc
|
116
|
+
httpRequest = new XMLHttpRequest();
|
117
|
+
}
|
118
|
+
else if (window.ActiveXObject) { // IE
|
119
|
+
try {
|
120
|
+
httpRequest = new ActiveXObject("Msxml2.XMLHTTP");
|
121
|
+
}
|
122
|
+
catch (e) {
|
123
|
+
try {
|
124
|
+
httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
|
125
|
+
}
|
126
|
+
catch (e) {
|
127
|
+
}
|
128
|
+
}
|
129
|
+
}
|
130
|
+
|
131
|
+
if (!httpRequest) { throw "Cannot create HTTP Request."; }
|
132
|
+
|
133
|
+
httpRequest.open('GET', url, false);
|
134
|
+
httpRequest.send('');
|
135
|
+
if (httpRequest.readyState == 4) {
|
136
|
+
if (httpRequest.status >= 400) {
|
137
|
+
throw "The HTTP Request returned an error code: "+httpRequest.status;
|
138
|
+
}
|
139
|
+
}
|
140
|
+
|
141
|
+
return httpRequest.responseText || "";
|
142
|
+
}
|
143
|
+
}
|
144
|
+
})();
|
data/jsdoc/t/runner.js
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
// try: java -jar ../../jsrun.jar runner.js
|
2
|
+
|
3
|
+
load("TestDoc.js");
|
4
|
+
|
5
|
+
TestDoc.prove("../frame/Opt.js");
|
6
|
+
TestDoc.prove("../lib/JSDOC.js");
|
7
|
+
TestDoc.prove("../frame/String.js");
|
8
|
+
TestDoc.prove("../lib/JSDOC/DocTag.js");
|
9
|
+
TestDoc.prove("../lib/JSDOC/DocComment.js");
|
10
|
+
TestDoc.prove("../lib/JSDOC/TokenReader.js");
|
11
|
+
TestDoc.prove("../lib/JSDOC/Symbol.js");
|
12
|
+
|
13
|
+
TestDoc.report();
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<div align="center">{+new Link().toFile("index.html").withText("Class Index")+}
|
2
|
+
| {+new Link().toFile("files.html").withText("File Index")+}</div>
|
3
|
+
<hr />
|
4
|
+
<h2>Classes</h2>
|
5
|
+
<ul class="classList">
|
6
|
+
<for each="thisClass" in="data">
|
7
|
+
<li>{!
|
8
|
+
if (thisClass.alias == "_global_") {
|
9
|
+
output += "<i>"+new Link().toClass(thisClass.alias)+"</i>";
|
10
|
+
}
|
11
|
+
else {
|
12
|
+
output += new Link().toClass(thisClass.alias);
|
13
|
+
}
|
14
|
+
!}</li>
|
15
|
+
</for>
|
16
|
+
</ul>
|
17
|
+
<hr />
|
@@ -0,0 +1,56 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="content-type" content="text/html; charset={+IO.encoding+}"" />
|
6
|
+
{! Link.base = ""; /* all generated links will be relative to this */ !}
|
7
|
+
<title>JsDoc Reference - File Index</title>
|
8
|
+
<meta name="generator" content="JsDoc Toolkit" />
|
9
|
+
|
10
|
+
<style type="text/css">
|
11
|
+
{+include("static/default.css")+}
|
12
|
+
</style>
|
13
|
+
</head>
|
14
|
+
|
15
|
+
<body>
|
16
|
+
{+include("static/header.html")+}
|
17
|
+
|
18
|
+
<div id="index">
|
19
|
+
{+publish.classesIndex+}
|
20
|
+
</div>
|
21
|
+
|
22
|
+
<div id="content">
|
23
|
+
<h1 class="classTitle">File Index</h1>
|
24
|
+
|
25
|
+
<for each="item" in="data">
|
26
|
+
<div>
|
27
|
+
<h2>{+new Link().toSrc(item.alias).withText(item.name)+}</h2>
|
28
|
+
<if test="item.desc">{+resolveLinks(summarize(item.desc))+}</if>
|
29
|
+
<dl>
|
30
|
+
<if test="item.author">
|
31
|
+
<dt class="heading">Author:</dt>
|
32
|
+
<dd>{+item.author+}</dd>
|
33
|
+
</if>
|
34
|
+
<if test="item.version">
|
35
|
+
<dt class="heading">Version:</dt>
|
36
|
+
<dd>{+item.version+}</dd>
|
37
|
+
</if>
|
38
|
+
{! var locations = item.comment.getTag('location').map(function($){return $.toString().replace(/(^\$ ?| ?\$$)/g, '').replace(/^HeadURL: https:/g, 'http:');}) !}
|
39
|
+
<if test="locations.length">
|
40
|
+
<dt class="heading">Location:</dt>
|
41
|
+
<for each="location" in="locations">
|
42
|
+
<dd><a href="{+location+}">{+location+}</a></dd>
|
43
|
+
</for>
|
44
|
+
</if>
|
45
|
+
</dl>
|
46
|
+
</div>
|
47
|
+
<hr />
|
48
|
+
</for>
|
49
|
+
|
50
|
+
</div>
|
51
|
+
<div class="fineprint" style="clear:both">
|
52
|
+
<if test="JSDOC.opt.D.copyright">©{+JSDOC.opt.D.copyright+}<br /></if>
|
53
|
+
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blankt">JsDoc Toolkit</a> {+JSDOC.VERSION+} on {+new Date()+}
|
54
|
+
</div>
|
55
|
+
</body>
|
56
|
+
</html>
|