sproutcore 0.9.13 → 0.9.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. data/History.txt +19 -0
  2. data/Manifest.txt +103 -26
  3. data/app_generators/sproutcore/templates/README +1 -1
  4. data/bin/sc-build +1 -1
  5. data/bin/sc-gen +0 -0
  6. data/bin/sc-ide +278 -0
  7. data/bin/sc-init +38 -0
  8. data/bin/sc-install +96 -0
  9. data/bin/sc-remove +94 -0
  10. data/bin/sc-server +4 -0
  11. data/bin/sc-update +94 -0
  12. data/bin/sproutcore +3 -14
  13. data/clients/sc_docs/controllers/docs.js +1 -1
  14. data/clients/sc_docs/models/doc.js +6 -0
  15. data/clients/sc_docs/views/doc_frame.js +1 -1
  16. data/clients/sc_test_runner/english.lproj/icons/small/next.png +0 -0
  17. data/clients/sc_test_runner/english.lproj/icons/small/reset.png +0 -0
  18. data/frameworks/sproutcore/HISTORY +34 -2
  19. data/frameworks/sproutcore/controllers/array.js +1 -1
  20. data/frameworks/sproutcore/controllers/controller.js +1 -1
  21. data/frameworks/sproutcore/controllers/object.js +9 -6
  22. data/frameworks/sproutcore/core.js +19 -4
  23. data/frameworks/sproutcore/english.lproj/blank.gif +0 -0
  24. data/frameworks/sproutcore/english.lproj/core.css +1 -0
  25. data/frameworks/sproutcore/english.lproj/menu.css +1 -0
  26. data/frameworks/sproutcore/foundation/application.js +3 -3
  27. data/frameworks/sproutcore/foundation/benchmark.js +1 -1
  28. data/frameworks/sproutcore/foundation/node_descriptor.js +13 -1
  29. data/frameworks/sproutcore/foundation/page.js +3 -2
  30. data/frameworks/sproutcore/foundation/path_module.js +33 -16
  31. data/frameworks/sproutcore/foundation/run_loop.js +1 -1
  32. data/frameworks/sproutcore/foundation/server.js +68 -18
  33. data/frameworks/sproutcore/foundation/string.js +1 -1
  34. data/frameworks/sproutcore/globals/window.js +62 -15
  35. data/frameworks/sproutcore/lib/core_views.rb +1 -0
  36. data/frameworks/sproutcore/lib/index.rhtml +4 -3
  37. data/frameworks/sproutcore/lib/menu_views.rb +2 -2
  38. data/frameworks/sproutcore/models/collection.js +122 -107
  39. data/frameworks/sproutcore/models/record.js +2 -2
  40. data/frameworks/sproutcore/panes/manager.js +1 -1
  41. data/frameworks/sproutcore/panes/overlay.js +3 -3
  42. data/frameworks/sproutcore/tests/controllers/object.rhtml +26 -0
  43. data/frameworks/sproutcore/tests/views/collection/incremental_rendering.rhtml +2 -2
  44. data/frameworks/sproutcore/views/button/disclosure.js +1 -1
  45. data/frameworks/sproutcore/views/collection/collection.js +19 -15
  46. data/frameworks/sproutcore/views/collection/source_list.js +1 -1
  47. data/frameworks/sproutcore/views/collection/table.js +2 -2
  48. data/frameworks/sproutcore/views/error_explanation.js +1 -1
  49. data/frameworks/sproutcore/views/field/checkbox_field.js +1 -1
  50. data/frameworks/sproutcore/views/field/field.js +1 -1
  51. data/frameworks/sproutcore/views/field/radio_field.js +1 -1
  52. data/frameworks/sproutcore/views/field/select_field.js +1 -1
  53. data/frameworks/sproutcore/views/form.js +1 -1
  54. data/frameworks/sproutcore/views/image.js +1 -1
  55. data/frameworks/sproutcore/views/menu_item.js +1 -1
  56. data/frameworks/sproutcore/views/popup_button.js +1 -1
  57. data/frameworks/sproutcore/views/popup_menu.js +1 -1
  58. data/frameworks/sproutcore/views/progress.js +4 -2
  59. data/frameworks/sproutcore/views/radio_group.js +1 -1
  60. data/frameworks/sproutcore/views/scroll.js +1 -1
  61. data/frameworks/sproutcore/views/source_list_group.js +1 -1
  62. data/frameworks/sproutcore/views/split.js +1 -1
  63. data/frameworks/sproutcore/views/tab.js +3 -1
  64. data/frameworks/sproutcore/views/view.js +19 -3
  65. data/jsdoc/README.txt +89 -57
  66. data/jsdoc/app/frame/Chain.js +102 -0
  67. data/jsdoc/app/frame/Dumper.js +144 -0
  68. data/jsdoc/app/frame/Hash.js +47 -0
  69. data/jsdoc/app/frame/Link.js +142 -0
  70. data/jsdoc/app/frame/Namespace.js +10 -0
  71. data/jsdoc/app/frame/Opt.js +134 -0
  72. data/jsdoc/app/frame/Reflection.js +26 -0
  73. data/jsdoc/app/frame/String.js +93 -0
  74. data/jsdoc/app/frame/Testrun.js +129 -0
  75. data/jsdoc/app/frame.js +33 -0
  76. data/jsdoc/app/handlers/FOODOC.js +26 -0
  77. data/jsdoc/app/handlers/XMLDOC/DomReader.js +159 -0
  78. data/jsdoc/app/handlers/XMLDOC/XMLDoc.js +16 -0
  79. data/jsdoc/app/handlers/XMLDOC/XMLParse.js +292 -0
  80. data/jsdoc/app/handlers/XMLDOC.js +26 -0
  81. data/jsdoc/app/lib/JSDOC/DocComment.js +200 -0
  82. data/jsdoc/app/lib/JSDOC/DocTag.js +294 -0
  83. data/jsdoc/app/lib/JSDOC/JsDoc.js +180 -0
  84. data/jsdoc/app/lib/JSDOC/JsPlate.js +100 -0
  85. data/jsdoc/app/lib/JSDOC/Lang.js +144 -0
  86. data/jsdoc/app/lib/JSDOC/Parser.js +109 -0
  87. data/jsdoc/app/lib/JSDOC/PluginManager.js +33 -0
  88. data/jsdoc/app/lib/JSDOC/Symbol.js +600 -0
  89. data/jsdoc/app/lib/JSDOC/SymbolSet.js +220 -0
  90. data/jsdoc/app/lib/JSDOC/TextStream.js +41 -0
  91. data/jsdoc/app/lib/JSDOC/Token.js +18 -0
  92. data/jsdoc/app/lib/JSDOC/TokenReader.js +323 -0
  93. data/jsdoc/app/lib/JSDOC/TokenStream.js +133 -0
  94. data/jsdoc/app/lib/JSDOC/Util.js +32 -0
  95. data/jsdoc/app/lib/JSDOC/Walker.js +416 -0
  96. data/jsdoc/app/lib/JSDOC.js +97 -0
  97. data/jsdoc/app/main.js +74 -0
  98. data/jsdoc/app/plugins/commentSrcJson.js +19 -0
  99. data/jsdoc/app/plugins/frameworkPrototype.js +16 -0
  100. data/jsdoc/app/plugins/functionCall.js +10 -0
  101. data/jsdoc/app/plugins/publishSrcHilite.js +62 -0
  102. data/jsdoc/app/plugins/sproutcoreTags.js +26 -0
  103. data/jsdoc/app/plugins/symbolLink.js +9 -0
  104. data/jsdoc/app/plugins/tagParamConfig.js +31 -0
  105. data/jsdoc/app/plugins/tagSynonyms.js +43 -0
  106. data/jsdoc/app/run.js +339 -137
  107. data/jsdoc/changes.txt +47 -0
  108. data/jsdoc/conf/sample.conf +31 -0
  109. data/jsdoc/java/build.xml +36 -0
  110. data/jsdoc/java/build_1.4.xml +36 -0
  111. data/jsdoc/java/classes/js.jar +0 -0
  112. data/jsdoc/java/src/JsDebugRun.java +21 -0
  113. data/jsdoc/java/src/JsRun.java +21 -0
  114. data/jsdoc/jsdebug.jar +0 -0
  115. data/jsdoc/jsrun.jar +0 -0
  116. data/jsdoc/t/TestDoc.js +144 -0
  117. data/jsdoc/t/runner.js +13 -0
  118. data/jsdoc/templates/sproutcore/allclasses.tmpl +17 -0
  119. data/jsdoc/templates/sproutcore/allfiles.tmpl +56 -0
  120. data/jsdoc/templates/sproutcore/class.tmpl +408 -326
  121. data/jsdoc/templates/sproutcore/index.tmpl +30 -31
  122. data/jsdoc/templates/sproutcore/publish.js +173 -81
  123. data/jsdoc/templates/sproutcore/static/default.css +191 -0
  124. data/jsdoc/templates/sproutcore/static/header.html +2 -0
  125. data/jsdoc/templates/sproutcore/static/index.html +19 -0
  126. data/jsdoc/templates/sproutcore/symbol.tmpl +35 -0
  127. data/jsdoc/test/addon.js +24 -0
  128. data/jsdoc/test/anon_inner.js +14 -0
  129. data/jsdoc/test/augments.js +31 -0
  130. data/jsdoc/test/augments2.js +26 -0
  131. data/jsdoc/test/borrows.js +41 -0
  132. data/jsdoc/test/borrows2.js +23 -0
  133. data/jsdoc/test/config.js +22 -0
  134. data/jsdoc/test/constructs.js +18 -0
  135. data/jsdoc/test/encoding.js +10 -0
  136. data/jsdoc/test/encoding_other.js +12 -0
  137. data/jsdoc/test/functions_anon.js +39 -0
  138. data/jsdoc/test/functions_nested.js +33 -0
  139. data/jsdoc/test/global.js +13 -0
  140. data/jsdoc/test/globals.js +25 -0
  141. data/jsdoc/test/ignore.js +10 -0
  142. data/jsdoc/test/inner.js +16 -0
  143. data/jsdoc/test/jsdoc_test.js +477 -0
  144. data/jsdoc/test/lend.js +33 -0
  145. data/jsdoc/test/memberof.js +20 -0
  146. data/jsdoc/test/memberof_constructor.js +15 -0
  147. data/jsdoc/test/name.js +19 -0
  148. data/jsdoc/test/namespace_nested.js +23 -0
  149. data/jsdoc/test/nocode.js +13 -0
  150. data/jsdoc/test/oblit_anon.js +20 -0
  151. data/jsdoc/test/overview.js +20 -0
  152. data/jsdoc/test/param_inline.js +37 -0
  153. data/jsdoc/test/params_optional.js +8 -0
  154. data/jsdoc/test/prototype.js +17 -0
  155. data/jsdoc/test/prototype_nested.js +9 -0
  156. data/jsdoc/test/prototype_oblit.js +13 -0
  157. data/jsdoc/test/prototype_oblit_constructor.js +24 -0
  158. data/jsdoc/test/public.js +10 -0
  159. data/jsdoc/test/shared.js +42 -0
  160. data/jsdoc/test/shared2.js +2 -0
  161. data/jsdoc/test/shortcuts.js +22 -0
  162. data/jsdoc/test/static_this.js +13 -0
  163. data/jsdoc/test/synonyms.js +23 -0
  164. data/jsdoc/test/tosource.js +23 -0
  165. data/jsdoc/test/variable_redefine.js +14 -0
  166. data/jsdoc/test.js +304 -0
  167. data/lib/sproutcore/build_tools/resource_builder.rb +6 -1
  168. data/lib/sproutcore/bundle_installer.rb +268 -0
  169. data/lib/sproutcore/jsdoc.rb +7 -6
  170. data/lib/sproutcore/library.rb +38 -0
  171. data/lib/sproutcore/merb/bundle_controller.rb +8 -4
  172. data/lib/sproutcore/version.rb +1 -1
  173. data/lib/sproutcore.rb +1 -1
  174. data/script/destroy +0 -0
  175. data/script/generate +0 -0
  176. data/script/txt2html +0 -0
  177. metadata +117 -29
  178. data/clients/view_builder/core.js +0 -19
  179. data/clients/view_builder/english.lproj/body.css +0 -149
  180. data/clients/view_builder/english.lproj/body.rhtml +0 -18
  181. data/clients/view_builder/english.lproj/strings.js +0 -14
  182. data/clients/view_builder/main.js +0 -37
  183. data/jsdoc/app/DocFile.js +0 -137
  184. data/jsdoc/app/DocTag.js +0 -110
  185. data/jsdoc/app/Doclet.js +0 -63
  186. data/jsdoc/app/Dumper.js +0 -143
  187. data/jsdoc/app/JsDoc.js +0 -103
  188. data/jsdoc/app/JsHilite.js +0 -45
  189. data/jsdoc/app/JsIO.js +0 -163
  190. data/jsdoc/app/JsParse.js +0 -385
  191. data/jsdoc/app/JsPlate.js +0 -130
  192. data/jsdoc/app/JsTestrun.js +0 -129
  193. data/jsdoc/app/JsToke.js +0 -564
  194. data/jsdoc/app/Symbol.js +0 -298
  195. data/jsdoc/app/Transformer.js +0 -14
  196. data/jsdoc/app/Util.js +0 -97
  197. data/jsdoc/app/js.jar +0 -0
  198. data/jsdoc/plugins/min.js +0 -316
  199. data/jsdoc/plugins/strip.js +0 -20
  200. data/jsdoc/templates/sproutcore/default.css +0 -191
  201. data/jsdoc/templates/sproutcore/index.html +0 -13
  202. data/jsdoc/templates/sproutcore/prototype.js +0 -4186
  203. data/jsdoc/templates/sproutcore/splash.html +0 -7
@@ -1,8 +1,8 @@
1
1
  {!
2
2
  function keys(o) {
3
- var keys = [];
4
- for (var k in o) { keys.push(k); }
5
- return keys;
3
+ var keys = [];
4
+ for (var k in o) { keys.push(k); }
5
+ return keys;
6
6
  }
7
7
 
8
8
  function groupName(path) {
@@ -19,38 +19,37 @@ function groupName(path) {
19
19
  }
20
20
  };
21
21
 
22
- function getSymbols(className, thisClass) {
23
- var ret = [className.toLowerCase()] ;
22
+ function getSymbols(thisClass) {
23
+ var ret = [thisClass.alias.toLowerCase()] ;
24
+ var len = thisClass.properties.length ;
24
25
 
25
- var f = function(data) {
26
- if (data && data.length) {
27
- var idx = data.length ;
28
- while(--idx >= 0) {
29
- var name = data[idx].name ;
30
- if (name) ret.push(name.toLowerCase()) ;
31
- }
32
- }
33
- };
34
-
35
- f(thisClass.properties) ;
36
- f(thisClass.methods) ;
26
+ while (--len>=0) {
27
+ ret.push(thisClass.properties[len].alias.toLowerCase()) ;
28
+ }
37
29
 
38
30
  return ret.join(' ') ;
39
31
  };
40
32
 
41
33
  !}
42
- { records: [<for each="classname" in="keys(data).sort()">
43
- { "type": "Doc",
44
- "guid": "{+classname+}",
45
- "title": "{+classname+}",
46
- "url": "{+data[classname][0].docs+}",
47
- "group": "{+groupName(data[classname][0].file.path)+}",
48
- "symbols": "{+getSymbols(classname, data[classname][0])+}",
49
- "path": "{+data[classname][0].file.path+}"
50
- },</for>
51
- { "type": "Doc",
52
- "guid": "_GLOBALS",
53
- "title": "GLOBALS",
54
- "url": "globals.html"
55
- }]
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
+ ]
56
55
  }
@@ -1,10 +1,3 @@
1
- require("app/JsHilite.js");
2
-
3
- function basename(filename) {
4
- filename.match(/([^\/\\]+)\.[^\/\\]+$/);
5
- return RegExp.$1;
6
- }
7
-
8
1
  // This is the orginial function from Stuart Langridge at http://www.kryogenix.org/
9
2
  // This is the update function from Jeff Minard - http://www.jrm.cc/
10
3
  function superTextile(s) {
@@ -21,13 +14,13 @@ function superTextile(s) {
21
14
  ['~', '~', 'sub'],
22
15
  ['\\^', '\\^', 'sup'], // me
23
16
  ['{{{', '}}}', 'code']];
24
-
17
+
25
18
  for (var i=0;i<qtags.length;i++) {
26
19
  var ttag_o = qtags[i][0], ttag_c = qtags[i][1], htag = qtags[i][2];
27
20
  re = new RegExp(ttag_o+'\\b(.+?)\\b'+ttag_c,'g');
28
21
  r = r.replace(re,'<'+htag+'>'+'$1'+'</'+htag+'>');
29
22
  };
30
-
23
+
31
24
  // underscores count as part of a word, so do them separately
32
25
  re = new RegExp('\\b_(.+?)_\\b','g');
33
26
  r = r.replace(re,'<em>$1</em>');
@@ -61,16 +54,16 @@ function superTextile(s) {
61
54
 
62
55
  // handle incode behavior.
63
56
  if (incode) {
64
-
57
+
65
58
  // Look for end closing bracket and process it.
66
59
  if (line.match(/^\s*}}}\s*$/)) {
67
60
  incode = 0 ;
68
61
  out.push("<p class=\"code\"><code>" + cur_block.join("<br />") + "</code></p>") ;
69
62
  cur_block = [] ;
70
-
71
- // otherwise, just add the line to the current block
63
+
64
+ // otherwise, just add the line to the current block, escaping HTML entities
72
65
  } else {
73
- cur_block.push(line) ;
66
+ cur_block.push(line.split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;")) ;
74
67
  }
75
68
 
76
69
  // for normal text, look for line-level items to replace. If no
@@ -81,17 +74,17 @@ function superTextile(s) {
81
74
  if ((line == '') || line.match(/^\s+$/)) {
82
75
  changed = 1 ;
83
76
  line = '' ;
84
-
77
+
85
78
  // convert bq. => blockquote.
86
79
  } else if (line.search(/^\s*bq\.\s+/) != -1) {
87
80
  line = line.replace(/^\s*bq\.\s+/,'\t<blockquote>')+'</blockquote>';
88
81
  changed = 1;
89
-
82
+
90
83
  // convert h* => heading
91
84
  } else if (line.search(/^\s*h[1|2|3|4|5|6]\.\s+/) != -1) {
92
85
  line = line.replace(/^\s*h([1|2|3|4|5|6])\.(.+)/, '<h$1>$2</h$1>');
93
86
  changed = 1;
94
-
87
+
95
88
  // convert - to bulletted list. liu tag will be fixed later.
96
89
  } else if (line.search(/^\s*-\s+/) != -1) {
97
90
  line = line.replace(/^\s*-\s+/,'\t<liu>') + '</liu>'; changed = 1;
@@ -101,12 +94,12 @@ function superTextile(s) {
101
94
  } else if (line.search(/^\s*\*\s+/) != -1) {
102
95
  line = line.replace(/^\s*\*\s+/,'\t<liu>') + '</liu>'; changed = 1;
103
96
  changed = 1;
104
-
97
+
105
98
  // convert # to numbered list. lio tag will be fixed later.
106
99
  } else if (line.search(/^\s*#\s+/) != -1) {
107
100
  line = line.replace(/^\s*#\s+/,'\t<lio>') + '</lio>'; changed = 1;
108
101
  changed = 1;
109
-
102
+
110
103
  // open code tag will start code
111
104
  } else if (line.match(/^\s*\{\{\{\s*$/)) {
112
105
  incode++ ;
@@ -141,19 +134,19 @@ function superTextile(s) {
141
134
  for (var i=0;i<out.length;i++) {
142
135
  line = out[i];
143
136
  var addin = null ;
144
-
137
+
145
138
  if (inlist && listtype == 'ul' && !line.match(/^\t<liu/)) {
146
139
  addin = '</ul>\n'; inlist = 0;
147
140
  }
148
-
141
+
149
142
  if (inlist && listtype == 'ol' && !line.match(/^\t<lio/)) {
150
143
  addin = '</ol>\n'; inlist = 0;
151
144
  }
152
-
145
+
153
146
  if (!inlist && line.match(/^\t<liu/)) {
154
147
  line = '<ul>' + line; inlist = 1; listtype = 'ul';
155
148
  }
156
-
149
+
157
150
  if (!inlist && line.match(/^\t<lio/)) {
158
151
  line = '<ol>' + line; inlist = 1; listtype = 'ol';
159
152
  }
@@ -169,73 +162,172 @@ function superTextile(s) {
169
162
  r = r.replace(/li[o|u]>/g,'li>');
170
163
 
171
164
  return r;
172
- } ;
165
+ };
173
166
 
174
- function publish(fileGroup, context) {
175
- var classTemplate = new JsPlate(context.t+"class.tmpl");
176
- var indexTemplate = new JsPlate(context.t+"index.tmpl");
167
+ function publish(symbolSet) {
168
+ publish.conf = { // trailing slash expected for dirs
169
+ ext: ".html",
170
+ outDir: JSDOC.opt.d || SYS.pwd+"../out/jsdoc/",
171
+ templatesDir: SYS.pwd+"../templates/sproutcore/",
172
+ symbolsDir: "symbols/",
173
+ srcDir: "symbols/src/"
174
+ };
177
175
 
178
- var allFiles = {};
179
- var allClasses = {};
180
- var globals = {methods:[], properties:[], alias:"GLOBALS", isStatic:true};
181
176
 
182
- for (var i = 0; i < fileGroup.files.length; i++) {
183
- var file_basename = basename(fileGroup.files[i].filename);
184
- var file_srcname = file_basename+".src.html";
185
-
186
- for (var s = 0; s < fileGroup.files[i].symbols.length; s++) {
187
- if (fileGroup.files[i].symbols[s].isa == "CONSTRUCTOR") {
188
- var thisClass = fileGroup.files[i].symbols[s];
189
- // sort inherited methods by class
190
- var inheritedMethods = fileGroup.files[i].symbols[s].getInheritedMethods();
191
- if (inheritedMethods.length > 0) {
192
- thisClass.inherited = {};
193
- for (var n = 0; n < inheritedMethods.length; n++) {
194
- if (! thisClass.inherited[inheritedMethods[n].memberof]) thisClass.inherited[inheritedMethods[n].memberof] = [];
195
- thisClass.inherited[inheritedMethods[n].memberof].push(inheritedMethods[n]);
196
- }
197
- }
198
-
199
- thisClass.name = fileGroup.files[i].symbols[s].alias;
200
- thisClass.source = file_srcname;
201
- thisClass.filename = fileGroup.files[i].filename;
202
- thisClass.docs = thisClass.name+".html";
203
-
204
- if (!allClasses[thisClass.name]) allClasses[thisClass.name] = [];
205
- allClasses[thisClass.name].push(thisClass);
206
- }
207
- else if (fileGroup.files[i].symbols[s].alias == fileGroup.files[i].symbols[s].name) {
208
- if (fileGroup.files[i].symbols[s].isa == "FUNCTION") {
209
- globals.methods.push(fileGroup.files[i].symbols[s]);
210
- }
211
- else {
212
- globals.properties.push(fileGroup.files[i].symbols[s]);
213
- }
214
- }
177
+ if (JSDOC.opt.s && defined(Link) && Link.prototype._makeSrcLink) {
178
+ Link.prototype._makeSrcLink = function(srcFilePath) {
179
+ return "&lt;"+srcFilePath+"&gt;";
215
180
  }
181
+ }
182
+
183
+ IO.mkPath((publish.conf.outDir+"symbols/src").split("/"));
216
184
 
217
- // if (!allFiles[fileGroup.files[i].path]) {
218
- // var hiliter = new JsHilite(IO.readFile(fileGroup.files[i].path), JsDoc.opt.e);
219
- // IO.saveFile(context.d, file_srcname, hiliter.hilite());
220
- // }
221
- fileGroup.files[i].source = file_srcname;
222
- allFiles[fileGroup.files[i].path] = true;
185
+ // used to check the details of things being linked to
186
+ Link.symbolSet = symbolSet;
187
+
188
+ try {
189
+ var classTemplate = new JSDOC.JsPlate(publish.conf.templatesDir+"class.tmpl");
190
+ var classesTemplate = new JSDOC.JsPlate(publish.conf.templatesDir+"allclasses.tmpl");
191
+ }
192
+ catch(e) {
193
+ print(e.message);
194
+ quit();
223
195
  }
224
196
 
225
- for (var c in allClasses) {
226
- outfile = c+".html";
227
- allClasses[c].outfile = outfile;
228
- var output = classTemplate.process(allClasses[c]);
229
- IO.saveFile(context.d, outfile, output);
197
+ // filters
198
+ function hasNoParent($) {return ($.memberOf == "")}
199
+ function isaFile($) {return ($.is("FILE"))}
200
+ function isaClass($) {return ($.is("CONSTRUCTOR") || $.isNamespace)}
201
+
202
+ var symbols = symbolSet.toArray();
203
+
204
+ var files = JSDOC.opt.srcFiles;
205
+ for (var i = 0, l = files.length; i < l; i++) {
206
+ var file = files[i];
207
+ var srcDir = publish.conf.outDir + "symbols/src/";
208
+ makeSrcFile(file, srcDir);
209
+ }
210
+
211
+ var classes = symbols.filter(isaClass).sort(makeSortby("alias"));
212
+
213
+ Link.base = "../";
214
+ publish.classesIndex = classesTemplate.process(classes); // kept in memory
215
+
216
+ for (var i = 0, l = classes.length; i < l; i++) {
217
+ var symbol = classes[i];
218
+ var output = "";
219
+ output = classTemplate.process(symbol);
220
+
221
+ IO.saveFile(publish.conf.outDir+"symbols/", symbol.alias+publish.conf.ext, output);
222
+ }
223
+
224
+ // regenrate the index with different relative links
225
+ Link.base = "";
226
+ publish.classesIndex = classesTemplate.process(classes);
227
+
228
+ try {
229
+ var classesindexTemplate = new JSDOC.JsPlate(publish.conf.templatesDir+"index.tmpl");
230
+ }
231
+ catch(e) { print(e.message); quit(); }
232
+
233
+ var classesIndex = classesindexTemplate.process(classes);
234
+ // IO.saveFile(publish.conf.outDir, "index"+publish.conf.ext, classesIndex);
235
+ IO.saveFile(publish.conf.outDir, "classes.js", classesIndex);
236
+ classesindexTemplate = classesIndex = classes = null;
237
+
238
+ try {
239
+ var fileindexTemplate = new JSDOC.JsPlate(publish.conf.templatesDir+"allfiles.tmpl");
230
240
  }
241
+ catch(e) { print(e.message); quit(); }
231
242
 
232
- output = classTemplate.process([globals]);
233
- IO.saveFile(context.d, "globals.html", output);
243
+ var documentedFiles = symbols.filter(isaFile);
244
+ var allFiles = [];
234
245
 
235
- var output = indexTemplate.process(allClasses);
236
- IO.saveFile(context.d, "classes.js", output);
237
- IO.copyFile(context.t+"index.html", context.d);
238
- IO.copyFile(context.t+"splash.html", context.d);
239
- IO.copyFile(context.t+"default.css", context.d) ;
240
- IO.copyFile(context.t+"prototype.js", context.d) ;
246
+ for (var i = 0; i < files.length; i++) {
247
+ allFiles.push(new JSDOC.Symbol(files[i], [], "FILE", new JSDOC.DocComment("/** */")));
248
+ }
249
+
250
+ for (var i = 0; i < documentedFiles.length; i++) {
251
+ var offset = files.indexOf(documentedFiles[i].alias);
252
+ allFiles[offset] = documentedFiles[i];
253
+ }
254
+
255
+ allFiles = allFiles.sort(makeSortby("name"));
256
+
257
+ var filesIndex = fileindexTemplate.process(allFiles);
258
+ IO.saveFile(publish.conf.outDir, "files"+publish.conf.ext, filesIndex);
259
+ fileindexTemplate = filesIndex = files = null;
260
+ }
261
+
262
+
263
+ /** Just the first sentence. */
264
+ function summarize(desc) {
265
+ if (typeof desc != "undefined")
266
+ return desc.match(/([\w\W]+?\.)[^a-z0-9]/i)? RegExp.$1 : desc;
267
+ }
268
+
269
+ /** make a symbol sorter by some attribute */
270
+ function makeSortby(attribute) {
271
+ return function(a, b) {
272
+ if (a[attribute] != undefined && b[attribute] != undefined) {
273
+ a = a[attribute].toLowerCase();
274
+ b = b[attribute].toLowerCase();
275
+ if (a < b) return -1;
276
+ if (a > b) return 1;
277
+ return 0;
278
+ }
279
+ }
241
280
  }
281
+
282
+ function include(path) {
283
+ var path = publish.conf.templatesDir+path;
284
+ return IO.readFile(path);
285
+ }
286
+
287
+ function makeSrcFile(path, srcDir, name) {
288
+ if (JSDOC.opt.s) return;
289
+
290
+ if (!name) {
291
+ name = path.replace(/\.\.?[\\\/]/g, "").replace(/[\\\/]/g, "_");
292
+ name = name.replace(/\:/g, "_");
293
+ }
294
+
295
+ var src = {path: path, name:name, charset: IO.encoding, hilited: ""};
296
+
297
+ if (defined(JSDOC.PluginManager)) {
298
+ JSDOC.PluginManager.run("onPublishSrc", src);
299
+ }
300
+
301
+ if (src.hilited) {
302
+ IO.saveFile(srcDir, name+publish.conf.ext, src.hilited);
303
+ }
304
+ }
305
+
306
+ function makeSignature(params) {
307
+ if (!params) return "()";
308
+ var signature = "("
309
+ +
310
+ params.filter(
311
+ function($) {
312
+ return $.name.indexOf(".") == -1; // don't show config params in signature
313
+ }
314
+ ).map(
315
+ function($) {
316
+ return $.name;
317
+ }
318
+ ).join(", ")
319
+ +
320
+ ")";
321
+ return signature;
322
+ }
323
+
324
+ /** Find symbol {@link ...} strings in text and turn into html links */
325
+ function resolveLinks(str, from) {
326
+ str = str.replace(/\{@link ([^} ]+) ?\}/gi,
327
+ function(match, symbolName) {
328
+ return new Link().toSymbol(symbolName);
329
+ }
330
+ );
331
+
332
+ return str;
333
+ }
@@ -0,0 +1,191 @@
1
+ /* @override http://localhost:4020/static/sproutcore/-docs/data/default.css */
2
+
3
+ /* @group Core */
4
+
5
+ body.sc-doc {
6
+ background-color: white ;
7
+ padding: 20px;
8
+ }
9
+
10
+ .sc-doc {
11
+ font: 64.5% Helvetica, Arial, Verdana, sans-serif;
12
+ line-height: 1em ;
13
+ }
14
+
15
+ /* Set standard size on some things. */
16
+ .sc-doc p,
17
+ .sc-doc dd,
18
+ .sc-doc dt,
19
+ .sc-doc li,
20
+ .sc-doc table {
21
+ line-height: 1.3em;
22
+ font-size: 1.3em ;
23
+ }
24
+
25
+ .sc-doc h1 {
26
+ font-size: 3em;
27
+ margin: 0 0 1em 0;
28
+ text-transform: capitalize;
29
+ }
30
+
31
+ .sc-doc h2 {
32
+ padding: 0;
33
+ padding-bottom: 4px;
34
+ border-bottom: 1px #555 solid;
35
+ text-transform: capitalize;
36
+ margin: 1.5em 0 0;
37
+ font-size: 2.2em;
38
+ }
39
+
40
+ .sc-doc h3 {
41
+ font-size: 2em;
42
+ padding: 0;
43
+ margin: 3em 0 0 0;
44
+ }
45
+
46
+ .sc-doc h4 {
47
+ font-weight: normal ;
48
+ font-size: 1.4em;
49
+ margin: 0.5em 0 0 0;
50
+ padding: 0;
51
+ }
52
+
53
+ .sc-doc h5 {
54
+ font-size: 1.3em;
55
+ padding: 0;
56
+ margin: 1.3em 0 0.5em 0;
57
+ }
58
+
59
+ .sc-doc p { margin: 0.5em 0; }
60
+
61
+ .sc-doc a {
62
+ text-decoration: none ;
63
+ }
64
+
65
+ .sc-doc label {
66
+ font-weight: bold ;
67
+ }
68
+
69
+ .sc-doc .sc-theme .ghost {
70
+ -moz-user-select: none;
71
+ -khtml-user-select: none;
72
+ user-select: none;
73
+ opacity: 0.45;
74
+ -moz-opacity: .45 ;
75
+ }
76
+
77
+ .sc-doc dt {
78
+ font-style: italic;
79
+ }
80
+
81
+ .sc-doc dd {
82
+ margin: 0 0 1em 1em;
83
+ }
84
+
85
+ /* @end */
86
+
87
+ /* @group Summary Table */
88
+
89
+ .sc-doc table.summary {
90
+ min-width: 600px;
91
+ border: 1px #999 solid;
92
+ border-bottom: none ;
93
+ border-spacing: 0;
94
+ margin-bottom: 2em;
95
+ }
96
+
97
+ .sc-doc table.summary td {
98
+ border-bottom: 1px #999 solid;
99
+ border-collapse: collapse;
100
+ padding: 0.5em;
101
+ text-align: left ;
102
+ }
103
+
104
+ .sc-doc table.summary .even td {
105
+ background-color: #eef;
106
+ }
107
+
108
+ .sc-doc table.summary td.label {
109
+ font-weight: bold ;
110
+ width: 100px;
111
+ text-align: right ;
112
+ padding-right: 4px;
113
+ }
114
+
115
+ .sc-doc table.summary td.value {
116
+ min-width: 300px;
117
+ width: 300px;
118
+ }
119
+
120
+ /* @end */
121
+
122
+ /* @group Field & Method Summary */
123
+
124
+ .sc-doc .summary li {
125
+ list-style-type: none ;
126
+ position: relative;
127
+ }
128
+
129
+ .sc-doc .summary li code {
130
+ font-size: 1.1em;
131
+ }
132
+
133
+ .sc-doc .summary li .description {
134
+ display: none ;
135
+ }
136
+
137
+ .sc-doc .summary li:hover .description {
138
+ display: block ;
139
+ font-size: 0.86em;
140
+ position: absolute ;
141
+ left: 80px;
142
+ bottom: 2em;
143
+ padding: 0.3em 1em ;
144
+ background-color: #fff898;
145
+ border: 1px solid #bbae2f;
146
+ /* -webkit-box-shadow: rgba(0,0,0,0.3) 0px 2px 5px; */
147
+ color: #4b4000;
148
+ z-index: 100;
149
+ }
150
+
151
+ /* @end */
152
+
153
+ /* @group Detail */
154
+
155
+ .sc-doc .detail p.signature {
156
+ padding: 0;
157
+ margin: 1em 0;
158
+ font-family: Courier, mono;
159
+ }
160
+
161
+ .sc-doc .detail p.signature .type {
162
+ font-style: italic;
163
+ }
164
+
165
+ .sc-doc .detail p.signature .name {
166
+ font-weight: bold ;
167
+ }
168
+
169
+ /* @end */
170
+
171
+ .sc-doc .jsdoc_ctime {
172
+ border-top: 1px #ccc solid ;
173
+ padding: 4px 0;
174
+ margin-top: 20px;
175
+ margin-bottom: 0px;
176
+ font-size: 1.0em;
177
+ text-align: center ;
178
+ color: #888 ;
179
+ }
180
+
181
+ /* @group Description */
182
+
183
+ .sc-doc .description blockquote,
184
+ .sc-doc .description p.code {
185
+ padding: 10px ;
186
+ margin: 10px 20px;
187
+ background-color: #f5f5f5 ;
188
+ border: 1px #ccc solid ;
189
+ }
190
+
191
+ /* @end */
@@ -0,0 +1,2 @@
1
+ <div id="header">
2
+ </div>
@@ -0,0 +1,19 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.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=utf-8" />
6
+ <title>Generated Javascript Documentation</title>
7
+ </head>
8
+ <frameset cols="20%,80%">
9
+ <frame src="allclasses-frame.html" name="packageFrame" />
10
+ <frame src="splash.html" name="classFrame" />
11
+ <noframes>
12
+ <body>
13
+ <p>
14
+ This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client.
15
+ </p>
16
+ </body>
17
+ </noframes>
18
+ </frameset>
19
+ </html>
@@ -0,0 +1,35 @@
1
+ <symbol alias="{+data.alias+}">
2
+ <name>{+data.name+}</name>
3
+ <memberOf>{+data.memberOf+}</memberOf>
4
+ <isStatic>{+data.isStatic+}</isStatic>
5
+ <isa>{+data.isa+}</isa>
6
+ <desc>{+data.desc+}</desc>
7
+ <classDesc>{+data.classDesc+}</classDesc>
8
+
9
+ <methods><for each="method" in="data.methods">
10
+ <method>
11
+ <name>{+method.name+}</name>
12
+ <memberOf>{+method.memberOf+}</memberOf>
13
+ <isStatic>{+method.isStatic+}</isStatic>
14
+ <desc>{+method.desc+}</desc>
15
+ <params><for each="param" in="method.params">
16
+ <param>
17
+ <type>{+param.type+}</type>
18
+ <name>{+param.name+}</name>
19
+ <desc>{+param.desc+}</desc>
20
+ <defaultValue>{+param.defaultValue+}</defaultValue>
21
+ </param></for>
22
+ </params>
23
+ </method></for>
24
+ </methods>
25
+
26
+ <properties><for each="property" in="data.properties">
27
+ <property>
28
+ <name>{+property.name+}</name>
29
+ <memberOf>{+property.memberOf+}</memberOf>
30
+ <isStatic>{+property.isStatic+}</isStatic>
31
+ <desc>{+property.desc+}</desc>
32
+ <type>{+property.type+}</type>
33
+ </property></for>
34
+ </properties>
35
+ </symbol>
@@ -0,0 +1,24 @@
1
+ String.prototype.reverse = function() {
2
+ }
3
+
4
+ String.prototype.reverse.utf8 = function() {
5
+ }
6
+
7
+ Function.count = function() {
8
+ }
9
+
10
+ /** @memberOf Function */
11
+ Function.count.reset = function() {
12
+ }
13
+
14
+ /** @memberOf Function */
15
+ count.getValue = function() {
16
+ }
17
+
18
+ /** @memberOf Function.prototype */
19
+ getSig = function() {
20
+ }
21
+
22
+ /** @memberOf Function.prototype */
23
+ Function.prototype.getProps = function() {
24
+ }