sproutcore 1.6.0.rc.1-x86-mingw32 → 1.6.0.rc.2-x86-mingw32

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 (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,33 +0,0 @@
1
- IO.include("frame/Opt.js");
2
- IO.include("frame/Chain.js");
3
- IO.include("frame/Link.js");
4
- IO.include("frame/String.js");
5
- IO.include("frame/Hash.js");
6
- IO.include("frame/Namespace.js");
7
- IO.include("frame/Reflection.js");
8
-
9
- /** A few helper functions to make life a little easier. */
10
-
11
- function defined(o) {
12
- return (o !== undefined);
13
- }
14
-
15
- function copy(o) { // todo check for circular refs
16
- if (o == null || typeof(o) != 'object') return o;
17
- var c = new o.constructor();
18
- for(var p in o) c[p] = copy(o[p]);
19
- return c;
20
- }
21
-
22
- function isUnique(arr) {
23
- var l = arr.length;
24
- for(var i = 0; i < l; i++ ) {
25
- if (arr.lastIndexOf(arr[i]) > i) return false;
26
- }
27
- return true;
28
- }
29
-
30
- /** Returns the given string with all regex meta characters backslashed. */
31
- RegExp.escapeMeta = function(str) {
32
- return str.replace(/([$^\\\/()|?+*\[\]{}.-])/g, "\\$1");
33
- }
@@ -1,102 +0,0 @@
1
- /**@constructor*/
2
- function ChainNode(object, link) {
3
- this.value = object;
4
- this.link = link; // describes this node's relationship to the previous node
5
- }
6
-
7
- /**@constructor*/
8
- function Chain(valueLinks) {
9
- this.nodes = [];
10
- this.cursor = -1;
11
-
12
- if (valueLinks && valueLinks.length > 0) {
13
- this.push(valueLinks[0], "//");
14
- for (var i = 1, l = valueLinks.length; i < l; i+=2) {
15
- this.push(valueLinks[i+1], valueLinks[i]);
16
- }
17
- }
18
- }
19
-
20
- Chain.prototype.push = function(o, link) {
21
- if (this.nodes.length > 0 && link) this.nodes.push(new ChainNode(o, link));
22
- else this.nodes.push(new ChainNode(o));
23
- }
24
-
25
- Chain.prototype.unshift = function(o, link) {
26
- if (this.nodes.length > 0 && link) this.nodes[0].link = link;
27
- this.nodes.unshift(new ChainNode(o));
28
- this.cursor++;
29
- }
30
-
31
- Chain.prototype.get = function() {
32
- if (this.cursor < 0 || this.cursor > this.nodes.length-1) return null;
33
- return this.nodes[this.cursor];
34
- }
35
-
36
- Chain.prototype.first = function() {
37
- this.cursor = 0;
38
- return this.get();
39
- }
40
-
41
- Chain.prototype.last = function() {
42
- this.cursor = this.nodes.length-1;
43
- return this.get();
44
- }
45
-
46
- Chain.prototype.next = function() {
47
- this.cursor++;
48
- return this.get();
49
- }
50
-
51
- Chain.prototype.prev = function() {
52
- this.cursor--;
53
- return this.get();
54
- }
55
-
56
- Chain.prototype.toString = function() {
57
- var string = "";
58
- for (var i = 0, l = this.nodes.length; i < l; i++) {
59
- if (this.nodes[i].link) string += " -("+this.nodes[i].link+")-> ";
60
- string += this.nodes[i].value.toString();
61
- }
62
- return string;
63
- }
64
-
65
- Chain.prototype.joinLeft = function() {
66
- var result = "";
67
- for (var i = 0, l = this.cursor; i < l; i++) {
68
- if (result && this.nodes[i].link) result += this.nodes[i].link;
69
- result += this.nodes[i].value.toString();
70
- }
71
- return result;
72
- }
73
-
74
-
75
- /* USAGE:
76
-
77
- var path = "one/two/three.four/five-six";
78
- var pathChain = new Chain(path.split(/([\/.-])/));
79
- print(pathChain);
80
-
81
- var lineage = new Chain();
82
- lineage.push("Port");
83
- lineage.push("Les", "son");
84
- lineage.push("Dawn", "daughter");
85
- lineage.unshift("Purdie", "son");
86
-
87
- print(lineage);
88
-
89
- // walk left
90
- for (var node = lineage.last(); node !== null; node = lineage.prev()) {
91
- print("< "+node.value);
92
- }
93
-
94
- // walk right
95
- var node = lineage.first()
96
- while (node !== null) {
97
- print(node.value);
98
- node = lineage.next();
99
- if (node && node.link) print("had a "+node.link+" named");
100
- }
101
-
102
- */
@@ -1,144 +0,0 @@
1
- /**
2
- * @class
3
- <pre>
4
- This is a lightly modified version of Kevin Jones' JavaScript
5
- library Data.Dump. To download the original visit:
6
- <a href="http://openjsan.org/doc/k/ke/kevinj/Data/Dump/">http://openjsan.org/doc/k/ke/kevinj/Data/Dump/</a>
7
-
8
- AUTHORS
9
-
10
- The Data.Dump JavaScript module is written by Kevin Jones
11
- (kevinj@cpan.org), based on Data::Dump by Gisle Aas (gisle@aas.no),
12
- based on Data::Dumper by Gurusamy Sarathy (gsar@umich.edu).
13
-
14
- COPYRIGHT
15
-
16
- Copyright 2007 Kevin Jones. Copyright 1998-2000,2003-2004 Gisle Aas.
17
- Copyright 1996-1998 Gurusamy Sarathy.
18
-
19
- This program is free software; you can redistribute it and/or modify
20
- it under the terms of the Perl Artistic License
21
-
22
- See http://www.perl.com/perl/misc/Artistic.html
23
- </pre>
24
- * @static
25
- */
26
- Dumper = {
27
- /** @param [...] The objects to dump. */
28
- dump: function () {
29
- if (arguments.length > 1)
30
- return this._dump(arguments);
31
- else if (arguments.length == 1)
32
- return this._dump(arguments[0]);
33
- else
34
- return "()";
35
- },
36
-
37
- _dump: function (obj) {
38
- if (typeof obj == 'undefined') return 'undefined';
39
- var out;
40
- if (obj.serialize) { return obj.serialize(); }
41
- var type = this._typeof(obj);
42
- if (obj.circularReference) obj.circularReference++;
43
- switch (type) {
44
- case 'circular':
45
- out = "{ //circularReference\n}";
46
- break;
47
- case 'object':
48
- var pairs = new Array;
49
-
50
- for (var prop in obj) {
51
- if (prop != "circularReference" && obj.hasOwnProperty(prop)) { //hide inherited properties
52
- pairs.push(prop + ': ' + this._dump(obj[prop]));
53
- }
54
- }
55
-
56
- out = '{' + this._format_list(pairs) + '}';
57
- break;
58
-
59
- case 'string':
60
- for (var prop in Dumper.ESC) {
61
- if (Dumper.ESC.hasOwnProperty(prop)) {
62
- obj = obj.replace(prop, Dumper.ESC[prop]);
63
- }
64
- }
65
-
66
- // Escape UTF-8 Strings
67
- if (obj.match(/^[\x00-\x7f]*$/)) {
68
- out = '"' + obj.replace(/\"/g, "\\\"").replace(/([\n\r]+)/g, "\\$1") + '"';
69
- }
70
- else {
71
- out = "unescape('"+escape(obj)+"')";
72
- }
73
- break;
74
-
75
- case 'array':
76
- var elems = new Array;
77
-
78
- for (var i=0; i<obj.length; i++) {
79
- elems.push( this._dump(obj[i]) );
80
- }
81
-
82
- out = '[' + this._format_list(elems) + ']';
83
- break;
84
-
85
- case 'date':
86
- // firefox returns GMT strings from toUTCString()...
87
- var utc_string = obj.toUTCString().replace(/GMT/,'UTC');
88
- out = 'new Date("' + utc_string + '")';
89
- break;
90
-
91
- case 'element':
92
- // DOM element
93
- out = this._dump_dom(obj);
94
- break;
95
-
96
- default:
97
- out = obj;
98
- }
99
-
100
- out = String(out).replace(/\n/g, '\n ');
101
- out = out.replace(/\n (.*)$/,"\n$1");
102
-
103
- return out;
104
- },
105
-
106
- _format_list: function (list) {
107
- if (!list.length) return '';
108
- var nl = list.toString().length > 60 ? '\n' : ' ';
109
- return nl + list.join(',' + nl) + nl;
110
- },
111
-
112
- _typeof: function (obj) {
113
- if (obj && obj.circularReference && obj.circularReference > 1) return 'circular';
114
- if (Array.prototype.isPrototypeOf(obj)) return 'array';
115
- if (Date.prototype.isPrototypeOf(obj)) return 'date';
116
- if (typeof obj.nodeType != 'undefined') return 'element';
117
- return typeof(obj);
118
- },
119
-
120
- _dump_dom: function (obj) {
121
- return '"' + Dumper.nodeTypes[obj.nodeType] + '"';
122
- }
123
- };
124
-
125
- Dumper.ESC = {
126
- "\t": "\\t",
127
- "\n": "\\n",
128
- "\f": "\\f"
129
- };
130
-
131
- Dumper.nodeTypes = {
132
- 1: "ELEMENT_NODE",
133
- 2: "ATTRIBUTE_NODE",
134
- 3: "TEXT_NODE",
135
- 4: "CDATA_SECTION_NODE",
136
- 5: "ENTITY_REFERENCE_NODE",
137
- 6: "ENTITY_NODE",
138
- 7: "PROCESSING_INSTRUCTION_NODE",
139
- 8: "COMMENT_NODE",
140
- 9: "DOCUMENT_NODE",
141
- 10: "DOCUMENT_TYPE_NODE",
142
- 11: "DOCUMENT_FRAGMENT_NODE",
143
- 12: "NOTATION_NODE"
144
- };
@@ -1,47 +0,0 @@
1
- /**@constructor*/
2
- function Hash() {
3
- this.reset();
4
- }
5
-
6
- Hash.prototype.reset = function() {
7
- this.elements = {};
8
- }
9
-
10
- Hash.prototype.put = function() {
11
- for (var i = 0, l = arguments.length; i < l; i++) {
12
- this.elements[arguments[i]] = arguments[++i];
13
- }
14
- }
15
-
16
- Hash.prototype.has = function(key) {
17
- return this.elements.hasOwnProperty(key);
18
- }
19
-
20
- Hash.prototype.get = function(key) {
21
- return (this.has(key)) ? this.elements[key] : undefined;
22
- }
23
-
24
- Hash.prototype.drop = function(key) {
25
- if (this.has(key)) {
26
- delete this.elements[key];
27
- }
28
- }
29
-
30
- Hash.prototype.rename = function(oldKey, newKey) {
31
- if (oldKey != newKey && this.has(oldKey)) {
32
- this.elements[newKey] = this.elements[oldKey];
33
- delete this.elements[oldKey];
34
- }
35
- }
36
-
37
- Hash.prototype.keys = function() {
38
- var keys = [];
39
- for (var key in this.elements) if (this.has(key)) keys.push(key);
40
- return keys;
41
- }
42
-
43
- Hash.prototype.values = function() {
44
- var values = [];
45
- for (var key in this.elements) if (this.has(key)) values.push(this.get(key));
46
- return values;
47
- }
@@ -1,142 +0,0 @@
1
- /** Handle the creation of HTML links to documented symbols.
2
- @constructor
3
- */
4
- function Link() {
5
- this.alias = "";
6
- this.src = "";
7
- this.file = "";
8
- this.text = "";
9
- this.innerName = "";
10
- this.classLink = false;
11
- this.targetName = "";
12
-
13
- this.target = function(targetName) {
14
- if (defined(targetName)) this.targetName = targetName;
15
- return this;
16
- }
17
- this.inner = function(inner) {
18
- if (defined(inner)) this.innerName = inner;
19
- return this;
20
- }
21
- this.withText = function(text) {
22
- if (defined(text)) this.text = text;
23
- return this;
24
- }
25
- this.toSrc = function(filename) {
26
- if (defined(filename)) this.src = filename;
27
- return this;
28
- }
29
- this.toSymbol = function(alias) {
30
- if (defined(alias)) this.alias = new String(alias);
31
- return this;
32
- }
33
- this.toClass = function(alias) {
34
- this.classLink = true;
35
- return this.toSymbol(alias);
36
- }
37
- this.toFile = function(file) {
38
- if (defined(file)) this.file = file;
39
- return this;
40
- }
41
-
42
- this.toString = function() {
43
- var linkString;
44
- var thisLink = this;
45
-
46
- if (this.alias) {
47
- linkString = this.alias.replace(/(^|[^a-z$0-9_#.:^-])([|a-z$0-9_#.:^-]+)($|[^a-z$0-9_#.:^-])/i,
48
- function(match, prematch, symbolName, postmatch) {
49
- var symbolNames = symbolName.split("|");
50
- var links = [];
51
- for (var i = 0, l = symbolNames.length; i < l; i++) {
52
- thisLink.alias = symbolNames[i];
53
- links.push(thisLink._makeSymbolLink(symbolNames[i]));
54
- }
55
- return prematch+links.join("|")+postmatch;
56
- }
57
- );
58
- }
59
- else if (this.src) {
60
- linkString = thisLink._makeSrcLink(this.src);
61
- }
62
- else if (this.file) {
63
- linkString = thisLink._makeFileLink(this.file);
64
- }
65
-
66
- return linkString;
67
- }
68
- }
69
-
70
- /** prefixed for hashes */
71
- Link.hashPrefix = "";
72
-
73
- /** Appended to the front of relative link paths. */
74
- Link.base = "";
75
-
76
- Link.symbolNameToLinkName = function(symbol) {
77
- var linker = "";
78
- if (symbol.isStatic) linker = ".";
79
- else if (symbol.isInner) linker = "-";
80
-
81
- return Link.hashPrefix+linker+symbol.name;
82
- }
83
-
84
- /** Create a link to a snother symbol. */
85
- Link.prototype._makeSymbolLink = function(alias) {
86
- var linkBase = Link.base+publish.conf.symbolsDir;
87
- var linkTo = Link.symbolSet.getSymbol(alias);
88
- var linkPath;
89
- var target = (this.targetName)? " target=\""+this.targetName+"\"" : "";
90
-
91
- // is it an internal link?
92
- if (alias.charAt(0) == "#") var linkPath = alias;
93
-
94
- // if there is no symbol by that name just return the name unaltered
95
- else if (!linkTo) return this.text || alias;
96
-
97
- // it's a symbol in another file
98
- else {
99
-
100
- if (!linkTo.is("CONSTRUCTOR") && !linkTo.isNamespace) { // it's a method or property
101
- linkPath = escape(linkTo.memberOf) || "_global_";
102
- linkPath += publish.conf.ext + "#" + Link.symbolNameToLinkName(linkTo);
103
- }
104
- else {
105
- linkPath = escape(linkTo.alias);
106
- linkPath += publish.conf.ext + (this.classLink? "":"#" + Link.hashPrefix + "constructor");
107
- }
108
- linkPath = linkBase + linkPath
109
- }
110
-
111
- var linkText = this.text || alias;
112
-
113
- var link = {linkPath: linkPath, linkText: linkText};
114
-
115
- if (typeof JSDOC.PluginManager != "undefined") {
116
- JSDOC.PluginManager.run("onSymbolLink", link);
117
- }
118
-
119
- return "<a href=\""+link.linkPath+"\""+target+">"+link.linkText+"</a>";
120
- }
121
-
122
- /** Create a link to a source file. */
123
- Link.prototype._makeSrcLink = function(srcFilePath) {
124
- var target = (this.targetName)? " target=\""+this.targetName+"\"" : "";
125
-
126
- // transform filepath into a filename
127
- var srcFile = srcFilePath.replace(/\.\.?[\\\/]/g, "").replace(/[:\\\/]/g, "_");
128
- var outFilePath = Link.base + publish.conf.srcDir + srcFile + publish.conf.ext;
129
-
130
- if (!this.text) this.text = FilePath.fileName(srcFilePath);
131
- return "<a href=\""+outFilePath+"\""+target+">"+this.text+"</a>";
132
- }
133
-
134
- /** Create a link to a source file. */
135
- Link.prototype._makeFileLink = function(filePath) {
136
- var target = (this.targetName)? " target=\""+this.targetName+"\"" : "";
137
-
138
- var outFilePath = Link.base + filePath;
139
-
140
- if (!this.text) this.text = filePath;
141
- return "<a href=\""+outFilePath+"\""+target+">"+this.text+"</a>";
142
- }