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.
Files changed (217) hide show
  1. data/CHANGELOG +31 -6
  2. data/{History.txt → History.rdoc} +0 -0
  3. data/{README.txt → README.rdoc} +3 -2
  4. data/Rakefile +15 -15
  5. data/{Todo.txt → Todo.rdoc} +0 -0
  6. data/VERSION.yml +1 -1
  7. data/lib/buildtasks/manifest.rake +11 -4
  8. data/lib/buildtasks/target.rake +20 -23
  9. data/lib/frameworks/sproutcore/CHANGELOG.md +36 -0
  10. data/lib/frameworks/sproutcore/frameworks/core_foundation/core.js +2 -42
  11. data/lib/frameworks/sproutcore/frameworks/core_foundation/ext/handlebars/bind.js +2 -1
  12. data/lib/frameworks/sproutcore/frameworks/core_foundation/ext/handlebars/collection.js +3 -1
  13. data/lib/frameworks/sproutcore/frameworks/core_foundation/mixins/template_helpers/checkbox_support.js +5 -5
  14. data/lib/frameworks/sproutcore/frameworks/core_foundation/mixins/template_helpers/text_field_support.js +29 -12
  15. data/lib/frameworks/sproutcore/frameworks/core_foundation/system/event.js +4 -4
  16. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/mixins/template_helpers/text_field_support.js +9 -0
  17. data/lib/frameworks/sproutcore/frameworks/core_foundation/tests/views/template/collection.js +110 -0
  18. data/lib/frameworks/sproutcore/frameworks/core_foundation/views/template_collection.js +63 -26
  19. data/lib/frameworks/sproutcore/frameworks/datastore/system/child_array.js +25 -5
  20. data/lib/frameworks/sproutcore/frameworks/datastore/system/record_array.js +3 -3
  21. data/lib/frameworks/sproutcore/frameworks/datastore/tests/models/nested_records/nested_record_array.js +26 -3
  22. data/lib/frameworks/sproutcore/frameworks/datastore/tests/system/record_array/core_methods.js +74 -53
  23. data/lib/frameworks/sproutcore/frameworks/desktop/panes/alert.js +6 -7
  24. data/lib/frameworks/sproutcore/frameworks/desktop/panes/picker.js +6 -3
  25. data/lib/frameworks/sproutcore/frameworks/desktop/tests/panes/alert/ui.js +25 -1
  26. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/tab/methods.js +1 -3
  27. data/lib/frameworks/sproutcore/frameworks/desktop/tests/views/tab/ui.js +20 -1
  28. data/lib/frameworks/sproutcore/frameworks/desktop/views/select_field.js +1 -1
  29. data/lib/frameworks/sproutcore/frameworks/desktop/views/tab.js +46 -49
  30. data/lib/frameworks/sproutcore/frameworks/foundation/tests/views/container/ui.js +23 -0
  31. data/lib/frameworks/sproutcore/frameworks/foundation/views/container.js +14 -2
  32. data/lib/frameworks/sproutcore/frameworks/jquery/jquery-buffered.js +2 -76
  33. data/lib/frameworks/sproutcore/frameworks/jquery/jquery.js +3348 -1591
  34. data/lib/frameworks/sproutcore/frameworks/runtime/core.js +25 -5
  35. data/lib/frameworks/sproutcore/frameworks/runtime/system/index_set.js +0 -3
  36. data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/objectForPropertyPath.js +10 -5
  37. data/lib/frameworks/sproutcore/frameworks/runtime/tests/core/requiredObjectForPropertyPath.js +29 -0
  38. data/lib/frameworks/sproutcore/frameworks/runtime/tests/private/observer_queue.js +98 -0
  39. data/lib/frameworks/sproutcore/themes/ace/resources/collection/normal/list_item.css +2 -2
  40. data/lib/frameworks/sproutcore/themes/ace/resources/split/split.css +1 -1
  41. data/lib/gen/language/Buildfile +1 -1
  42. data/lib/sproutcore.rb +1 -14
  43. data/lib/sproutcore/buildfile/string_ext.rb +0 -4
  44. data/lib/sproutcore/helpers/cssmin.rb +44 -59
  45. data/lib/sproutcore/helpers/text_helper.rb +11 -13
  46. data/lib/sproutcore/models/manifest.rb +4 -4
  47. data/lib/sproutcore/models/target.rb +11 -110
  48. data/lib/sproutcore/rack.rb +0 -1
  49. data/lib/sproutcore/rack/dev.rb +0 -1
  50. data/lib/sproutcore/rack/proxy.rb +9 -8
  51. data/lib/sproutcore/rack/service.rb +1 -1
  52. data/lib/sproutcore/render_engines/haml.rb +2 -5
  53. data/lib/sproutcore/tools/build.rb +2 -0
  54. data/lib/sproutcore/tools/docs.rb +7 -36
  55. data/lib/sproutcore/tools/manifest.rb +1 -1
  56. data/spec/buildtasks/target_spec.rb +9 -0
  57. data/spec/fixtures/real_world/frameworks/sproutcore/Buildfile +1 -1
  58. data/sproutcore.gemspec +3 -4
  59. data/vendor/chance/lib/chance/instance.rb +5 -8
  60. metadata +41 -207
  61. data/lib/doc_templates/jsdoc/allclasses.tmpl +0 -17
  62. data/lib/doc_templates/jsdoc/allfiles.tmpl +0 -56
  63. data/lib/doc_templates/jsdoc/class.tmpl +0 -487
  64. data/lib/doc_templates/jsdoc/index.tmpl +0 -38
  65. data/lib/doc_templates/jsdoc/publish.js +0 -170
  66. data/lib/doc_templates/jsdoc/static/default.css +0 -162
  67. data/lib/doc_templates/jsdoc/static/header.html +0 -2
  68. data/lib/doc_templates/jsdoc/static/index.html +0 -19
  69. data/lib/doc_templates/jsdoc/symbol.tmpl +0 -35
  70. data/lib/doc_templates/sproutcore/allclasses.tmpl +0 -0
  71. data/lib/doc_templates/sproutcore/allfiles.tmpl +0 -56
  72. data/lib/doc_templates/sproutcore/class.tmpl +0 -674
  73. data/lib/doc_templates/sproutcore/classes-json.tmpl +0 -55
  74. data/lib/doc_templates/sproutcore/index.tmpl +0 -62
  75. data/lib/doc_templates/sproutcore/publish.js +0 -346
  76. data/lib/doc_templates/sproutcore/static/default.css +0 -258
  77. data/lib/doc_templates/sproutcore/static/header.html +0 -2
  78. data/lib/doc_templates/sproutcore/static/index.html +0 -19
  79. data/lib/doc_templates/sproutcore/symbol.tmpl +0 -35
  80. data/lib/frameworks/sproutcore/frameworks/runtime/tests/private/observer_queue/isObservingSuspended.js +0 -55
  81. data/lib/sproutcore/rack/docs.rb +0 -24
  82. data/spec/fixtures/real_world/frameworks/sproutcore/apps/docs/PLACEHOLDER +0 -0
  83. data/vendor/jsdoc/README.txt +0 -151
  84. data/vendor/jsdoc/app/frame.js +0 -33
  85. data/vendor/jsdoc/app/frame/Chain.js +0 -102
  86. data/vendor/jsdoc/app/frame/Dumper.js +0 -144
  87. data/vendor/jsdoc/app/frame/Hash.js +0 -47
  88. data/vendor/jsdoc/app/frame/Link.js +0 -142
  89. data/vendor/jsdoc/app/frame/Namespace.js +0 -10
  90. data/vendor/jsdoc/app/frame/Opt.js +0 -134
  91. data/vendor/jsdoc/app/frame/Reflection.js +0 -26
  92. data/vendor/jsdoc/app/frame/String.js +0 -93
  93. data/vendor/jsdoc/app/frame/Testrun.js +0 -129
  94. data/vendor/jsdoc/app/handlers/FOODOC.js +0 -26
  95. data/vendor/jsdoc/app/handlers/XMLDOC.js +0 -26
  96. data/vendor/jsdoc/app/handlers/XMLDOC/DomReader.js +0 -159
  97. data/vendor/jsdoc/app/handlers/XMLDOC/XMLDoc.js +0 -16
  98. data/vendor/jsdoc/app/handlers/XMLDOC/XMLParse.js +0 -292
  99. data/vendor/jsdoc/app/lib/JSDOC.js +0 -98
  100. data/vendor/jsdoc/app/lib/JSDOC/DocComment.js +0 -200
  101. data/vendor/jsdoc/app/lib/JSDOC/DocTag.js +0 -294
  102. data/vendor/jsdoc/app/lib/JSDOC/JsDoc.js +0 -162
  103. data/vendor/jsdoc/app/lib/JSDOC/JsPlate.js +0 -100
  104. data/vendor/jsdoc/app/lib/JSDOC/Lang.js +0 -144
  105. data/vendor/jsdoc/app/lib/JSDOC/Parser.js +0 -109
  106. data/vendor/jsdoc/app/lib/JSDOC/PluginManager.js +0 -33
  107. data/vendor/jsdoc/app/lib/JSDOC/Symbol.js +0 -681
  108. data/vendor/jsdoc/app/lib/JSDOC/SymbolSet.js +0 -226
  109. data/vendor/jsdoc/app/lib/JSDOC/TextStream.js +0 -41
  110. data/vendor/jsdoc/app/lib/JSDOC/Token.js +0 -18
  111. data/vendor/jsdoc/app/lib/JSDOC/TokenReader.js +0 -332
  112. data/vendor/jsdoc/app/lib/JSDOC/TokenStream.js +0 -133
  113. data/vendor/jsdoc/app/lib/JSDOC/Util.js +0 -32
  114. data/vendor/jsdoc/app/lib/JSDOC/Walker.js +0 -453
  115. data/vendor/jsdoc/app/main.js +0 -74
  116. data/vendor/jsdoc/app/plugins/commentSrcJson.js +0 -19
  117. data/vendor/jsdoc/app/plugins/frameworkPrototype.js +0 -16
  118. data/vendor/jsdoc/app/plugins/functionCall.js +0 -10
  119. data/vendor/jsdoc/app/plugins/publishSrcHilite.js +0 -62
  120. data/vendor/jsdoc/app/plugins/sproutcoreTags.js +0 -26
  121. data/vendor/jsdoc/app/plugins/symbolLink.js +0 -9
  122. data/vendor/jsdoc/app/plugins/tagParamConfig.js +0 -31
  123. data/vendor/jsdoc/app/plugins/tagSynonyms.js +0 -43
  124. data/vendor/jsdoc/app/run.js +0 -346
  125. data/vendor/jsdoc/app/t/TestDoc.js +0 -144
  126. data/vendor/jsdoc/app/t/runner.js +0 -13
  127. data/vendor/jsdoc/app/test.js +0 -304
  128. data/vendor/jsdoc/app/test/addon.js +0 -24
  129. data/vendor/jsdoc/app/test/anon_inner.js +0 -14
  130. data/vendor/jsdoc/app/test/augments.js +0 -31
  131. data/vendor/jsdoc/app/test/augments2.js +0 -26
  132. data/vendor/jsdoc/app/test/borrows.js +0 -41
  133. data/vendor/jsdoc/app/test/borrows2.js +0 -23
  134. data/vendor/jsdoc/app/test/config.js +0 -22
  135. data/vendor/jsdoc/app/test/constructs.js +0 -18
  136. data/vendor/jsdoc/app/test/encoding.js +0 -10
  137. data/vendor/jsdoc/app/test/encoding_other.js +0 -12
  138. data/vendor/jsdoc/app/test/functions_anon.js +0 -39
  139. data/vendor/jsdoc/app/test/functions_nested.js +0 -33
  140. data/vendor/jsdoc/app/test/global.js +0 -13
  141. data/vendor/jsdoc/app/test/globals.js +0 -25
  142. data/vendor/jsdoc/app/test/ignore.js +0 -10
  143. data/vendor/jsdoc/app/test/inner.js +0 -16
  144. data/vendor/jsdoc/app/test/jsdoc_test.js +0 -477
  145. data/vendor/jsdoc/app/test/lend.js +0 -33
  146. data/vendor/jsdoc/app/test/memberof.js +0 -20
  147. data/vendor/jsdoc/app/test/memberof_constructor.js +0 -15
  148. data/vendor/jsdoc/app/test/name.js +0 -19
  149. data/vendor/jsdoc/app/test/namespace_nested.js +0 -23
  150. data/vendor/jsdoc/app/test/nocode.js +0 -13
  151. data/vendor/jsdoc/app/test/oblit_anon.js +0 -20
  152. data/vendor/jsdoc/app/test/overview.js +0 -20
  153. data/vendor/jsdoc/app/test/param_inline.js +0 -37
  154. data/vendor/jsdoc/app/test/params_optional.js +0 -8
  155. data/vendor/jsdoc/app/test/prototype.js +0 -17
  156. data/vendor/jsdoc/app/test/prototype_nested.js +0 -9
  157. data/vendor/jsdoc/app/test/prototype_oblit.js +0 -13
  158. data/vendor/jsdoc/app/test/prototype_oblit_constructor.js +0 -24
  159. data/vendor/jsdoc/app/test/public.js +0 -10
  160. data/vendor/jsdoc/app/test/shared.js +0 -42
  161. data/vendor/jsdoc/app/test/shared2.js +0 -2
  162. data/vendor/jsdoc/app/test/shortcuts.js +0 -22
  163. data/vendor/jsdoc/app/test/static_this.js +0 -13
  164. data/vendor/jsdoc/app/test/synonyms.js +0 -23
  165. data/vendor/jsdoc/app/test/tosource.js +0 -23
  166. data/vendor/jsdoc/app/test/variable_redefine.js +0 -14
  167. data/vendor/jsdoc/changes.txt +0 -47
  168. data/vendor/jsdoc/conf/sample.conf +0 -31
  169. data/vendor/jsdoc/java/build.xml +0 -36
  170. data/vendor/jsdoc/java/build_1.4.xml +0 -36
  171. data/vendor/jsdoc/java/classes/js.jar +0 -0
  172. data/vendor/jsdoc/java/src/JsDebugRun.java +0 -21
  173. data/vendor/jsdoc/java/src/JsRun.java +0 -21
  174. data/vendor/jsdoc/jsdebug.jar +0 -0
  175. data/vendor/jsdoc/jsrun.jar +0 -0
  176. data/vendor/jsdoc/t/TestDoc.js +0 -144
  177. data/vendor/jsdoc/t/runner.js +0 -13
  178. data/vendor/jsdoc/test.js +0 -304
  179. data/vendor/jsdoc/test/addon.js +0 -24
  180. data/vendor/jsdoc/test/anon_inner.js +0 -14
  181. data/vendor/jsdoc/test/augments.js +0 -31
  182. data/vendor/jsdoc/test/augments2.js +0 -26
  183. data/vendor/jsdoc/test/borrows.js +0 -41
  184. data/vendor/jsdoc/test/borrows2.js +0 -23
  185. data/vendor/jsdoc/test/config.js +0 -22
  186. data/vendor/jsdoc/test/constructs.js +0 -18
  187. data/vendor/jsdoc/test/encoding.js +0 -10
  188. data/vendor/jsdoc/test/encoding_other.js +0 -12
  189. data/vendor/jsdoc/test/functions_anon.js +0 -39
  190. data/vendor/jsdoc/test/functions_nested.js +0 -33
  191. data/vendor/jsdoc/test/global.js +0 -13
  192. data/vendor/jsdoc/test/globals.js +0 -25
  193. data/vendor/jsdoc/test/ignore.js +0 -10
  194. data/vendor/jsdoc/test/inner.js +0 -16
  195. data/vendor/jsdoc/test/jsdoc_test.js +0 -477
  196. data/vendor/jsdoc/test/lend.js +0 -33
  197. data/vendor/jsdoc/test/memberof.js +0 -20
  198. data/vendor/jsdoc/test/memberof_constructor.js +0 -15
  199. data/vendor/jsdoc/test/name.js +0 -19
  200. data/vendor/jsdoc/test/namespace_nested.js +0 -23
  201. data/vendor/jsdoc/test/nocode.js +0 -13
  202. data/vendor/jsdoc/test/oblit_anon.js +0 -20
  203. data/vendor/jsdoc/test/overview.js +0 -20
  204. data/vendor/jsdoc/test/param_inline.js +0 -37
  205. data/vendor/jsdoc/test/params_optional.js +0 -8
  206. data/vendor/jsdoc/test/prototype.js +0 -17
  207. data/vendor/jsdoc/test/prototype_nested.js +0 -9
  208. data/vendor/jsdoc/test/prototype_oblit.js +0 -13
  209. data/vendor/jsdoc/test/prototype_oblit_constructor.js +0 -24
  210. data/vendor/jsdoc/test/public.js +0 -10
  211. data/vendor/jsdoc/test/shared.js +0 -42
  212. data/vendor/jsdoc/test/shared2.js +0 -2
  213. data/vendor/jsdoc/test/shortcuts.js +0 -22
  214. data/vendor/jsdoc/test/static_this.js +0 -13
  215. data/vendor/jsdoc/test/synonyms.js +0 -23
  216. data/vendor/jsdoc/test/tosource.js +0 -23
  217. 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">&copy;{+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("&amp;").split("<").join("&lt;").split(">").join("&gt;")) ;
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 "&lt;"+srcFilePath+"&gt;";
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
- }