sproutcore 1.6.0.rc.1-x86-mingw32 → 1.6.0.rc.2-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +31 -6
- data/{History.txt → History.rdoc} +0 -0
- data/{README.txt → README.rdoc} +3 -2
- data/Rakefile +15 -15
- data/{Todo.txt → Todo.rdoc} +0 -0
- data/VERSION.yml +1 -1
- data/lib/buildtasks/manifest.rake +11 -4
- data/lib/buildtasks/target.rake +20 -23
- data/lib/frameworks/sproutcore/CHANGELOG.md +36 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/core.js +2 -42
- data/lib/frameworks/sproutcore/frameworks/core_foundation/ext/handlebars/bind.js +2 -1
- data/lib/frameworks/sproutcore/frameworks/core_foundation/ext/handlebars/collection.js +3 -1
- data/lib/frameworks/sproutcore/frameworks/core_foundation/mixins/template_helpers/checkbox_support.js +5 -5
- data/lib/frameworks/sproutcore/frameworks/core_foundation/mixins/template_helpers/text_field_support.js +29 -12
- data/lib/frameworks/sproutcore/frameworks/core_foundation/system/event.js +4 -4
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/mixins/template_helpers/text_field_support.js +9 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/template/collection.js +110 -0
- data/lib/frameworks/sproutcore/frameworks/core_foundation/views/template_collection.js +63 -26
- data/lib/frameworks/sproutcore/frameworks/datastore/system/child_array.js +25 -5
- data/lib/frameworks/sproutcore/frameworks/datastore/system/record_array.js +3 -3
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/nested_record_array.js +26 -3
- data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/record_array/core_methods.js +74 -53
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/alert.js +6 -7
- data/lib/frameworks/sproutcore/frameworks/desktop/panes/picker.js +6 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/alert/ui.js +25 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/tab/methods.js +1 -3
- data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/tab/ui.js +20 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/views/select_field.js +1 -1
- data/lib/frameworks/sproutcore/frameworks/desktop/views/tab.js +46 -49
- data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/container/ui.js +23 -0
- data/lib/frameworks/sproutcore/frameworks/foundation/views/container.js +14 -2
- data/lib/frameworks/sproutcore/frameworks/jquery/jquery-buffered.js +2 -76
- data/lib/frameworks/sproutcore/frameworks/jquery/jquery.js +3348 -1591
- data/lib/frameworks/sproutcore/frameworks/runtime/core.js +25 -5
- data/lib/frameworks/sproutcore/frameworks/runtime/system/index_set.js +0 -3
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/objectForPropertyPath.js +10 -5
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/requiredObjectForPropertyPath.js +29 -0
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/private/observer_queue.js +98 -0
- data/lib/frameworks/sproutcore/themes/ace/resources/collection/normal/list_item.css +2 -2
- data/lib/frameworks/sproutcore/themes/ace/resources/split/split.css +1 -1
- data/lib/gen/language/Buildfile +1 -1
- data/lib/sproutcore.rb +1 -14
- data/lib/sproutcore/buildfile/string_ext.rb +0 -4
- data/lib/sproutcore/helpers/cssmin.rb +44 -59
- data/lib/sproutcore/helpers/text_helper.rb +11 -13
- data/lib/sproutcore/models/manifest.rb +4 -4
- data/lib/sproutcore/models/target.rb +11 -110
- data/lib/sproutcore/rack.rb +0 -1
- data/lib/sproutcore/rack/dev.rb +0 -1
- data/lib/sproutcore/rack/proxy.rb +9 -8
- data/lib/sproutcore/rack/service.rb +1 -1
- data/lib/sproutcore/render_engines/haml.rb +2 -5
- data/lib/sproutcore/tools/build.rb +2 -0
- data/lib/sproutcore/tools/docs.rb +7 -36
- data/lib/sproutcore/tools/manifest.rb +1 -1
- data/spec/buildtasks/target_spec.rb +9 -0
- data/spec/fixtures/real_world/frameworks/sproutcore/Buildfile +1 -1
- data/sproutcore.gemspec +3 -4
- data/vendor/chance/lib/chance/instance.rb +5 -8
- metadata +41 -207
- data/lib/doc_templates/jsdoc/allclasses.tmpl +0 -17
- data/lib/doc_templates/jsdoc/allfiles.tmpl +0 -56
- data/lib/doc_templates/jsdoc/class.tmpl +0 -487
- data/lib/doc_templates/jsdoc/index.tmpl +0 -38
- data/lib/doc_templates/jsdoc/publish.js +0 -170
- data/lib/doc_templates/jsdoc/static/default.css +0 -162
- data/lib/doc_templates/jsdoc/static/header.html +0 -2
- data/lib/doc_templates/jsdoc/static/index.html +0 -19
- data/lib/doc_templates/jsdoc/symbol.tmpl +0 -35
- data/lib/doc_templates/sproutcore/allclasses.tmpl +0 -0
- data/lib/doc_templates/sproutcore/allfiles.tmpl +0 -56
- data/lib/doc_templates/sproutcore/class.tmpl +0 -674
- data/lib/doc_templates/sproutcore/classes-json.tmpl +0 -55
- data/lib/doc_templates/sproutcore/index.tmpl +0 -62
- data/lib/doc_templates/sproutcore/publish.js +0 -346
- data/lib/doc_templates/sproutcore/static/default.css +0 -258
- data/lib/doc_templates/sproutcore/static/header.html +0 -2
- data/lib/doc_templates/sproutcore/static/index.html +0 -19
- data/lib/doc_templates/sproutcore/symbol.tmpl +0 -35
- data/lib/frameworks/sproutcore/frameworks/runtime/tests/private/observer_queue/isObservingSuspended.js +0 -55
- data/lib/sproutcore/rack/docs.rb +0 -24
- data/spec/fixtures/real_world/frameworks/sproutcore/apps/docs/PLACEHOLDER +0 -0
- data/vendor/jsdoc/README.txt +0 -151
- data/vendor/jsdoc/app/frame.js +0 -33
- data/vendor/jsdoc/app/frame/Chain.js +0 -102
- data/vendor/jsdoc/app/frame/Dumper.js +0 -144
- data/vendor/jsdoc/app/frame/Hash.js +0 -47
- data/vendor/jsdoc/app/frame/Link.js +0 -142
- data/vendor/jsdoc/app/frame/Namespace.js +0 -10
- data/vendor/jsdoc/app/frame/Opt.js +0 -134
- data/vendor/jsdoc/app/frame/Reflection.js +0 -26
- data/vendor/jsdoc/app/frame/String.js +0 -93
- data/vendor/jsdoc/app/frame/Testrun.js +0 -129
- data/vendor/jsdoc/app/handlers/FOODOC.js +0 -26
- data/vendor/jsdoc/app/handlers/XMLDOC.js +0 -26
- data/vendor/jsdoc/app/handlers/XMLDOC/DomReader.js +0 -159
- data/vendor/jsdoc/app/handlers/XMLDOC/XMLDoc.js +0 -16
- data/vendor/jsdoc/app/handlers/XMLDOC/XMLParse.js +0 -292
- data/vendor/jsdoc/app/lib/JSDOC.js +0 -98
- data/vendor/jsdoc/app/lib/JSDOC/DocComment.js +0 -200
- data/vendor/jsdoc/app/lib/JSDOC/DocTag.js +0 -294
- data/vendor/jsdoc/app/lib/JSDOC/JsDoc.js +0 -162
- data/vendor/jsdoc/app/lib/JSDOC/JsPlate.js +0 -100
- data/vendor/jsdoc/app/lib/JSDOC/Lang.js +0 -144
- data/vendor/jsdoc/app/lib/JSDOC/Parser.js +0 -109
- data/vendor/jsdoc/app/lib/JSDOC/PluginManager.js +0 -33
- data/vendor/jsdoc/app/lib/JSDOC/Symbol.js +0 -681
- data/vendor/jsdoc/app/lib/JSDOC/SymbolSet.js +0 -226
- data/vendor/jsdoc/app/lib/JSDOC/TextStream.js +0 -41
- data/vendor/jsdoc/app/lib/JSDOC/Token.js +0 -18
- data/vendor/jsdoc/app/lib/JSDOC/TokenReader.js +0 -332
- data/vendor/jsdoc/app/lib/JSDOC/TokenStream.js +0 -133
- data/vendor/jsdoc/app/lib/JSDOC/Util.js +0 -32
- data/vendor/jsdoc/app/lib/JSDOC/Walker.js +0 -453
- data/vendor/jsdoc/app/main.js +0 -74
- data/vendor/jsdoc/app/plugins/commentSrcJson.js +0 -19
- data/vendor/jsdoc/app/plugins/frameworkPrototype.js +0 -16
- data/vendor/jsdoc/app/plugins/functionCall.js +0 -10
- data/vendor/jsdoc/app/plugins/publishSrcHilite.js +0 -62
- data/vendor/jsdoc/app/plugins/sproutcoreTags.js +0 -26
- data/vendor/jsdoc/app/plugins/symbolLink.js +0 -9
- data/vendor/jsdoc/app/plugins/tagParamConfig.js +0 -31
- data/vendor/jsdoc/app/plugins/tagSynonyms.js +0 -43
- data/vendor/jsdoc/app/run.js +0 -346
- data/vendor/jsdoc/app/t/TestDoc.js +0 -144
- data/vendor/jsdoc/app/t/runner.js +0 -13
- data/vendor/jsdoc/app/test.js +0 -304
- data/vendor/jsdoc/app/test/addon.js +0 -24
- data/vendor/jsdoc/app/test/anon_inner.js +0 -14
- data/vendor/jsdoc/app/test/augments.js +0 -31
- data/vendor/jsdoc/app/test/augments2.js +0 -26
- data/vendor/jsdoc/app/test/borrows.js +0 -41
- data/vendor/jsdoc/app/test/borrows2.js +0 -23
- data/vendor/jsdoc/app/test/config.js +0 -22
- data/vendor/jsdoc/app/test/constructs.js +0 -18
- data/vendor/jsdoc/app/test/encoding.js +0 -10
- data/vendor/jsdoc/app/test/encoding_other.js +0 -12
- data/vendor/jsdoc/app/test/functions_anon.js +0 -39
- data/vendor/jsdoc/app/test/functions_nested.js +0 -33
- data/vendor/jsdoc/app/test/global.js +0 -13
- data/vendor/jsdoc/app/test/globals.js +0 -25
- data/vendor/jsdoc/app/test/ignore.js +0 -10
- data/vendor/jsdoc/app/test/inner.js +0 -16
- data/vendor/jsdoc/app/test/jsdoc_test.js +0 -477
- data/vendor/jsdoc/app/test/lend.js +0 -33
- data/vendor/jsdoc/app/test/memberof.js +0 -20
- data/vendor/jsdoc/app/test/memberof_constructor.js +0 -15
- data/vendor/jsdoc/app/test/name.js +0 -19
- data/vendor/jsdoc/app/test/namespace_nested.js +0 -23
- data/vendor/jsdoc/app/test/nocode.js +0 -13
- data/vendor/jsdoc/app/test/oblit_anon.js +0 -20
- data/vendor/jsdoc/app/test/overview.js +0 -20
- data/vendor/jsdoc/app/test/param_inline.js +0 -37
- data/vendor/jsdoc/app/test/params_optional.js +0 -8
- data/vendor/jsdoc/app/test/prototype.js +0 -17
- data/vendor/jsdoc/app/test/prototype_nested.js +0 -9
- data/vendor/jsdoc/app/test/prototype_oblit.js +0 -13
- data/vendor/jsdoc/app/test/prototype_oblit_constructor.js +0 -24
- data/vendor/jsdoc/app/test/public.js +0 -10
- data/vendor/jsdoc/app/test/shared.js +0 -42
- data/vendor/jsdoc/app/test/shared2.js +0 -2
- data/vendor/jsdoc/app/test/shortcuts.js +0 -22
- data/vendor/jsdoc/app/test/static_this.js +0 -13
- data/vendor/jsdoc/app/test/synonyms.js +0 -23
- data/vendor/jsdoc/app/test/tosource.js +0 -23
- data/vendor/jsdoc/app/test/variable_redefine.js +0 -14
- data/vendor/jsdoc/changes.txt +0 -47
- data/vendor/jsdoc/conf/sample.conf +0 -31
- data/vendor/jsdoc/java/build.xml +0 -36
- data/vendor/jsdoc/java/build_1.4.xml +0 -36
- data/vendor/jsdoc/java/classes/js.jar +0 -0
- data/vendor/jsdoc/java/src/JsDebugRun.java +0 -21
- data/vendor/jsdoc/java/src/JsRun.java +0 -21
- data/vendor/jsdoc/jsdebug.jar +0 -0
- data/vendor/jsdoc/jsrun.jar +0 -0
- data/vendor/jsdoc/t/TestDoc.js +0 -144
- data/vendor/jsdoc/t/runner.js +0 -13
- data/vendor/jsdoc/test.js +0 -304
- data/vendor/jsdoc/test/addon.js +0 -24
- data/vendor/jsdoc/test/anon_inner.js +0 -14
- data/vendor/jsdoc/test/augments.js +0 -31
- data/vendor/jsdoc/test/augments2.js +0 -26
- data/vendor/jsdoc/test/borrows.js +0 -41
- data/vendor/jsdoc/test/borrows2.js +0 -23
- data/vendor/jsdoc/test/config.js +0 -22
- data/vendor/jsdoc/test/constructs.js +0 -18
- data/vendor/jsdoc/test/encoding.js +0 -10
- data/vendor/jsdoc/test/encoding_other.js +0 -12
- data/vendor/jsdoc/test/functions_anon.js +0 -39
- data/vendor/jsdoc/test/functions_nested.js +0 -33
- data/vendor/jsdoc/test/global.js +0 -13
- data/vendor/jsdoc/test/globals.js +0 -25
- data/vendor/jsdoc/test/ignore.js +0 -10
- data/vendor/jsdoc/test/inner.js +0 -16
- data/vendor/jsdoc/test/jsdoc_test.js +0 -477
- data/vendor/jsdoc/test/lend.js +0 -33
- data/vendor/jsdoc/test/memberof.js +0 -20
- data/vendor/jsdoc/test/memberof_constructor.js +0 -15
- data/vendor/jsdoc/test/name.js +0 -19
- data/vendor/jsdoc/test/namespace_nested.js +0 -23
- data/vendor/jsdoc/test/nocode.js +0 -13
- data/vendor/jsdoc/test/oblit_anon.js +0 -20
- data/vendor/jsdoc/test/overview.js +0 -20
- data/vendor/jsdoc/test/param_inline.js +0 -37
- data/vendor/jsdoc/test/params_optional.js +0 -8
- data/vendor/jsdoc/test/prototype.js +0 -17
- data/vendor/jsdoc/test/prototype_nested.js +0 -9
- data/vendor/jsdoc/test/prototype_oblit.js +0 -13
- data/vendor/jsdoc/test/prototype_oblit_constructor.js +0 -24
- data/vendor/jsdoc/test/public.js +0 -10
- data/vendor/jsdoc/test/shared.js +0 -42
- data/vendor/jsdoc/test/shared2.js +0 -2
- data/vendor/jsdoc/test/shortcuts.js +0 -22
- data/vendor/jsdoc/test/static_this.js +0 -13
- data/vendor/jsdoc/test/synonyms.js +0 -23
- data/vendor/jsdoc/test/tosource.js +0 -23
- data/vendor/jsdoc/test/variable_redefine.js +0 -14
@@ -1,55 +0,0 @@
|
|
1
|
-
{!
|
2
|
-
function keys(o) {
|
3
|
-
var keys = [];
|
4
|
-
for (var k in o) { keys.push(k); }
|
5
|
-
return keys;
|
6
|
-
}
|
7
|
-
|
8
|
-
function groupName(path) {
|
9
|
-
var parts = path.split('/') ;
|
10
|
-
|
11
|
-
var rootIndex = parts.indexOf('frameworks') ;
|
12
|
-
if (rootIndex < 0) rootIndex = parts.indexOf('clients') ;
|
13
|
-
|
14
|
-
if (rootIndex < 0) {
|
15
|
-
return parts[parts.length - 2] ;
|
16
|
-
|
17
|
-
} else {
|
18
|
-
return parts.slice(rootIndex+2, parts.length-1).join('/') ;
|
19
|
-
}
|
20
|
-
};
|
21
|
-
|
22
|
-
function getSymbols(thisClass) {
|
23
|
-
var ret = [thisClass.alias.toLowerCase()] ;
|
24
|
-
var len = thisClass.properties.length ;
|
25
|
-
|
26
|
-
while (--len>=0) {
|
27
|
-
ret.push(thisClass.properties[len].alias.toLowerCase()) ;
|
28
|
-
}
|
29
|
-
|
30
|
-
return ret.join(' ') ;
|
31
|
-
};
|
32
|
-
|
33
|
-
!}
|
34
|
-
{ records: [
|
35
|
-
<for each="thisClass" in="data">
|
36
|
-
<if test="groupName(thisClass.srcFile) !== undefined">
|
37
|
-
{ "type": "Doc",
|
38
|
-
"guid": "{+(thisClass.alias)+}",
|
39
|
-
<if test="!(thisClass.alias == 'SC')">
|
40
|
-
"title": "{+(thisClass.alias)+}",
|
41
|
-
</if>
|
42
|
-
<if test="(thisClass.alias == 'SC')">
|
43
|
-
"title": "SproutCore (SC)",
|
44
|
-
</if>
|
45
|
-
"url": "{+(thisClass.alias)+}.html",
|
46
|
-
<if test="!(thisClass.alias == 'SC')">
|
47
|
-
"group": "{+groupName(thisClass.srcFile)+}",
|
48
|
-
</if>
|
49
|
-
"symbols": "{+getSymbols(thisClass)+}",
|
50
|
-
"path": "{+thisClass.srcFile+}"
|
51
|
-
},
|
52
|
-
</if>
|
53
|
-
</for>
|
54
|
-
]
|
55
|
-
}
|
@@ -1,62 +0,0 @@
|
|
1
|
-
{!
|
2
|
-
function keys(o) {
|
3
|
-
var keys = [];
|
4
|
-
for (var k in o) { keys.push(k); }
|
5
|
-
return keys;
|
6
|
-
}
|
7
|
-
|
8
|
-
var version;
|
9
|
-
for (var i=0, len=data.length; i < len; i++) {
|
10
|
-
var item = data[i];
|
11
|
-
if (item.alias === 'SC') {
|
12
|
-
version = item.version;
|
13
|
-
break;
|
14
|
-
}
|
15
|
-
}
|
16
|
-
|
17
|
-
!}
|
18
|
-
|
19
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
20
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
21
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
22
|
-
<head>
|
23
|
-
<meta http-equiv="content-type" content="text/html; charset={+IO.encoding+}" />
|
24
|
-
<meta name="generator" content="JsDoc Toolkit" />
|
25
|
-
{! Link.base = ""; /* all generated links will be relative to this */ !}
|
26
|
-
<title>SproutCore Reference Index - v{+version+}</title>
|
27
|
-
|
28
|
-
<style type="text/css">
|
29
|
-
{+include("static/default.css")+}
|
30
|
-
</style>
|
31
|
-
</head>
|
32
|
-
|
33
|
-
<body class="sc-doc">
|
34
|
-
|
35
|
-
<h1>SproutCore Reference Index - v{+version+}</h1>
|
36
|
-
|
37
|
-
<p id="warning">
|
38
|
-
WARNING: This is draft reference documentation generated automatically from the
|
39
|
-
<a href="http://github.com/sproutcore/sproutcore{+ version.match(/^1\.4/) ? '/tree/1-4-stable/' : '' +}">SproutCore source</a>.
|
40
|
-
It has not been fully vetted for accuracy or completeness. Expect to find bugs here and there.
|
41
|
-
If you want to help make the docs better, please grab the source and make the docs better!
|
42
|
-
</p>
|
43
|
-
|
44
|
-
<div id="index">
|
45
|
-
|
46
|
-
<for each="thisClass" in="data">
|
47
|
-
<div>
|
48
|
-
<h2>{+(new Link().toSymbol(thisClass.alias))+}</h2>
|
49
|
-
{+resolveLinks(summarize(thisClass.classDesc))+}
|
50
|
-
</div>
|
51
|
-
<hr />
|
52
|
-
</for>
|
53
|
-
|
54
|
-
</div>
|
55
|
-
|
56
|
-
<!-- ============================== footer ================================= -->
|
57
|
-
<div class="fineprint" style="clear:both">
|
58
|
-
<if test="JSDOC.opt.D.copyright">©{+JSDOC.opt.D.copyright+}<br /></if>
|
59
|
-
Documentation generated by <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a> {+JSDOC.VERSION+} on {+new Date()+}
|
60
|
-
</div>
|
61
|
-
</body>
|
62
|
-
</html>
|
@@ -1,346 +0,0 @@
|
|
1
|
-
// This is the orginial function from Stuart Langridge at http://www.kryogenix.org/
|
2
|
-
// This is the update function from Jeff Minard - http://www.jrm.cc/
|
3
|
-
function superTextile(s) {
|
4
|
-
|
5
|
-
// CAJ - First, strip out extra newlines and whitespace at the start
|
6
|
-
// of comments. This will yield more appropriate text for formatting.
|
7
|
-
s = s.split("\n").map(function(l) { return ((l=='') || (l.match(/^\s+$/))) ? "" : l.replace(/^\s+/,'') ; }).join("\n") ;
|
8
|
-
|
9
|
-
var r = s;
|
10
|
-
// quick tags first
|
11
|
-
qtags = [ ['\\*', '\\*', 'strong'],
|
12
|
-
['\\?\\?', '\\?\\?', 'cite'],
|
13
|
-
['\\+', '\\+', 'ins'], //fixed
|
14
|
-
['~', '~', 'sub'],
|
15
|
-
['\\^', '\\^', 'sup'], // me
|
16
|
-
['{{{', '}}}', 'code'],
|
17
|
-
['@', '@', 'code']];
|
18
|
-
|
19
|
-
for (var i=0;i<qtags.length;i++) {
|
20
|
-
var ttag_o = qtags[i][0], ttag_c = qtags[i][1], htag = qtags[i][2];
|
21
|
-
re = new RegExp(ttag_o+'\\b(.+?)\\b'+ttag_c,'g');
|
22
|
-
r = r.replace(re,'<'+htag+'>'+'$1'+'</'+htag+'>');
|
23
|
-
};
|
24
|
-
|
25
|
-
// underscores count as part of a word, so do them separately
|
26
|
-
re = new RegExp('\\b_(.+?)_\\b','g');
|
27
|
-
r = r.replace(re,'<em>$1</em>');
|
28
|
-
|
29
|
-
//jeff: so do dashes
|
30
|
-
re = new RegExp('[\s\n]-(.+?)-[\s\n]','g');
|
31
|
-
r = r.replace(re,'<del>$1</del>');
|
32
|
-
|
33
|
-
// links
|
34
|
-
re = new RegExp('"\\b(.+?)\\(\\b(.+?)\\b\\)":([^\\s]+)','g');
|
35
|
-
r = r.replace(re,'<a href="$3" title="$2">$1</a>');
|
36
|
-
|
37
|
-
re = new RegExp('"\\b(.+?)\\b":([^\\s]+)','g');
|
38
|
-
r = r.replace(re,'<a href="$2">$1</a>');
|
39
|
-
|
40
|
-
// images
|
41
|
-
re = new RegExp('!\\b(.+?)\\(\\b(.+?)\\b\\)!','g');
|
42
|
-
r = r.replace(re,'<img src="$1" alt="$2">');
|
43
|
-
re = new RegExp('!\\b(.+?)\\b!','g');
|
44
|
-
r = r.replace(re,'<img src="$1">');
|
45
|
-
|
46
|
-
// block level formatting
|
47
|
-
lines = r.split('\n');
|
48
|
-
out = [] ;
|
49
|
-
nr = '';
|
50
|
-
var incode = 0 ;
|
51
|
-
var cur_block = [] ; // collect lines into a block before processing them.
|
52
|
-
for (var i=0;i<lines.length;i++) {
|
53
|
-
var line = lines[i].replace(/\s*$/,'');
|
54
|
-
changed = 0;
|
55
|
-
|
56
|
-
// handle incode behavior.
|
57
|
-
if (incode) {
|
58
|
-
|
59
|
-
// Look for end closing bracket and process it.
|
60
|
-
if (line.match(/^\s*}}}\s*$/)) {
|
61
|
-
incode = 0 ;
|
62
|
-
out.push("<p class=\"code\"><code>" + cur_block.join("<br />") + "</code></p>") ;
|
63
|
-
cur_block = [] ;
|
64
|
-
|
65
|
-
// otherwise, just add the line to the current block, escaping HTML entities
|
66
|
-
} else {
|
67
|
-
cur_block.push(line.split("&").join("&").split("<").join("<").split(">").join(">")) ;
|
68
|
-
}
|
69
|
-
|
70
|
-
// for normal text, look for line-level items to replace. If no
|
71
|
-
// replacement is found, then add the line to the current block.
|
72
|
-
} else {
|
73
|
-
|
74
|
-
// an empty line means we should end the current paragraph
|
75
|
-
if ((line == '') || line.match(/^\s+$/)) {
|
76
|
-
changed = 1 ;
|
77
|
-
line = '' ;
|
78
|
-
|
79
|
-
// convert bq. => blockquote.
|
80
|
-
} else if (line.search(/^\s*bq\.\s+/) != -1) {
|
81
|
-
line = line.replace(/^\s*bq\.\s+/,'\t<blockquote>')+'</blockquote>';
|
82
|
-
changed = 1;
|
83
|
-
|
84
|
-
// convert h* => heading
|
85
|
-
} else if (line.search(/^\s*h[1|2|3|4|5|6]\.\s+/) != -1) {
|
86
|
-
line = line.replace(/^\s*h([1|2|3|4|5|6])\.(.+)/, '<h$1>$2</h$1>');
|
87
|
-
changed = 1;
|
88
|
-
|
89
|
-
// convert - to bulletted list. liu tag will be fixed later.
|
90
|
-
} else if (line.search(/^\s*-\s+/) != -1) {
|
91
|
-
line = line.replace(/^\s*-\s+/,'\t<liu>') + '</liu>'; changed = 1;
|
92
|
-
changed = 1;
|
93
|
-
|
94
|
-
// convert * to bulletted list. liu tag will be fixed later.
|
95
|
-
} else if (line.search(/^\s*\*\s+/) != -1) {
|
96
|
-
line = line.replace(/^\s*\*\s+/,'\t<liu>') + '</liu>'; changed = 1;
|
97
|
-
changed = 1;
|
98
|
-
|
99
|
-
// convert # to numbered list. lio tag will be fixed later.
|
100
|
-
} else if (line.search(/^\s*#\s+/) != -1) {
|
101
|
-
line = line.replace(/^\s*#\s+/,'\t<lio>') + '</lio>'; changed = 1;
|
102
|
-
changed = 1;
|
103
|
-
|
104
|
-
// open code tag will start code
|
105
|
-
} else if (line.match(/^\s*\{\{\{\s*$/)) {
|
106
|
-
incode++ ;
|
107
|
-
line = '' ;
|
108
|
-
changed = 1;
|
109
|
-
}
|
110
|
-
|
111
|
-
// if the line was changed, the emit the current block as a paragraph
|
112
|
-
// and emit the line itself. Otherwise, just push the line into the
|
113
|
-
// current block.
|
114
|
-
if (changed > 0) {
|
115
|
-
if (cur_block.length > 0) {
|
116
|
-
out.push("<p>" + cur_block.join(" ") + '</p>') ;
|
117
|
-
cur_block = [] ;
|
118
|
-
}
|
119
|
-
out.push(line) ;
|
120
|
-
} else {
|
121
|
-
cur_block.push(line) ;
|
122
|
-
}
|
123
|
-
}
|
124
|
-
}
|
125
|
-
|
126
|
-
// done. if there are any lines left, in the current block, emit it.
|
127
|
-
if (cur_block.length > 0) {
|
128
|
-
out.push("<p>" + cur_block.join(" ") + '</p>') ;
|
129
|
-
cur_block = [] ;
|
130
|
-
}
|
131
|
-
|
132
|
-
// Second pass to do lists. This will wrap the lists in <li> | <ol> tags.
|
133
|
-
inlist = 0;
|
134
|
-
listtype = '';
|
135
|
-
for (var i=0;i<out.length;i++) {
|
136
|
-
line = out[i];
|
137
|
-
var addin = null ;
|
138
|
-
|
139
|
-
if (inlist && listtype == 'ul' && !line.match(/^\t<liu/)) {
|
140
|
-
addin = '</ul>\n'; inlist = 0;
|
141
|
-
}
|
142
|
-
|
143
|
-
if (inlist && listtype == 'ol' && !line.match(/^\t<lio/)) {
|
144
|
-
addin = '</ol>\n'; inlist = 0;
|
145
|
-
}
|
146
|
-
|
147
|
-
if (!inlist && line.match(/^\t<liu/)) {
|
148
|
-
line = '<ul>' + line; inlist = 1; listtype = 'ul';
|
149
|
-
}
|
150
|
-
|
151
|
-
if (!inlist && line.match(/^\t<lio/)) {
|
152
|
-
line = '<ol>' + line; inlist = 1; listtype = 'ol';
|
153
|
-
}
|
154
|
-
|
155
|
-
if (addin) line = addin + line ;
|
156
|
-
out[i] = line;
|
157
|
-
}
|
158
|
-
|
159
|
-
// Now we can join the string. Yay!
|
160
|
-
r = out.join('\n');
|
161
|
-
|
162
|
-
// jeff added : will correctly replace <li(o|u)> AND </li(o|u)>
|
163
|
-
r = r.replace(/li[o|u]>/g,'li>');
|
164
|
-
|
165
|
-
return r;
|
166
|
-
};
|
167
|
-
|
168
|
-
function publish(symbolSet) {
|
169
|
-
publish.conf = { // trailing slash expected for dirs
|
170
|
-
ext: ".html",
|
171
|
-
outDir: JSDOC.opt.d || SYS.pwd+"../out/jsdoc/",
|
172
|
-
templatesDir: JSDOC.opt.t || SYS.pwd+"../templates/sproutcore/",
|
173
|
-
symbolsDir: "symbols/",
|
174
|
-
srcDir: "symbols/src/"
|
175
|
-
};
|
176
|
-
|
177
|
-
if (!publish.conf.templatesDir.match(/\/$/)) {
|
178
|
-
publish.conf.templatesDir += '/'; // add trailing slash
|
179
|
-
}
|
180
|
-
|
181
|
-
if (JSDOC.opt.s && defined(Link) && Link.prototype._makeSrcLink) {
|
182
|
-
Link.prototype._makeSrcLink = function(srcFilePath) {
|
183
|
-
return "<"+srcFilePath+">";
|
184
|
-
}
|
185
|
-
}
|
186
|
-
|
187
|
-
IO.mkPath((publish.conf.outDir+"symbols/src").split("/"));
|
188
|
-
|
189
|
-
// used to check the details of things being linked to
|
190
|
-
Link.symbolSet = symbolSet;
|
191
|
-
|
192
|
-
try {
|
193
|
-
var classTemplate = new JSDOC.JsPlate(publish.conf.templatesDir+"class.tmpl");
|
194
|
-
var classesTemplate = new JSDOC.JsPlate(publish.conf.templatesDir+"allclasses.tmpl");
|
195
|
-
}
|
196
|
-
catch(e) {
|
197
|
-
print(e.message);
|
198
|
-
quit();
|
199
|
-
}
|
200
|
-
|
201
|
-
// filters
|
202
|
-
function hasNoParent($) {return ($.memberOf == "")}
|
203
|
-
function isaFile($) {return ($.is("FILE"))}
|
204
|
-
function isaClass($) {return ($.is("CONSTRUCTOR") || $.isNamespace)}
|
205
|
-
|
206
|
-
var symbols = symbolSet.toArray();
|
207
|
-
|
208
|
-
var files = JSDOC.opt.srcFiles;
|
209
|
-
for (var i = 0, l = files.length; i < l; i++) {
|
210
|
-
var file = files[i];
|
211
|
-
var srcDir = publish.conf.outDir + "symbols/src/";
|
212
|
-
makeSrcFile(file, srcDir);
|
213
|
-
}
|
214
|
-
|
215
|
-
var classes = symbols.filter(isaClass).sort(makeSortby("alias"));
|
216
|
-
|
217
|
-
Link.base = "../";
|
218
|
-
publish.classesIndex = classesTemplate.process(classes); // kept in memory
|
219
|
-
|
220
|
-
for (var i = 0, l = classes.length; i < l; i++) {
|
221
|
-
var symbol = classes[i];
|
222
|
-
var output = "";
|
223
|
-
output = classTemplate.process(symbol);
|
224
|
-
|
225
|
-
IO.saveFile(publish.conf.outDir+"symbols/", symbol.alias+publish.conf.ext, output);
|
226
|
-
}
|
227
|
-
|
228
|
-
// regenrate the index with different relative links
|
229
|
-
Link.base = "";
|
230
|
-
publish.classesIndex = classesTemplate.process(classes);
|
231
|
-
|
232
|
-
try {
|
233
|
-
var classesindexTemplate = new JSDOC.JsPlate(publish.conf.templatesDir+"classes-json.tmpl");
|
234
|
-
}
|
235
|
-
catch(e) { print(e.message); quit(); }
|
236
|
-
|
237
|
-
var classesIndex = classesindexTemplate.process(classes);
|
238
|
-
// IO.saveFile(publish.conf.outDir, "index"+publish.conf.ext, classesIndex);
|
239
|
-
IO.saveFile(publish.conf.outDir, "classes.json", classesIndex);
|
240
|
-
classesindexTemplate = classesIndex = null;
|
241
|
-
|
242
|
-
try {
|
243
|
-
var classesindexTemplate = new JSDOC.JsPlate(publish.conf.templatesDir+"index.tmpl");
|
244
|
-
}
|
245
|
-
catch(e) { print(e.message); quit(); }
|
246
|
-
|
247
|
-
var classesIndex = classesindexTemplate.process(classes);
|
248
|
-
IO.saveFile(publish.conf.outDir, "index"+publish.conf.ext, classesIndex);
|
249
|
-
classesindexTemplate = classesIndex = classes = null;
|
250
|
-
|
251
|
-
try {
|
252
|
-
var fileindexTemplate = new JSDOC.JsPlate(publish.conf.templatesDir+"allfiles.tmpl");
|
253
|
-
}
|
254
|
-
catch(e) { print(e.message); quit(); }
|
255
|
-
|
256
|
-
var documentedFiles = symbols.filter(isaFile);
|
257
|
-
var allFiles = [];
|
258
|
-
|
259
|
-
for (var i = 0; i < files.length; i++) {
|
260
|
-
allFiles.push(new JSDOC.Symbol(files[i], [], "FILE", new JSDOC.DocComment("/** */")));
|
261
|
-
}
|
262
|
-
|
263
|
-
for (var i = 0; i < documentedFiles.length; i++) {
|
264
|
-
var offset = files.indexOf(documentedFiles[i].alias);
|
265
|
-
allFiles[offset] = documentedFiles[i];
|
266
|
-
}
|
267
|
-
|
268
|
-
allFiles = allFiles.sort(makeSortby("name"));
|
269
|
-
|
270
|
-
var filesIndex = fileindexTemplate.process(allFiles);
|
271
|
-
IO.saveFile(publish.conf.outDir, "files"+publish.conf.ext, filesIndex);
|
272
|
-
fileindexTemplate = filesIndex = files = null;
|
273
|
-
}
|
274
|
-
|
275
|
-
|
276
|
-
/** Just the first sentence. */
|
277
|
-
function summarize(desc) {
|
278
|
-
if (typeof desc != "undefined")
|
279
|
-
return desc.match(/([\w\W]+?\.)[^a-z0-9]/i)? RegExp.$1 : desc;
|
280
|
-
}
|
281
|
-
|
282
|
-
/** make a symbol sorter by some attribute */
|
283
|
-
function makeSortby(attribute) {
|
284
|
-
return function(a, b) {
|
285
|
-
if (a[attribute] != undefined && b[attribute] != undefined) {
|
286
|
-
a = a[attribute].toLowerCase();
|
287
|
-
b = b[attribute].toLowerCase();
|
288
|
-
if (a < b) return -1;
|
289
|
-
if (a > b) return 1;
|
290
|
-
return 0;
|
291
|
-
}
|
292
|
-
}
|
293
|
-
}
|
294
|
-
|
295
|
-
function include(path) {
|
296
|
-
var path = publish.conf.templatesDir+path;
|
297
|
-
return IO.readFile(path);
|
298
|
-
}
|
299
|
-
|
300
|
-
function makeSrcFile(path, srcDir, name) {
|
301
|
-
if (JSDOC.opt.s) return;
|
302
|
-
|
303
|
-
if (!name) {
|
304
|
-
name = path.replace(/\.\.?[\\\/]/g, "").replace(/[\\\/]/g, "_");
|
305
|
-
name = name.replace(/\:/g, "_");
|
306
|
-
}
|
307
|
-
|
308
|
-
var src = {path: path, name:name, charset: IO.encoding, hilited: ""};
|
309
|
-
|
310
|
-
if (defined(JSDOC.PluginManager)) {
|
311
|
-
JSDOC.PluginManager.run("onPublishSrc", src);
|
312
|
-
}
|
313
|
-
|
314
|
-
if (src.hilited) {
|
315
|
-
IO.saveFile(srcDir, name+publish.conf.ext, src.hilited);
|
316
|
-
}
|
317
|
-
}
|
318
|
-
|
319
|
-
function makeSignature(params) {
|
320
|
-
if (!params) return "()";
|
321
|
-
var signature = "("
|
322
|
-
+
|
323
|
-
params.filter(
|
324
|
-
function($) {
|
325
|
-
return $.name.indexOf(".") == -1; // don't show config params in signature
|
326
|
-
}
|
327
|
-
).map(
|
328
|
-
function($) {
|
329
|
-
return $.name;
|
330
|
-
}
|
331
|
-
).join(", ")
|
332
|
-
+
|
333
|
-
")";
|
334
|
-
return signature;
|
335
|
-
}
|
336
|
-
|
337
|
-
/** Find symbol {@link ...} strings in text and turn into html links */
|
338
|
-
function resolveLinks(str, from) {
|
339
|
-
str = str.replace(/\{@link ([^} ]+) ?\}/gi,
|
340
|
-
function(match, symbolName) {
|
341
|
-
return new Link().toSymbol(symbolName);
|
342
|
-
}
|
343
|
-
);
|
344
|
-
|
345
|
-
return str;
|
346
|
-
}
|