ninjs 0.14.1 → 0.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (191) hide show
  1. data/.bundle/config +2 -2
  2. data/.travis.yml +1 -0
  3. data/Gemfile +1 -0
  4. data/Gemfile.lock +13 -11
  5. data/README.md +108 -93
  6. data/Rakefile +17 -7
  7. data/VERSION +1 -1
  8. data/bin/ninjs +24 -22
  9. data/lib/ninjs/command.rb +32 -21
  10. data/lib/ninjs/configuration.rb +35 -53
  11. data/lib/ninjs/generator.rb +6 -6
  12. data/lib/ninjs/notification.rb +5 -5
  13. data/lib/ninjs/project.rb +31 -25
  14. data/ninjs.gemspec +18 -142
  15. data/repository/ninjs/core/application.js +13 -24
  16. data/repository/ninjs/core/dom.js +87 -68
  17. data/repository/ninjs/core/existence.js +44 -105
  18. data/repository/ninjs/core/extend.js +11 -32
  19. data/repository/ninjs/core/module.js +53 -107
  20. data/repository/ninjs/core/nin.js +5 -7
  21. data/repository/ninjs/tests/extension.test.js +0 -10
  22. data/repository/ninjs/tests/index.html +19 -20
  23. data/repository/ninjs/tests/module.test.js +52 -56
  24. data/repository/ninjs/utilities/array.js +8 -8
  25. data/repository/ninjs/utilities/cookie.js +59 -0
  26. data/repository/ninjs/utilities/css.js +7 -7
  27. data/repository/ninjs/utilities/number.js +2 -2
  28. data/repository/ninjs/utilities/string.js +26 -26
  29. data/spec/cli_spec.rb +90 -88
  30. data/spec/command_spec.rb +104 -137
  31. data/spec/configuration_spec.rb +23 -37
  32. data/spec/fixtures/_global.module.js +9 -0
  33. data/spec/fixtures/compressed.myapp.js +23 -44
  34. data/spec/fixtures/foo.elements.js +1 -1
  35. data/spec/fixtures/foo.js +5 -5
  36. data/spec/fixtures/foo.model.js +1 -1
  37. data/spec/fixtures/foo.module.js +3 -3
  38. data/spec/fixtures/hello.elements.js +1 -1
  39. data/spec/fixtures/hello.js +5 -5
  40. data/spec/fixtures/hello.model.js +1 -1
  41. data/spec/fixtures/hello.module.js +3 -3
  42. data/spec/fixtures/myapp.initial.js +198 -329
  43. data/spec/fixtures/myapp.js +285 -357
  44. data/spec/fixtures/mymodule.alias.module.js +2 -2
  45. data/spec/fixtures/mymodule.dependencies.module.js +2 -2
  46. data/spec/fixtures/mymodule.elements.js +1 -1
  47. data/spec/fixtures/mymodule.model.js +1 -1
  48. data/spec/fixtures/mymodule.module.js +2 -2
  49. data/spec/fixtures/mymodule.module_alias.module.js +10 -0
  50. data/spec/fixtures/new.ninjs.conf +2 -0
  51. data/spec/fixtures/nin.js +198 -329
  52. data/spec/fixtures/ninjs.conf +2 -0
  53. data/spec/fixtures/updated.ninjs.conf +8 -0
  54. data/spec/generator_spec.rb +37 -26
  55. data/spec/ninjs_spec.rb +6 -6
  56. data/spec/project_spec.rb +229 -221
  57. data/spec/spec_helper.rb +3 -1
  58. data/spec/testspec_spec.rb +7 -0
  59. metadata +28 -145
  60. data/repository/json2.js +0 -482
  61. data/repository/modernizr/1.5.js +0 -28
  62. data/repository/modernizr/latest.js +0 -1
  63. data/repository/ninjs/docs/Data/ClassHierarchy.nd +0 -0
  64. data/repository/ninjs/docs/Data/ConfigFileInfo.nd +0 -0
  65. data/repository/ninjs/docs/Data/FileInfo.nd +0 -16
  66. data/repository/ninjs/docs/Data/ImageFileInfo.nd +0 -0
  67. data/repository/ninjs/docs/Data/ImageReferenceTable.nd +0 -0
  68. data/repository/ninjs/docs/Data/IndexInfo.nd +0 -0
  69. data/repository/ninjs/docs/Data/PreviousMenuState.nd +0 -0
  70. data/repository/ninjs/docs/Data/PreviousSettings.nd +0 -0
  71. data/repository/ninjs/docs/Data/SymbolTable.nd +0 -0
  72. data/repository/ninjs/docs/Languages.txt +0 -113
  73. data/repository/ninjs/docs/Menu.txt +0 -63
  74. data/repository/ninjs/docs/Topics.txt +0 -81
  75. data/repository/ninjs/docs/files/core/application-js.html +0 -44
  76. data/repository/ninjs/docs/files/core/existence-js.html +0 -60
  77. data/repository/ninjs/docs/files/core/extend-js.html +0 -55
  78. data/repository/ninjs/docs/files/core/module-js.html +0 -80
  79. data/repository/ninjs/docs/files/core/nin-js.html +0 -38
  80. data/repository/ninjs/docs/index.html +0 -1
  81. data/repository/ninjs/docs/index/Classes.html +0 -33
  82. data/repository/ninjs/docs/index/Files.html +0 -45
  83. data/repository/ninjs/docs/index/Functions.html +0 -65
  84. data/repository/ninjs/docs/index/General.html +0 -85
  85. data/repository/ninjs/docs/index/Variables.html +0 -45
  86. data/repository/ninjs/docs/javascript/main.js +0 -841
  87. data/repository/ninjs/docs/javascript/prettify.js +0 -1526
  88. data/repository/ninjs/docs/javascript/searchdata.js +0 -152
  89. data/repository/ninjs/docs/search/ClassesN.html +0 -20
  90. data/repository/ninjs/docs/search/FilesA.html +0 -20
  91. data/repository/ninjs/docs/search/FilesE.html +0 -20
  92. data/repository/ninjs/docs/search/FilesM.html +0 -20
  93. data/repository/ninjs/docs/search/FilesN.html +0 -20
  94. data/repository/ninjs/docs/search/FunctionsA.html +0 -20
  95. data/repository/ninjs/docs/search/FunctionsC.html +0 -20
  96. data/repository/ninjs/docs/search/FunctionsE.html +0 -20
  97. data/repository/ninjs/docs/search/FunctionsI.html +0 -20
  98. data/repository/ninjs/docs/search/FunctionsM.html +0 -20
  99. data/repository/ninjs/docs/search/FunctionsR.html +0 -20
  100. data/repository/ninjs/docs/search/FunctionsS.html +0 -20
  101. data/repository/ninjs/docs/search/FunctionsSymbols.html +0 -20
  102. data/repository/ninjs/docs/search/FunctionsU.html +0 -20
  103. data/repository/ninjs/docs/search/GeneralA.html +0 -20
  104. data/repository/ninjs/docs/search/GeneralC.html +0 -20
  105. data/repository/ninjs/docs/search/GeneralD.html +0 -20
  106. data/repository/ninjs/docs/search/GeneralE.html +0 -20
  107. data/repository/ninjs/docs/search/GeneralF.html +0 -20
  108. data/repository/ninjs/docs/search/GeneralI.html +0 -20
  109. data/repository/ninjs/docs/search/GeneralM.html +0 -20
  110. data/repository/ninjs/docs/search/GeneralN.html +0 -20
  111. data/repository/ninjs/docs/search/GeneralR.html +0 -20
  112. data/repository/ninjs/docs/search/GeneralS.html +0 -20
  113. data/repository/ninjs/docs/search/GeneralSymbols.html +0 -20
  114. data/repository/ninjs/docs/search/GeneralT.html +0 -20
  115. data/repository/ninjs/docs/search/GeneralU.html +0 -20
  116. data/repository/ninjs/docs/search/GeneralV.html +0 -20
  117. data/repository/ninjs/docs/search/NoResults.html +0 -15
  118. data/repository/ninjs/docs/search/VariablesD.html +0 -20
  119. data/repository/ninjs/docs/search/VariablesN.html +0 -20
  120. data/repository/ninjs/docs/search/VariablesR.html +0 -20
  121. data/repository/ninjs/docs/search/VariablesT.html +0 -20
  122. data/repository/ninjs/docs/styles/main.css +0 -828
  123. data/repository/nullconsole.js +0 -7
  124. data/repository/qunit/assets/css/qunit.css +0 -196
  125. data/repository/qunit/qunit.js +0 -1374
  126. data/repository/selectivizr/1.0.js +0 -5
  127. data/repository/selectivizr/latest.js +0 -1
  128. data/repository/syntaxhighlighter/all.js +0 -11
  129. data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shCore.css +0 -226
  130. data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shCoreDefault.css +0 -328
  131. data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shCoreDjango.css +0 -331
  132. data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shCoreEclipse.css +0 -339
  133. data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shCoreEmacs.css +0 -324
  134. data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shCoreFadeToGrey.css +0 -328
  135. data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shCoreMDUltra.css +0 -324
  136. data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shCoreMidnight.css +0 -324
  137. data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shCoreRDark.css +0 -324
  138. data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shThemeDefault.css +0 -117
  139. data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shThemeDjango.css +0 -120
  140. data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shThemeEclipse.css +0 -128
  141. data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shThemeEmacs.css +0 -113
  142. data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shThemeFadeToGrey.css +0 -117
  143. data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shThemeMDUltra.css +0 -113
  144. data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shThemeMidnight.css +0 -113
  145. data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shThemeRDark.css +0 -113
  146. data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shCore.scss +0 -216
  147. data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shCoreDefault.scss +0 -2
  148. data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shCoreDjango.scss +0 -2
  149. data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shCoreEclipse.scss +0 -2
  150. data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shCoreEmacs.scss +0 -2
  151. data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shCoreFadeToGrey.scss +0 -2
  152. data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shCoreMDUltra.scss +0 -2
  153. data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shCoreMidnight.scss +0 -2
  154. data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shCoreRDark.scss +0 -2
  155. data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shThemeDefault.scss +0 -7
  156. data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shThemeDjango.scss +0 -36
  157. data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shThemeEclipse.scss +0 -48
  158. data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shThemeEmacs.scss +0 -32
  159. data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shThemeFadeToGrey.scss +0 -36
  160. data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shThemeMDUltra.scss +0 -32
  161. data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shThemeMidnight.scss +0 -32
  162. data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shThemeRDark.scss +0 -32
  163. data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_theme_template.scss +0 -120
  164. data/repository/syntaxhighlighter/shAutoloader.js +0 -17
  165. data/repository/syntaxhighlighter/shBrushAS3.js +0 -59
  166. data/repository/syntaxhighlighter/shBrushAppleScript.js +0 -75
  167. data/repository/syntaxhighlighter/shBrushBash.js +0 -59
  168. data/repository/syntaxhighlighter/shBrushCSharp.js +0 -65
  169. data/repository/syntaxhighlighter/shBrushColdFusion.js +0 -100
  170. data/repository/syntaxhighlighter/shBrushCpp.js +0 -97
  171. data/repository/syntaxhighlighter/shBrushCss.js +0 -91
  172. data/repository/syntaxhighlighter/shBrushDelphi.js +0 -55
  173. data/repository/syntaxhighlighter/shBrushDiff.js +0 -41
  174. data/repository/syntaxhighlighter/shBrushErlang.js +0 -52
  175. data/repository/syntaxhighlighter/shBrushGroovy.js +0 -67
  176. data/repository/syntaxhighlighter/shBrushJScript.js +0 -52
  177. data/repository/syntaxhighlighter/shBrushJava.js +0 -57
  178. data/repository/syntaxhighlighter/shBrushJavaFX.js +0 -58
  179. data/repository/syntaxhighlighter/shBrushPerl.js +0 -72
  180. data/repository/syntaxhighlighter/shBrushPhp.js +0 -88
  181. data/repository/syntaxhighlighter/shBrushPlain.js +0 -33
  182. data/repository/syntaxhighlighter/shBrushPowerShell.js +0 -74
  183. data/repository/syntaxhighlighter/shBrushPython.js +0 -64
  184. data/repository/syntaxhighlighter/shBrushRuby.js +0 -55
  185. data/repository/syntaxhighlighter/shBrushSass.js +0 -94
  186. data/repository/syntaxhighlighter/shBrushScala.js +0 -51
  187. data/repository/syntaxhighlighter/shBrushSql.js +0 -66
  188. data/repository/syntaxhighlighter/shBrushVb.js +0 -56
  189. data/repository/syntaxhighlighter/shBrushXml.js +0 -69
  190. data/repository/syntaxhighlighter/shCore.js +0 -17
  191. data/repository/syntaxhighlighter/shLegacy.js +0 -17
@@ -1,80 +0,0 @@
1
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
2
-
3
- <html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>module.js</title><link rel="stylesheet" type="text/css" href="../../styles/main.css"><script language=JavaScript src="../../javascript/main.js"></script><script language=JavaScript src="../../javascript/prettify.js"></script><script language=JavaScript src="../../javascript/searchdata.js"></script></head><body class="ContentPage" onLoad="NDOnLoad();prettyPrint();"><script language=JavaScript><!--
4
- if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>
5
-
6
- <!-- Generated by Natural Docs, version 1.51 -->
7
- <!-- http://www.naturaldocs.org -->
8
-
9
- <!-- saved from url=(0026)http://www.naturaldocs.org -->
10
-
11
-
12
-
13
-
14
- <div id=Content><div class="CFile"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="module.js"></a>module.js</h1><div class=CBody><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#module.js" >module.js</a></td><td class=SDescription></td></tr><tr class="SClass"><td class=SEntry><a href="#NinjsModule" >NinjsModule</a></td><td class=SDescription>A NinjsModule is an object which encapsulates a certain behavior or functionality.</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#NinjsModule.Variables" >Variables</a></td><td class=SDescription></td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#NinjsModule.data" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">data</a></td><td class=SDescription>The module&rsquo;s data object</td></tr><tr class="SVariable SIndent2"><td class=SEntry><a href="#NinjsModule.name" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">name</a></td><td class=SDescription>The module&rsquo;s name (string)</td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#NinjsModule.run_tests(beta)" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">run_tests (beta)</a></td><td class=SDescription>Boolean to turn tests on/off</td></tr><tr class="SVariable SIndent2"><td class=SEntry><a href="#NinjsModule.tests(beta)" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">tests (beta)</a></td><td class=SDescription>Array of test files to run</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#NinjsModule.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#NinjsModule.actions" >actions</a></td><td class=SDescription>The actions method contains code to be executed when run is called. </td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#NinjsModule.run" >run</a></td><td class=SDescription>Waits for the DOM to load then calls execute.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#NinjsModule.call_on_ready" >call_on_ready</a></td><td class=SDescription>Waits for the DOM to be ready and then executes a callback.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#NinjsModule.execute" >execute</a></td><td class=SDescription>Wrapper method that set&rsquo;s up the environment and then calls actions.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#NinjsModule.elements" >elements</a></td><td class=SDescription>Method to define module elements.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#NinjsModule.set_data" >set_data</a></td><td class=SDescription>Adds properties to the module&rsquo;s data object.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#NinjsModule.add_test" >add_test</a></td><td class=SDescription>Adds a test file to the tests array (beta).</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#NinjsModule._run_tests" >_run_tests</a></td><td class=SDescription>Runs the test files in the test array. </td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
15
-
16
- <div class="CClass"><div class=CTopic><h2 class=CTitle><a name="NinjsModule"></a>NinjsModule</h2><div class=CBody><p>A NinjsModule is an object which encapsulates a certain behavior or functionality.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>name</td><td class=CDLDescription>the name of the module</td></tr></table><h4 class=CHeading>See Also</h4><p><a href="application-js.html#NinjsApplication" class=LClass id=link9 onMouseOver="ShowTip(event, 'tt5', 'link9')" onMouseOut="HideTip('tt5')">NinjsApplication</a></p><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SGroup"><td class=SEntry><a href="#NinjsModule.Variables" >Variables</a></td><td class=SDescription></td></tr><tr class="SVariable SIndent1 SMarked"><td class=SEntry><a href="#NinjsModule.data" id=link5 onMouseOver="ShowTip(event, 'tt1', 'link5')" onMouseOut="HideTip('tt1')">data</a></td><td class=SDescription>The module&rsquo;s data object</td></tr><tr class="SVariable SIndent1"><td class=SEntry><a href="#NinjsModule.name" id=link6 onMouseOver="ShowTip(event, 'tt2', 'link6')" onMouseOut="HideTip('tt2')">name</a></td><td class=SDescription>The module&rsquo;s name (string)</td></tr><tr class="SVariable SIndent1 SMarked"><td class=SEntry><a href="#NinjsModule.run_tests(beta)" id=link7 onMouseOver="ShowTip(event, 'tt3', 'link7')" onMouseOut="HideTip('tt3')">run_tests (beta)</a></td><td class=SDescription>Boolean to turn tests on/off</td></tr><tr class="SVariable SIndent1"><td class=SEntry><a href="#NinjsModule.tests(beta)" id=link8 onMouseOver="ShowTip(event, 'tt4', 'link8')" onMouseOut="HideTip('tt4')">tests (beta)</a></td><td class=SDescription>Array of test files to run</td></tr><tr class="SGroup"><td class=SEntry><a href="#NinjsModule.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#NinjsModule.actions" >actions</a></td><td class=SDescription>The actions method contains code to be executed when run is called. </td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#NinjsModule.run" >run</a></td><td class=SDescription>Waits for the DOM to load then calls execute.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#NinjsModule.call_on_ready" >call_on_ready</a></td><td class=SDescription>Waits for the DOM to be ready and then executes a callback.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#NinjsModule.execute" >execute</a></td><td class=SDescription>Wrapper method that set&rsquo;s up the environment and then calls actions.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#NinjsModule.elements" >elements</a></td><td class=SDescription>Method to define module elements.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#NinjsModule.set_data" >set_data</a></td><td class=SDescription>Adds properties to the module&rsquo;s data object.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#NinjsModule.add_test" >add_test</a></td><td class=SDescription>Adds a test file to the tests array (beta).</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#NinjsModule._run_tests" >_run_tests</a></td><td class=SDescription>Runs the test files in the test array. </td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
17
-
18
- <div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="NinjsModule.Variables"></a>Variables</h3></div></div>
19
-
20
- <div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="NinjsModule.data"></a>data</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">this.data</td></tr></table></blockquote><p>The module&rsquo;s data object</p></div></div></div>
21
-
22
- <div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="NinjsModule.name"></a>name</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">this.name</td></tr></table></blockquote><p>The module&rsquo;s name (string)</p></div></div></div>
23
-
24
- <div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="NinjsModule.run_tests(beta)"></a>run_tests (beta)</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">this.run_tests</td></tr></table></blockquote><p>Boolean to turn tests on/off</p></div></div></div>
25
-
26
- <div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="NinjsModule.tests(beta)"></a>tests (beta)</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">this.tests</td></tr></table></blockquote><p>Array of test files to run</p></div></div></div>
27
-
28
- <div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="NinjsModule.Functions"></a>Functions</h3></div></div>
29
-
30
- <div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="NinjsModule.actions"></a>actions</h3><div class=CBody><p>The actions method contains code to be executed when run is called.&nbsp; This method is a placeholder to be overwritten.</p><blockquote><pre> MyModule.actions = function() {
31
- // define actions here
32
- };</pre></blockquote></div></div></div>
33
-
34
- <div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="NinjsModule.run"></a>run</h3><div class=CBody><p>Waits for the DOM to load then calls execute.</p><blockquote><pre>MyModule.run();</pre></blockquote></div></div></div>
35
-
36
- <div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="NinjsModule.call_on_ready"></a>call_on_ready</h3><div class=CBody><p>Waits for the DOM to be ready and then executes a callback.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>callback</td><td class=CDLDescription>function to be called when the DOM is ready</td></tr></table><blockquote><pre>MyModule.call_on_ready(function() {
37
- // some code to execute when the DOM is ready
38
- });</pre></blockquote></div></div></div>
39
-
40
- <div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="NinjsModule.execute"></a>execute</h3><div class=CBody><p>Wrapper method that set&rsquo;s up the environment and then calls actions.</p><blockquote><pre>MyModule.execute();</pre></blockquote></div></div></div>
41
-
42
- <div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="NinjsModule.elements"></a>elements</h3><div class=CBody><p>Method to define module elements.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>callback</td><td class=CDLDescription>function to define a module&rsquo;s elements</td></tr></table><blockquote><pre>MyModule.elements(function() {
43
- // element definitions go here
44
- });</pre></blockquote></div></div></div>
45
-
46
- <div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="NinjsModule.set_data"></a>set_data</h3><div class=CBody><p>Adds properties to the module&rsquo;s data object.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>key</td><td class=CDLDescription>string or object (if string = key, if object sets multiple properties)</td></tr><tr><td class=CDLEntry>value</td><td class=CDLDescription>value of key if key is string</td></tr></table><blockquote><pre>MyModule.set_data('some_key', 'some_value');
47
- MyModule.data.some_key === 'some_value'</pre></blockquote><blockquote><pre>MyModule.set_data({
48
- 'property_one': 'value_one',
49
- 'property_two': 'value_two'
50
- });
51
- MyModule.data.property_one === 'value_one'
52
- MyModule.data.property_two === 'value_two'</pre></blockquote></div></div></div>
53
-
54
- <div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="NinjsModule.add_test"></a>add_test</h3><div class=CBody><p>Adds a test file to the tests array (beta).</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>test_file</td><td class=CDLDescription>File to add to the tests array</td></tr></table><blockquote><pre>MyModule.add_test('mytest.test.js');</pre></blockquote></div></div></div>
55
-
56
- <div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="NinjsModule._run_tests"></a>_run_tests</h3><div class=CBody><p>Runs the test files in the test array.&nbsp; This method is automatically called by the execute method if run_tests === true</p></div></div></div>
57
-
58
- </div><!--Content-->
59
-
60
-
61
- <div id=Footer><a href="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->
62
-
63
-
64
- <div id=Menu><div class=MEntry><div class=MFile><a href="application-js.html">application.js</a></div></div><div class=MEntry><div class=MFile><a href="existence-js.html">existence.js</a></div></div><div class=MEntry><div class=MFile><a href="extend-js.html">extend.js</a></div></div><div class=MEntry><div class=MFile id=MSelected>module.js</div></div><div class=MEntry><div class=MFile><a href="nin-js.html">nin.js</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent1')">Index</a><div class=MGroupContent id=MGroupContent1><div class=MEntry><div class=MIndex><a href="../../index/General.html">Everything</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Classes.html">Classes</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Files.html">Files</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Functions.html">Functions</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Variables.html">Variables</a></div></div></div></div></div><script type="text/javascript"><!--
65
- var searchPanel = new SearchPanel("searchPanel", "HTML", "../../search");
66
- --></script><div id=MSearchPanel class=MSearchPanelInactive><input type=text id=MSearchField value=Search onFocus="searchPanel.OnSearchFieldFocus(true)" onBlur="searchPanel.OnSearchFieldFocus(false)" onKeyUp="searchPanel.OnSearchFieldChange()"><select id=MSearchType onFocus="searchPanel.OnSearchTypeFocus(true)" onBlur="searchPanel.OnSearchTypeFocus(false)" onChange="searchPanel.OnSearchTypeChange()"><option id=MSearchEverything selected value="General">Everything</option><option value="Classes">Classes</option><option value="Files">Files</option><option value="Functions">Functions</option><option value="Variables">Variables</option></select></div></div><!--Menu-->
67
-
68
-
69
-
70
- <!--START_ND_TOOLTIPS-->
71
- <div class=CToolTip id="tt1"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">this.data</td></tr></table></blockquote>The module&rsquo;s data object</div></div><div class=CToolTip id="tt2"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">this.name</td></tr></table></blockquote>The module&rsquo;s name (string)</div></div><div class=CToolTip id="tt3"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">this.run_tests</td></tr></table></blockquote>Boolean to turn tests on/off</div></div><div class=CToolTip id="tt4"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">this.tests</td></tr></table></blockquote>Array of test files to run</div></div><div class=CToolTip id="tt5"><div class=CClass>An NinjsApplication object serves as your application&rsquo;s namespace and includes a utility to add modules to the application object.</div></div><!--END_ND_TOOLTIPS-->
72
-
73
-
74
-
75
-
76
- <div id=MSearchResultsWindow><iframe src="" frameborder=0 name=MSearchResults id=MSearchResults></iframe><a href="javascript:searchPanel.CloseResultsWindow()" id=MSearchResultsWindowClose>Close</a></div>
77
-
78
-
79
- <script language=JavaScript><!--
80
- if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>
@@ -1,38 +0,0 @@
1
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
2
-
3
- <html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>nin.js</title><link rel="stylesheet" type="text/css" href="../../styles/main.css"><script language=JavaScript src="../../javascript/main.js"></script><script language=JavaScript src="../../javascript/prettify.js"></script><script language=JavaScript src="../../javascript/searchdata.js"></script></head><body class="ContentPage" onLoad="NDOnLoad();prettyPrint();"><script language=JavaScript><!--
4
- if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>
5
-
6
- <!-- Generated by Natural Docs, version 1.51 -->
7
- <!-- http://www.naturaldocs.org -->
8
-
9
- <!-- saved from url=(0026)http://www.naturaldocs.org -->
10
-
11
-
12
-
13
-
14
- <div id=Content><div class="CFile"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="nin.js"></a>nin.js</h1><div class=CBody></div></div></div>
15
-
16
- </div><!--Content-->
17
-
18
-
19
- <div id=Footer><a href="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->
20
-
21
-
22
- <div id=Menu><div class=MEntry><div class=MFile><a href="application-js.html">application.js</a></div></div><div class=MEntry><div class=MFile><a href="existence-js.html">existence.js</a></div></div><div class=MEntry><div class=MFile><a href="extend-js.html">extend.js</a></div></div><div class=MEntry><div class=MFile><a href="module-js.html">module.js</a></div></div><div class=MEntry><div class=MFile id=MSelected>nin.js</div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent1')">Index</a><div class=MGroupContent id=MGroupContent1><div class=MEntry><div class=MIndex><a href="../../index/General.html">Everything</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Classes.html">Classes</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Files.html">Files</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Functions.html">Functions</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Variables.html">Variables</a></div></div></div></div></div><script type="text/javascript"><!--
23
- var searchPanel = new SearchPanel("searchPanel", "HTML", "../../search");
24
- --></script><div id=MSearchPanel class=MSearchPanelInactive><input type=text id=MSearchField value=Search onFocus="searchPanel.OnSearchFieldFocus(true)" onBlur="searchPanel.OnSearchFieldFocus(false)" onKeyUp="searchPanel.OnSearchFieldChange()"><select id=MSearchType onFocus="searchPanel.OnSearchTypeFocus(true)" onBlur="searchPanel.OnSearchTypeFocus(false)" onChange="searchPanel.OnSearchTypeChange()"><option id=MSearchEverything selected value="General">Everything</option><option value="Classes">Classes</option><option value="Files">Files</option><option value="Functions">Functions</option><option value="Variables">Variables</option></select></div></div><!--Menu-->
25
-
26
-
27
-
28
- <!--START_ND_TOOLTIPS-->
29
- <!--END_ND_TOOLTIPS-->
30
-
31
-
32
-
33
-
34
- <div id=MSearchResultsWindow><iframe src="" frameborder=0 name=MSearchResults id=MSearchResults></iframe><a href="javascript:searchPanel.CloseResultsWindow()" id=MSearchResultsWindowClose>Close</a></div>
35
-
36
-
37
- <script language=JavaScript><!--
38
- if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>
@@ -1 +0,0 @@
1
- <html><head><meta http-equiv="Refresh" CONTENT="0; URL=files/core/application-js.html"></head></html>
@@ -1,33 +0,0 @@
1
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
2
-
3
- <html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Class Index</title><link rel="stylesheet" type="text/css" href="../styles/main.css"><script language=JavaScript src="../javascript/main.js"></script><script language=JavaScript src="../javascript/searchdata.js"></script></head><body class="IndexPage" onLoad="NDOnLoad()"><script language=JavaScript><!--
4
- if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>
5
-
6
- <!-- Generated by Natural Docs, version 1.51 -->
7
- <!-- http://www.naturaldocs.org -->
8
-
9
- <!-- saved from url=(0026)http://www.naturaldocs.org -->
10
-
11
-
12
-
13
-
14
- <div id=Index><div class=IPageTitle>Class Index</div><div class=INavigationBar>$#! &middot; 0-9 &middot; A &middot; B &middot; C &middot; D &middot; E &middot; F &middot; G &middot; H &middot; I &middot; J &middot; K &middot; L &middot; M &middot; <a href="#N">N</a> &middot; O &middot; P &middot; Q &middot; R &middot; S &middot; T &middot; U &middot; V &middot; W &middot; X &middot; Y &middot; Z</div><table border=0 cellspacing=0 cellpadding=0><tr><td class=IHeading id=IFirstHeading><a name="N"></a>N</td><td></td></tr><tr><td class=ISymbolPrefix id=IFirstSymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/application-js.html#NinjsApplication" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')" class=ISymbol>NinjsApplication</a></td></tr><tr><td class=ISymbolPrefix id=ILastSymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/module-js.html#NinjsModule" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')" class=ISymbol>NinjsModule</a></td></tr></table>
15
- <!--START_ND_TOOLTIPS-->
16
- <div class=CToolTip id="tt1"><div class=CClass>An NinjsApplication object serves as your application&rsquo;s namespace and includes a utility to add modules to the application object.</div></div><div class=CToolTip id="tt2"><div class=CClass>A NinjsModule is an object which encapsulates a certain behavior or functionality.</div></div><!--END_ND_TOOLTIPS-->
17
-
18
- </div><!--Index-->
19
-
20
-
21
- <div id=Footer><a href="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->
22
-
23
-
24
- <div id=Menu><div class=MEntry><div class=MFile><a href="../files/core/application-js.html">application.js</a></div></div><div class=MEntry><div class=MFile><a href="../files/core/existence-js.html">existence.js</a></div></div><div class=MEntry><div class=MFile><a href="../files/core/extend-js.html">extend.js</a></div></div><div class=MEntry><div class=MFile><a href="../files/core/module-js.html">module.js</a></div></div><div class=MEntry><div class=MFile><a href="../files/core/nin-js.html">nin.js</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent1')">Index</a><div class=MGroupContent id=MGroupContent1><div class=MEntry><div class=MIndex><a href="General.html">Everything</a></div></div><div class=MEntry><div class=MIndex id=MSelected>Classes</div></div><div class=MEntry><div class=MIndex><a href="Files.html">Files</a></div></div><div class=MEntry><div class=MIndex><a href="Functions.html">Functions</a></div></div><div class=MEntry><div class=MIndex><a href="Variables.html">Variables</a></div></div></div></div></div><script type="text/javascript"><!--
25
- var searchPanel = new SearchPanel("searchPanel", "HTML", "../search");
26
- --></script><div id=MSearchPanel class=MSearchPanelInactive><input type=text id=MSearchField value=Search onFocus="searchPanel.OnSearchFieldFocus(true)" onBlur="searchPanel.OnSearchFieldFocus(false)" onKeyUp="searchPanel.OnSearchFieldChange()"><select id=MSearchType onFocus="searchPanel.OnSearchTypeFocus(true)" onBlur="searchPanel.OnSearchTypeFocus(false)" onChange="searchPanel.OnSearchTypeChange()"><option id=MSearchEverything selected value="General">Everything</option><option value="Classes">Classes</option><option value="Files">Files</option><option value="Functions">Functions</option><option value="Variables">Variables</option></select></div></div><!--Menu-->
27
-
28
-
29
- <div id=MSearchResultsWindow><iframe src="" frameborder=0 name=MSearchResults id=MSearchResults></iframe><a href="javascript:searchPanel.CloseResultsWindow()" id=MSearchResultsWindowClose>Close</a></div>
30
-
31
-
32
- <script language=JavaScript><!--
33
- if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>
@@ -1,45 +0,0 @@
1
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
2
-
3
- <html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>File Index</title><link rel="stylesheet" type="text/css" href="../styles/main.css"><script language=JavaScript src="../javascript/main.js"></script><script language=JavaScript src="../javascript/searchdata.js"></script></head><body class="IndexPage" onLoad="NDOnLoad()"><script language=JavaScript><!--
4
- if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>
5
-
6
- <!-- Generated by Natural Docs, version 1.51 -->
7
- <!-- http://www.naturaldocs.org -->
8
-
9
- <!-- saved from url=(0026)http://www.naturaldocs.org -->
10
-
11
-
12
-
13
-
14
- <div id=Index><div class=IPageTitle>File Index</div><div class=INavigationBar>$#! &middot; 0-9 &middot; <a href="#A">A</a> &middot; B &middot; C &middot; D &middot; <a href="#E">E</a> &middot; F &middot; G &middot; H &middot; I &middot; J &middot; K &middot; L &middot; <a href="#M">M</a> &middot; <a href="#N">N</a> &middot; O &middot; P &middot; Q &middot; R &middot; S &middot; T &middot; U &middot; V &middot; W &middot; X &middot; Y &middot; Z</div><table border=0 cellspacing=0 cellpadding=0><tr><td class=IHeading id=IFirstHeading><a name="A"></a>A</td><td></td></tr><tr><td class=ISymbolPrefix id=IOnlySymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/application-js.html#application.js" class=ISymbol>application.js</a></td></tr><tr><td class=IHeading><a name="E"></a>E</td><td></td></tr><tr><td class=ISymbolPrefix id=IFirstSymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/existence-js.html#existence.js" class=ISymbol>existence.js</a></td></tr><tr><td class=ISymbolPrefix id=ILastSymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/extend-js.html#extend.js" class=ISymbol>extend.js</a></td></tr><tr><td class=IHeading><a name="M"></a>M</td><td></td></tr><tr><td class=ISymbolPrefix id=IOnlySymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/module-js.html#module.js" class=ISymbol>module.js</a></td></tr><tr><td class=IHeading><a name="N"></a>N</td><td></td></tr><tr><td class=ISymbolPrefix id=IOnlySymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/nin-js.html#nin.js" class=ISymbol>nin.js</a></td></tr></table>
15
- <!--START_ND_TOOLTIPS-->
16
- <!--END_ND_TOOLTIPS-->
17
-
18
-
19
- <!--START_ND_TOOLTIPS-->
20
- <!--END_ND_TOOLTIPS-->
21
-
22
-
23
- <!--START_ND_TOOLTIPS-->
24
- <!--END_ND_TOOLTIPS-->
25
-
26
-
27
- <!--START_ND_TOOLTIPS-->
28
- <!--END_ND_TOOLTIPS-->
29
-
30
- </div><!--Index-->
31
-
32
-
33
- <div id=Footer><a href="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->
34
-
35
-
36
- <div id=Menu><div class=MEntry><div class=MFile><a href="../files/core/application-js.html">application.js</a></div></div><div class=MEntry><div class=MFile><a href="../files/core/existence-js.html">existence.js</a></div></div><div class=MEntry><div class=MFile><a href="../files/core/extend-js.html">extend.js</a></div></div><div class=MEntry><div class=MFile><a href="../files/core/module-js.html">module.js</a></div></div><div class=MEntry><div class=MFile><a href="../files/core/nin-js.html">nin.js</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent1')">Index</a><div class=MGroupContent id=MGroupContent1><div class=MEntry><div class=MIndex><a href="General.html">Everything</a></div></div><div class=MEntry><div class=MIndex><a href="Classes.html">Classes</a></div></div><div class=MEntry><div class=MIndex id=MSelected>Files</div></div><div class=MEntry><div class=MIndex><a href="Functions.html">Functions</a></div></div><div class=MEntry><div class=MIndex><a href="Variables.html">Variables</a></div></div></div></div></div><script type="text/javascript"><!--
37
- var searchPanel = new SearchPanel("searchPanel", "HTML", "../search");
38
- --></script><div id=MSearchPanel class=MSearchPanelInactive><input type=text id=MSearchField value=Search onFocus="searchPanel.OnSearchFieldFocus(true)" onBlur="searchPanel.OnSearchFieldFocus(false)" onKeyUp="searchPanel.OnSearchFieldChange()"><select id=MSearchType onFocus="searchPanel.OnSearchTypeFocus(true)" onBlur="searchPanel.OnSearchTypeFocus(false)" onChange="searchPanel.OnSearchTypeChange()"><option id=MSearchEverything selected value="General">Everything</option><option value="Classes">Classes</option><option value="Files">Files</option><option value="Functions">Functions</option><option value="Variables">Variables</option></select></div></div><!--Menu-->
39
-
40
-
41
- <div id=MSearchResultsWindow><iframe src="" frameborder=0 name=MSearchResults id=MSearchResults></iframe><a href="javascript:searchPanel.CloseResultsWindow()" id=MSearchResultsWindowClose>Close</a></div>
42
-
43
-
44
- <script language=JavaScript><!--
45
- if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>
@@ -1,65 +0,0 @@
1
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
2
-
3
- <html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Function Index</title><link rel="stylesheet" type="text/css" href="../styles/main.css"><script language=JavaScript src="../javascript/main.js"></script><script language=JavaScript src="../javascript/searchdata.js"></script></head><body class="IndexPage" onLoad="NDOnLoad()"><script language=JavaScript><!--
4
- if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>
5
-
6
- <!-- Generated by Natural Docs, version 1.51 -->
7
- <!-- http://www.naturaldocs.org -->
8
-
9
- <!-- saved from url=(0026)http://www.naturaldocs.org -->
10
-
11
-
12
-
13
-
14
- <div id=Index><div class=IPageTitle>Function Index</div><div class=INavigationBar><a href="#Symbols">$#!</a> &middot; 0-9 &middot; <a href="#A">A</a> &middot; B &middot; <a href="#C">C</a> &middot; D &middot; <a href="#E">E</a> &middot; F &middot; G &middot; H &middot; <a href="#I">I</a> &middot; J &middot; K &middot; L &middot; <a href="#M">M</a> &middot; N &middot; O &middot; P &middot; Q &middot; <a href="#R">R</a> &middot; <a href="#S">S</a> &middot; T &middot; <a href="#U">U</a> &middot; V &middot; W &middot; X &middot; Y &middot; Z</div><table border=0 cellspacing=0 cellpadding=0><tr><td class=IHeading id=IFirstHeading><a name="Symbols"></a>$#!</td><td></td></tr><tr><td class=ISymbolPrefix id=IOnlySymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/module-js.html#NinjsModule._run_tests" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')" class=ISymbol>_run_tests</a>, <span class=IParent>NinjsModule</span></td></tr><tr><td class=IHeading><a name="A"></a>A</td><td></td></tr><tr><td class=ISymbolPrefix id=IFirstSymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/module-js.html#NinjsModule.actions" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')" class=ISymbol>actions</a>, <span class=IParent>NinjsModule</span></td></tr><tr><td class=ISymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/application-js.html#NinjsApplication.add_module" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')" class=ISymbol>add_module</a>, <span class=IParent>NinjsApplication</span></td></tr><tr><td class=ISymbolPrefix id=ILastSymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/module-js.html#NinjsModule.add_test" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')" class=ISymbol>add_test</a>, <span class=IParent>NinjsModule</span></td></tr><tr><td class=IHeading><a name="C"></a>C</td><td></td></tr><tr><td class=ISymbolPrefix id=IOnlySymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/module-js.html#NinjsModule.call_on_ready" id=link5 onMouseOver="ShowTip(event, 'tt5', 'link5')" onMouseOut="HideTip('tt5')" class=ISymbol>call_on_ready</a>, <span class=IParent>NinjsModule</span></td></tr><tr><td class=IHeading><a name="E"></a>E</td><td></td></tr><tr><td class=ISymbolPrefix id=IFirstSymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/module-js.html#NinjsModule.elements" id=link6 onMouseOver="ShowTip(event, 'tt6', 'link6')" onMouseOut="HideTip('tt6')" class=ISymbol>elements</a>, <span class=IParent>NinjsModule</span></td></tr><tr><td class=ISymbolPrefix id=ILastSymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/module-js.html#NinjsModule.execute" id=link7 onMouseOver="ShowTip(event, 'tt7', 'link7')" onMouseOut="HideTip('tt7')" class=ISymbol>execute</a>, <span class=IParent>NinjsModule</span></td></tr><tr><td class=IHeading><a name="I"></a>I</td><td></td></tr><tr><td class=ISymbolPrefix id=IFirstSymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/existence-js.html#is_array" id=link8 onMouseOver="ShowTip(event, 'tt8', 'link8')" onMouseOut="HideTip('tt8')" class=ISymbol>is_array</a></td></tr><tr><td class=ISymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/existence-js.html#is_bool" id=link9 onMouseOver="ShowTip(event, 'tt9', 'link9')" onMouseOut="HideTip('tt9')" class=ISymbol>is_bool</a></td></tr><tr><td class=ISymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/existence-js.html#is_date" id=link10 onMouseOver="ShowTip(event, 'tt10', 'link10')" onMouseOut="HideTip('tt10')" class=ISymbol>is_date</a></td></tr><tr><td class=ISymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/existence-js.html#is_defined" id=link11 onMouseOver="ShowTip(event, 'tt11', 'link11')" onMouseOut="HideTip('tt11')" class=ISymbol>is_defined</a></td></tr><tr><td class=ISymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/existence-js.html#is_number" id=link12 onMouseOver="ShowTip(event, 'tt12', 'link12')" onMouseOut="HideTip('tt12')" class=ISymbol>is_number</a></td></tr><tr><td class=ISymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/existence-js.html#is_numeric" id=link13 onMouseOver="ShowTip(event, 'tt13', 'link13')" onMouseOut="HideTip('tt13')" class=ISymbol>is_numeric</a></td></tr><tr><td class=ISymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/existence-js.html#is_regex" id=link14 onMouseOver="ShowTip(event, 'tt14', 'link14')" onMouseOut="HideTip('tt14')" class=ISymbol>is_regex</a></td></tr><tr><td class=ISymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/existence-js.html#is_string" id=link15 onMouseOver="ShowTip(event, 'tt15', 'link15')" onMouseOut="HideTip('tt15')" class=ISymbol>is_string</a></td></tr><tr><td class=ISymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/existence-js.html#is_typeof" id=link16 onMouseOver="ShowTip(event, 'tt16', 'link16')" onMouseOut="HideTip('tt16')" class=ISymbol>is_typeof</a></td></tr><tr><td class=ISymbolPrefix id=ILastSymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/existence-js.html#is_undefined" id=link17 onMouseOver="ShowTip(event, 'tt17', 'link17')" onMouseOut="HideTip('tt17')" class=ISymbol>is_undefined</a></td></tr><tr><td class=IHeading><a name="M"></a>M</td><td></td></tr><tr><td class=ISymbolPrefix id=IOnlySymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/extend-js.html#method" id=link18 onMouseOver="ShowTip(event, 'tt18', 'link18')" onMouseOut="HideTip('tt18')" class=ISymbol>method</a></td></tr><tr><td class=IHeading><a name="R"></a>R</td><td></td></tr><tr><td class=ISymbolPrefix id=IOnlySymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/module-js.html#NinjsModule.run" id=link19 onMouseOver="ShowTip(event, 'tt19', 'link19')" onMouseOut="HideTip('tt19')" class=ISymbol>run</a>, <span class=IParent>NinjsModule</span></td></tr><tr><td class=IHeading><a name="S"></a>S</td><td></td></tr><tr><td class=ISymbolPrefix id=IOnlySymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/module-js.html#NinjsModule.set_data" id=link20 onMouseOver="ShowTip(event, 'tt20', 'link20')" onMouseOut="HideTip('tt20')" class=ISymbol>set_data</a>, <span class=IParent>NinjsModule</span></td></tr><tr><td class=IHeading><a name="U"></a>U</td><td></td></tr><tr><td class=ISymbolPrefix id=IOnlySymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/extend-js.html#unless" id=link21 onMouseOver="ShowTip(event, 'tt21', 'link21')" onMouseOut="HideTip('tt21')" class=ISymbol>unless</a></td></tr></table>
15
- <!--START_ND_TOOLTIPS-->
16
- <div class=CToolTip id="tt1"><div class=CFunction>Runs the test files in the test array. </div></div><!--END_ND_TOOLTIPS-->
17
-
18
-
19
- <!--START_ND_TOOLTIPS-->
20
- <div class=CToolTip id="tt2"><div class=CFunction>The actions method contains code to be executed when run is called. </div></div><div class=CToolTip id="tt3"><div class=CFunction>Adds a NinjsModule to the application.</div></div><div class=CToolTip id="tt4"><div class=CFunction>Adds a test file to the tests array (beta).</div></div><!--END_ND_TOOLTIPS-->
21
-
22
-
23
- <!--START_ND_TOOLTIPS-->
24
- <div class=CToolTip id="tt5"><div class=CFunction>Waits for the DOM to be ready and then executes a callback.</div></div><!--END_ND_TOOLTIPS-->
25
-
26
-
27
- <!--START_ND_TOOLTIPS-->
28
- <div class=CToolTip id="tt6"><div class=CFunction>Method to define module elements.</div></div><div class=CToolTip id="tt7"><div class=CFunction>Wrapper method that set&rsquo;s up the environment and then calls actions.</div></div><!--END_ND_TOOLTIPS-->
29
-
30
-
31
- <!--START_ND_TOOLTIPS-->
32
- <div class=CToolTip id="tt8"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>var is_array = function(</td><td class="PParameter prettyprint " nowrap>suspect</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Determine if the suspect is an Array. </div></div><div class=CToolTip id="tt9"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>var is_bool = function(</td><td class="PParameter prettyprint " nowrap>suspect</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Determines if the suspect is a Boolean. </div></div><div class=CToolTip id="tt10"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>var is_date = function(</td><td class="PParameter prettyprint " nowrap>suspect</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Determines if the suspect is a Date. </div></div><div class=CToolTip id="tt11"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>var is_defined = function(</td><td class="PParameter prettyprint " nowrap>suspect</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Checks if a variable is undefined. </div></div><div class=CToolTip id="tt12"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>var is_number = function(</td><td class="PParameter prettyprint " nowrap>suspect</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Determines if the suspect is a Number. </div></div><div class=CToolTip id="tt13"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>var is_numeric = function(</td><td class="PParameter prettyprint " nowrap>suspect</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Determine if the suspect string represents a numeric value. </div></div><div class=CToolTip id="tt14"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>var is_regex = function(</td><td class="PParameter prettyprint " nowrap>suspect</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Determines if the suspect is a RegExp. </div></div><div class=CToolTip id="tt15"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>var is_string = function(</td><td class="PParameter prettyprint " nowrap>suspect</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Determine the suspect is a String. </div></div><div class=CToolTip id="tt16"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>var is_typeof = function(</td><td class="PParameter prettyprint " nowrap>type,</td></tr><tr><td></td><td class="PParameter prettyprint " nowrap>suspect</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Strict type checking by comparing constructors. </div></div><div class=CToolTip id="tt17"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>var is_undefined = function(</td><td class="PParameter prettyprint " nowrap>suspect</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Checks if a variable is defined. </div></div><!--END_ND_TOOLTIPS-->
33
-
34
-
35
- <!--START_ND_TOOLTIPS-->
36
- <div class=CToolTip id="tt18"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>Function.prototype.method = function(</td><td class="PParameter prettyprint " nowrap>name,</td></tr><tr><td></td><td class="PParameter prettyprint " nowrap>func</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Method to add a method to an object (ie. </div></div><!--END_ND_TOOLTIPS-->
37
-
38
-
39
- <!--START_ND_TOOLTIPS-->
40
- <div class=CToolTip id="tt19"><div class=CFunction>Waits for the DOM to load then calls execute.</div></div><!--END_ND_TOOLTIPS-->
41
-
42
-
43
- <!--START_ND_TOOLTIPS-->
44
- <div class=CToolTip id="tt20"><div class=CFunction>Adds properties to the module&rsquo;s data object.</div></div><!--END_ND_TOOLTIPS-->
45
-
46
-
47
- <!--START_ND_TOOLTIPS-->
48
- <div class=CToolTip id="tt21"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>var unless = function(</td><td class="PParameter prettyprint " nowrap>expression,</td></tr><tr><td></td><td class="PParameter prettyprint " nowrap>callback,</td></tr><tr><td></td><td class="PParameter prettyprint " nowrap>fallback</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Function to better express negative conditions (ie. </div></div><!--END_ND_TOOLTIPS-->
49
-
50
- </div><!--Index-->
51
-
52
-
53
- <div id=Footer><a href="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->
54
-
55
-
56
- <div id=Menu><div class=MEntry><div class=MFile><a href="../files/core/application-js.html">application.js</a></div></div><div class=MEntry><div class=MFile><a href="../files/core/existence-js.html">existence.js</a></div></div><div class=MEntry><div class=MFile><a href="../files/core/extend-js.html">extend.js</a></div></div><div class=MEntry><div class=MFile><a href="../files/core/module-js.html">module.js</a></div></div><div class=MEntry><div class=MFile><a href="../files/core/nin-js.html">nin.js</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent1')">Index</a><div class=MGroupContent id=MGroupContent1><div class=MEntry><div class=MIndex><a href="General.html">Everything</a></div></div><div class=MEntry><div class=MIndex><a href="Classes.html">Classes</a></div></div><div class=MEntry><div class=MIndex><a href="Files.html">Files</a></div></div><div class=MEntry><div class=MIndex id=MSelected>Functions</div></div><div class=MEntry><div class=MIndex><a href="Variables.html">Variables</a></div></div></div></div></div><script type="text/javascript"><!--
57
- var searchPanel = new SearchPanel("searchPanel", "HTML", "../search");
58
- --></script><div id=MSearchPanel class=MSearchPanelInactive><input type=text id=MSearchField value=Search onFocus="searchPanel.OnSearchFieldFocus(true)" onBlur="searchPanel.OnSearchFieldFocus(false)" onKeyUp="searchPanel.OnSearchFieldChange()"><select id=MSearchType onFocus="searchPanel.OnSearchTypeFocus(true)" onBlur="searchPanel.OnSearchTypeFocus(false)" onChange="searchPanel.OnSearchTypeChange()"><option id=MSearchEverything selected value="General">Everything</option><option value="Classes">Classes</option><option value="Files">Files</option><option value="Functions">Functions</option><option value="Variables">Variables</option></select></div></div><!--Menu-->
59
-
60
-
61
- <div id=MSearchResultsWindow><iframe src="" frameborder=0 name=MSearchResults id=MSearchResults></iframe><a href="javascript:searchPanel.CloseResultsWindow()" id=MSearchResultsWindowClose>Close</a></div>
62
-
63
-
64
- <script language=JavaScript><!--
65
- if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>
@@ -1,85 +0,0 @@
1
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
2
-
3
- <html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Index</title><link rel="stylesheet" type="text/css" href="../styles/main.css"><script language=JavaScript src="../javascript/main.js"></script><script language=JavaScript src="../javascript/searchdata.js"></script></head><body class="IndexPage" onLoad="NDOnLoad()"><script language=JavaScript><!--
4
- if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>
5
-
6
- <!-- Generated by Natural Docs, version 1.51 -->
7
- <!-- http://www.naturaldocs.org -->
8
-
9
- <!-- saved from url=(0026)http://www.naturaldocs.org -->
10
-
11
-
12
-
13
-
14
- <div id=Index><div class=IPageTitle>Index</div><div class=INavigationBar><a href="#Symbols">$#!</a> &middot; 0-9 &middot; <a href="#A">A</a> &middot; B &middot; <a href="#C">C</a> &middot; <a href="#D">D</a> &middot; <a href="#E">E</a> &middot; <a href="#F">F</a> &middot; G &middot; H &middot; <a href="#I">I</a> &middot; J &middot; K &middot; L &middot; <a href="#M">M</a> &middot; <a href="#N">N</a> &middot; O &middot; P &middot; Q &middot; <a href="#R">R</a> &middot; <a href="#S">S</a> &middot; <a href="#T">T</a> &middot; <a href="#U">U</a> &middot; <a href="#V">V</a> &middot; W &middot; X &middot; Y &middot; Z</div><table border=0 cellspacing=0 cellpadding=0><tr><td class=IHeading id=IFirstHeading><a name="Symbols"></a>$#!</td><td></td></tr><tr><td class=ISymbolPrefix id=IOnlySymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/module-js.html#NinjsModule._run_tests" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')" class=ISymbol>_run_tests</a>, <span class=IParent>NinjsModule</span></td></tr><tr><td class=IHeading><a name="A"></a>A</td><td></td></tr><tr><td class=ISymbolPrefix id=IFirstSymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/module-js.html#NinjsModule.actions" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')" class=ISymbol>actions</a>, <span class=IParent>NinjsModule</span></td></tr><tr><td class=ISymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/application-js.html#NinjsApplication.add_module" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')" class=ISymbol>add_module</a>, <span class=IParent>NinjsApplication</span></td></tr><tr><td class=ISymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/module-js.html#NinjsModule.add_test" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')" class=ISymbol>add_test</a>, <span class=IParent>NinjsModule</span></td></tr><tr><td class=ISymbolPrefix id=ILastSymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/application-js.html#application.js" class=ISymbol>application.js</a></td></tr><tr><td class=IHeading><a name="C"></a>C</td><td></td></tr><tr><td class=ISymbolPrefix id=IOnlySymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/module-js.html#NinjsModule.call_on_ready" id=link5 onMouseOver="ShowTip(event, 'tt5', 'link5')" onMouseOut="HideTip('tt5')" class=ISymbol>call_on_ready</a>, <span class=IParent>NinjsModule</span></td></tr><tr><td class=IHeading><a name="D"></a>D</td><td></td></tr><tr><td class=ISymbolPrefix id=IOnlySymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/module-js.html#NinjsModule.data" id=link6 onMouseOver="ShowTip(event, 'tt6', 'link6')" onMouseOut="HideTip('tt6')" class=ISymbol>data</a>, <span class=IParent>NinjsModule</span></td></tr><tr><td class=IHeading><a name="E"></a>E</td><td></td></tr><tr><td class=ISymbolPrefix id=IFirstSymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/module-js.html#NinjsModule.elements" id=link7 onMouseOver="ShowTip(event, 'tt7', 'link7')" onMouseOut="HideTip('tt7')" class=ISymbol>elements</a>, <span class=IParent>NinjsModule</span></td></tr><tr><td class=ISymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/module-js.html#NinjsModule.execute" id=link8 onMouseOver="ShowTip(event, 'tt8', 'link8')" onMouseOut="HideTip('tt8')" class=ISymbol>execute</a>, <span class=IParent>NinjsModule</span></td></tr><tr><td class=ISymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/existence-js.html#existence.js" class=ISymbol>existence.js</a></td></tr><tr><td class=ISymbolPrefix id=ILastSymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/extend-js.html#extend.js" class=ISymbol>extend.js</a></td></tr><tr><td class=IHeading><a name="F"></a>F</td><td></td></tr><tr><td class=ISymbolPrefix id=IOnlySymbolPrefix>&nbsp;</td><td class=IEntry><span class=ISymbol>Functions</span><div class=ISubIndex><span class=IParent>Global</span><div class=ISubIndex><a href="../files/core/existence-js.html#Functions" class=IFile>core/<wbr>existence.js</a><a href="../files/core/extend-js.html#Functions" class=IFile>core/<wbr>extend.js</a></div><a href="../files/core/application-js.html#NinjsApplication.Functions" class=IParent>NinjsApplication</a><a href="../files/core/module-js.html#NinjsModule.Functions" class=IParent>NinjsModule</a></div></td></tr><tr><td class=IHeading><a name="I"></a>I</td><td></td></tr><tr><td class=ISymbolPrefix id=IFirstSymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/existence-js.html#is_array" id=link9 onMouseOver="ShowTip(event, 'tt9', 'link9')" onMouseOut="HideTip('tt9')" class=ISymbol>is_array</a></td></tr><tr><td class=ISymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/existence-js.html#is_bool" id=link10 onMouseOver="ShowTip(event, 'tt10', 'link10')" onMouseOut="HideTip('tt10')" class=ISymbol>is_bool</a></td></tr><tr><td class=ISymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/existence-js.html#is_date" id=link11 onMouseOver="ShowTip(event, 'tt11', 'link11')" onMouseOut="HideTip('tt11')" class=ISymbol>is_date</a></td></tr><tr><td class=ISymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/existence-js.html#is_defined" id=link12 onMouseOver="ShowTip(event, 'tt12', 'link12')" onMouseOut="HideTip('tt12')" class=ISymbol>is_defined</a></td></tr><tr><td class=ISymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/existence-js.html#is_number" id=link13 onMouseOver="ShowTip(event, 'tt13', 'link13')" onMouseOut="HideTip('tt13')" class=ISymbol>is_number</a></td></tr><tr><td class=ISymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/existence-js.html#is_numeric" id=link14 onMouseOver="ShowTip(event, 'tt14', 'link14')" onMouseOut="HideTip('tt14')" class=ISymbol>is_numeric</a></td></tr><tr><td class=ISymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/existence-js.html#is_regex" id=link15 onMouseOver="ShowTip(event, 'tt15', 'link15')" onMouseOut="HideTip('tt15')" class=ISymbol>is_regex</a></td></tr><tr><td class=ISymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/existence-js.html#is_string" id=link16 onMouseOver="ShowTip(event, 'tt16', 'link16')" onMouseOut="HideTip('tt16')" class=ISymbol>is_string</a></td></tr><tr><td class=ISymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/existence-js.html#is_typeof" id=link17 onMouseOver="ShowTip(event, 'tt17', 'link17')" onMouseOut="HideTip('tt17')" class=ISymbol>is_typeof</a></td></tr><tr><td class=ISymbolPrefix id=ILastSymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/existence-js.html#is_undefined" id=link18 onMouseOver="ShowTip(event, 'tt18', 'link18')" onMouseOut="HideTip('tt18')" class=ISymbol>is_undefined</a></td></tr><tr><td class=IHeading><a name="M"></a>M</td><td></td></tr><tr><td class=ISymbolPrefix id=IFirstSymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/extend-js.html#method" id=link19 onMouseOver="ShowTip(event, 'tt19', 'link19')" onMouseOut="HideTip('tt19')" class=ISymbol>method</a></td></tr><tr><td class=ISymbolPrefix id=ILastSymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/module-js.html#module.js" class=ISymbol>module.js</a></td></tr><tr><td class=IHeading><a name="N"></a>N</td><td></td></tr><tr><td class=ISymbolPrefix id=IFirstSymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/module-js.html#NinjsModule.name" id=link20 onMouseOver="ShowTip(event, 'tt20', 'link20')" onMouseOut="HideTip('tt20')" class=ISymbol>name</a>, <span class=IParent>NinjsModule</span></td></tr><tr><td class=ISymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/nin-js.html#nin.js" class=ISymbol>nin.js</a></td></tr><tr><td class=ISymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/application-js.html#NinjsApplication" id=link21 onMouseOver="ShowTip(event, 'tt21', 'link21')" onMouseOut="HideTip('tt21')" class=ISymbol>NinjsApplication</a></td></tr><tr><td class=ISymbolPrefix id=ILastSymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/module-js.html#NinjsModule" id=link22 onMouseOver="ShowTip(event, 'tt22', 'link22')" onMouseOut="HideTip('tt22')" class=ISymbol>NinjsModule</a></td></tr><tr><td class=IHeading><a name="R"></a>R</td><td></td></tr><tr><td class=ISymbolPrefix id=IFirstSymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/module-js.html#NinjsModule.run" id=link23 onMouseOver="ShowTip(event, 'tt23', 'link23')" onMouseOut="HideTip('tt23')" class=ISymbol>run</a>, <span class=IParent>NinjsModule</span></td></tr><tr><td class=ISymbolPrefix id=ILastSymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/module-js.html#NinjsModule.run_tests(beta)" id=link24 onMouseOver="ShowTip(event, 'tt24', 'link24')" onMouseOut="HideTip('tt24')" class=ISymbol>run_tests(beta)</a>, <span class=IParent>NinjsModule</span></td></tr><tr><td class=IHeading><a name="S"></a>S</td><td></td></tr><tr><td class=ISymbolPrefix id=IOnlySymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/module-js.html#NinjsModule.set_data" id=link25 onMouseOver="ShowTip(event, 'tt25', 'link25')" onMouseOut="HideTip('tt25')" class=ISymbol>set_data</a>, <span class=IParent>NinjsModule</span></td></tr><tr><td class=IHeading><a name="T"></a>T</td><td></td></tr><tr><td class=ISymbolPrefix id=IOnlySymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/module-js.html#NinjsModule.tests(beta)" id=link26 onMouseOver="ShowTip(event, 'tt26', 'link26')" onMouseOut="HideTip('tt26')" class=ISymbol>tests(beta)</a>, <span class=IParent>NinjsModule</span></td></tr><tr><td class=IHeading><a name="U"></a>U</td><td></td></tr><tr><td class=ISymbolPrefix id=IOnlySymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/extend-js.html#unless" id=link27 onMouseOver="ShowTip(event, 'tt27', 'link27')" onMouseOut="HideTip('tt27')" class=ISymbol>unless</a></td></tr><tr><td class=IHeading><a name="V"></a>V</td><td></td></tr><tr><td class=ISymbolPrefix id=IOnlySymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/module-js.html#NinjsModule.Variables" class=ISymbol>Variables</a>, <span class=IParent>NinjsModule</span></td></tr></table>
15
- <!--START_ND_TOOLTIPS-->
16
- <div class=CToolTip id="tt1"><div class=CFunction>Runs the test files in the test array. </div></div><!--END_ND_TOOLTIPS-->
17
-
18
-
19
- <!--START_ND_TOOLTIPS-->
20
- <div class=CToolTip id="tt2"><div class=CFunction>The actions method contains code to be executed when run is called. </div></div><div class=CToolTip id="tt3"><div class=CFunction>Adds a NinjsModule to the application.</div></div><div class=CToolTip id="tt4"><div class=CFunction>Adds a test file to the tests array (beta).</div></div><!--END_ND_TOOLTIPS-->
21
-
22
-
23
- <!--START_ND_TOOLTIPS-->
24
- <div class=CToolTip id="tt5"><div class=CFunction>Waits for the DOM to be ready and then executes a callback.</div></div><!--END_ND_TOOLTIPS-->
25
-
26
-
27
- <!--START_ND_TOOLTIPS-->
28
- <div class=CToolTip id="tt6"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">this.data</td></tr></table></blockquote>The module&rsquo;s data object</div></div><!--END_ND_TOOLTIPS-->
29
-
30
-
31
- <!--START_ND_TOOLTIPS-->
32
- <div class=CToolTip id="tt7"><div class=CFunction>Method to define module elements.</div></div><div class=CToolTip id="tt8"><div class=CFunction>Wrapper method that set&rsquo;s up the environment and then calls actions.</div></div><!--END_ND_TOOLTIPS-->
33
-
34
-
35
- <!--START_ND_TOOLTIPS-->
36
- <!--END_ND_TOOLTIPS-->
37
-
38
-
39
- <!--START_ND_TOOLTIPS-->
40
- <div class=CToolTip id="tt9"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>var is_array = function(</td><td class="PParameter prettyprint " nowrap>suspect</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Determine if the suspect is an Array. </div></div><div class=CToolTip id="tt10"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>var is_bool = function(</td><td class="PParameter prettyprint " nowrap>suspect</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Determines if the suspect is a Boolean. </div></div><div class=CToolTip id="tt11"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>var is_date = function(</td><td class="PParameter prettyprint " nowrap>suspect</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Determines if the suspect is a Date. </div></div><div class=CToolTip id="tt12"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>var is_defined = function(</td><td class="PParameter prettyprint " nowrap>suspect</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Checks if a variable is undefined. </div></div><div class=CToolTip id="tt13"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>var is_number = function(</td><td class="PParameter prettyprint " nowrap>suspect</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Determines if the suspect is a Number. </div></div><div class=CToolTip id="tt14"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>var is_numeric = function(</td><td class="PParameter prettyprint " nowrap>suspect</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Determine if the suspect string represents a numeric value. </div></div><div class=CToolTip id="tt15"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>var is_regex = function(</td><td class="PParameter prettyprint " nowrap>suspect</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Determines if the suspect is a RegExp. </div></div><div class=CToolTip id="tt16"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>var is_string = function(</td><td class="PParameter prettyprint " nowrap>suspect</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Determine the suspect is a String. </div></div><div class=CToolTip id="tt17"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>var is_typeof = function(</td><td class="PParameter prettyprint " nowrap>type,</td></tr><tr><td></td><td class="PParameter prettyprint " nowrap>suspect</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Strict type checking by comparing constructors. </div></div><div class=CToolTip id="tt18"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>var is_undefined = function(</td><td class="PParameter prettyprint " nowrap>suspect</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Checks if a variable is defined. </div></div><!--END_ND_TOOLTIPS-->
41
-
42
-
43
- <!--START_ND_TOOLTIPS-->
44
- <div class=CToolTip id="tt19"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>Function.prototype.method = function(</td><td class="PParameter prettyprint " nowrap>name,</td></tr><tr><td></td><td class="PParameter prettyprint " nowrap>func</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Method to add a method to an object (ie. </div></div><!--END_ND_TOOLTIPS-->
45
-
46
-
47
- <!--START_ND_TOOLTIPS-->
48
- <div class=CToolTip id="tt20"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">this.name</td></tr></table></blockquote>The module&rsquo;s name (string)</div></div><div class=CToolTip id="tt21"><div class=CClass>An NinjsApplication object serves as your application&rsquo;s namespace and includes a utility to add modules to the application object.</div></div><div class=CToolTip id="tt22"><div class=CClass>A NinjsModule is an object which encapsulates a certain behavior or functionality.</div></div><!--END_ND_TOOLTIPS-->
49
-
50
-
51
- <!--START_ND_TOOLTIPS-->
52
- <div class=CToolTip id="tt23"><div class=CFunction>Waits for the DOM to load then calls execute.</div></div><div class=CToolTip id="tt24"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">this.run_tests</td></tr></table></blockquote>Boolean to turn tests on/off</div></div><!--END_ND_TOOLTIPS-->
53
-
54
-
55
- <!--START_ND_TOOLTIPS-->
56
- <div class=CToolTip id="tt25"><div class=CFunction>Adds properties to the module&rsquo;s data object.</div></div><!--END_ND_TOOLTIPS-->
57
-
58
-
59
- <!--START_ND_TOOLTIPS-->
60
- <div class=CToolTip id="tt26"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">this.tests</td></tr></table></blockquote>Array of test files to run</div></div><!--END_ND_TOOLTIPS-->
61
-
62
-
63
- <!--START_ND_TOOLTIPS-->
64
- <div class=CToolTip id="tt27"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>var unless = function(</td><td class="PParameter prettyprint " nowrap>expression,</td></tr><tr><td></td><td class="PParameter prettyprint " nowrap>callback,</td></tr><tr><td></td><td class="PParameter prettyprint " nowrap>fallback</td><td class="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Function to better express negative conditions (ie. </div></div><!--END_ND_TOOLTIPS-->
65
-
66
-
67
- <!--START_ND_TOOLTIPS-->
68
- <!--END_ND_TOOLTIPS-->
69
-
70
- </div><!--Index-->
71
-
72
-
73
- <div id=Footer><a href="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->
74
-
75
-
76
- <div id=Menu><div class=MEntry><div class=MFile><a href="../files/core/application-js.html">application.js</a></div></div><div class=MEntry><div class=MFile><a href="../files/core/existence-js.html">existence.js</a></div></div><div class=MEntry><div class=MFile><a href="../files/core/extend-js.html">extend.js</a></div></div><div class=MEntry><div class=MFile><a href="../files/core/module-js.html">module.js</a></div></div><div class=MEntry><div class=MFile><a href="../files/core/nin-js.html">nin.js</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent1')">Index</a><div class=MGroupContent id=MGroupContent1><div class=MEntry><div class=MIndex id=MSelected>Everything</div></div><div class=MEntry><div class=MIndex><a href="Classes.html">Classes</a></div></div><div class=MEntry><div class=MIndex><a href="Files.html">Files</a></div></div><div class=MEntry><div class=MIndex><a href="Functions.html">Functions</a></div></div><div class=MEntry><div class=MIndex><a href="Variables.html">Variables</a></div></div></div></div></div><script type="text/javascript"><!--
77
- var searchPanel = new SearchPanel("searchPanel", "HTML", "../search");
78
- --></script><div id=MSearchPanel class=MSearchPanelInactive><input type=text id=MSearchField value=Search onFocus="searchPanel.OnSearchFieldFocus(true)" onBlur="searchPanel.OnSearchFieldFocus(false)" onKeyUp="searchPanel.OnSearchFieldChange()"><select id=MSearchType onFocus="searchPanel.OnSearchTypeFocus(true)" onBlur="searchPanel.OnSearchTypeFocus(false)" onChange="searchPanel.OnSearchTypeChange()"><option id=MSearchEverything selected value="General">Everything</option><option value="Classes">Classes</option><option value="Files">Files</option><option value="Functions">Functions</option><option value="Variables">Variables</option></select></div></div><!--Menu-->
79
-
80
-
81
- <div id=MSearchResultsWindow><iframe src="" frameborder=0 name=MSearchResults id=MSearchResults></iframe><a href="javascript:searchPanel.CloseResultsWindow()" id=MSearchResultsWindowClose>Close</a></div>
82
-
83
-
84
- <script language=JavaScript><!--
85
- if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>
@@ -1,45 +0,0 @@
1
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
2
-
3
- <html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Variable Index</title><link rel="stylesheet" type="text/css" href="../styles/main.css"><script language=JavaScript src="../javascript/main.js"></script><script language=JavaScript src="../javascript/searchdata.js"></script></head><body class="IndexPage" onLoad="NDOnLoad()"><script language=JavaScript><!--
4
- if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>
5
-
6
- <!-- Generated by Natural Docs, version 1.51 -->
7
- <!-- http://www.naturaldocs.org -->
8
-
9
- <!-- saved from url=(0026)http://www.naturaldocs.org -->
10
-
11
-
12
-
13
-
14
- <div id=Index><div class=IPageTitle>Variable Index</div><div class=INavigationBar>$#! &middot; 0-9 &middot; A &middot; B &middot; C &middot; <a href="#D">D</a> &middot; E &middot; F &middot; G &middot; H &middot; I &middot; J &middot; K &middot; L &middot; M &middot; <a href="#N">N</a> &middot; O &middot; P &middot; Q &middot; <a href="#R">R</a> &middot; S &middot; <a href="#T">T</a> &middot; U &middot; V &middot; W &middot; X &middot; Y &middot; Z</div><table border=0 cellspacing=0 cellpadding=0><tr><td class=IHeading id=IFirstHeading><a name="D"></a>D</td><td></td></tr><tr><td class=ISymbolPrefix id=IOnlySymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/module-js.html#NinjsModule.data" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')" class=ISymbol>data</a>, <span class=IParent>NinjsModule</span></td></tr><tr><td class=IHeading><a name="N"></a>N</td><td></td></tr><tr><td class=ISymbolPrefix id=IOnlySymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/module-js.html#NinjsModule.name" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')" class=ISymbol>name</a>, <span class=IParent>NinjsModule</span></td></tr><tr><td class=IHeading><a name="R"></a>R</td><td></td></tr><tr><td class=ISymbolPrefix id=IOnlySymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/module-js.html#NinjsModule.run_tests(beta)" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')" class=ISymbol>run_tests(beta)</a>, <span class=IParent>NinjsModule</span></td></tr><tr><td class=IHeading><a name="T"></a>T</td><td></td></tr><tr><td class=ISymbolPrefix id=IOnlySymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/core/module-js.html#NinjsModule.tests(beta)" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')" class=ISymbol>tests(beta)</a>, <span class=IParent>NinjsModule</span></td></tr></table>
15
- <!--START_ND_TOOLTIPS-->
16
- <div class=CToolTip id="tt1"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">this.data</td></tr></table></blockquote>The module&rsquo;s data object</div></div><!--END_ND_TOOLTIPS-->
17
-
18
-
19
- <!--START_ND_TOOLTIPS-->
20
- <div class=CToolTip id="tt2"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">this.name</td></tr></table></blockquote>The module&rsquo;s name (string)</div></div><!--END_ND_TOOLTIPS-->
21
-
22
-
23
- <!--START_ND_TOOLTIPS-->
24
- <div class=CToolTip id="tt3"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">this.run_tests</td></tr></table></blockquote>Boolean to turn tests on/off</div></div><!--END_ND_TOOLTIPS-->
25
-
26
-
27
- <!--START_ND_TOOLTIPS-->
28
- <div class=CToolTip id="tt4"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">this.tests</td></tr></table></blockquote>Array of test files to run</div></div><!--END_ND_TOOLTIPS-->
29
-
30
- </div><!--Index-->
31
-
32
-
33
- <div id=Footer><a href="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->
34
-
35
-
36
- <div id=Menu><div class=MEntry><div class=MFile><a href="../files/core/application-js.html">application.js</a></div></div><div class=MEntry><div class=MFile><a href="../files/core/existence-js.html">existence.js</a></div></div><div class=MEntry><div class=MFile><a href="../files/core/extend-js.html">extend.js</a></div></div><div class=MEntry><div class=MFile><a href="../files/core/module-js.html">module.js</a></div></div><div class=MEntry><div class=MFile><a href="../files/core/nin-js.html">nin.js</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent1')">Index</a><div class=MGroupContent id=MGroupContent1><div class=MEntry><div class=MIndex><a href="General.html">Everything</a></div></div><div class=MEntry><div class=MIndex><a href="Classes.html">Classes</a></div></div><div class=MEntry><div class=MIndex><a href="Files.html">Files</a></div></div><div class=MEntry><div class=MIndex><a href="Functions.html">Functions</a></div></div><div class=MEntry><div class=MIndex id=MSelected>Variables</div></div></div></div></div><script type="text/javascript"><!--
37
- var searchPanel = new SearchPanel("searchPanel", "HTML", "../search");
38
- --></script><div id=MSearchPanel class=MSearchPanelInactive><input type=text id=MSearchField value=Search onFocus="searchPanel.OnSearchFieldFocus(true)" onBlur="searchPanel.OnSearchFieldFocus(false)" onKeyUp="searchPanel.OnSearchFieldChange()"><select id=MSearchType onFocus="searchPanel.OnSearchTypeFocus(true)" onBlur="searchPanel.OnSearchTypeFocus(false)" onChange="searchPanel.OnSearchTypeChange()"><option id=MSearchEverything selected value="General">Everything</option><option value="Classes">Classes</option><option value="Files">Files</option><option value="Functions">Functions</option><option value="Variables">Variables</option></select></div></div><!--Menu-->
39
-
40
-
41
- <div id=MSearchResultsWindow><iframe src="" frameborder=0 name=MSearchResults id=MSearchResults></iframe><a href="javascript:searchPanel.CloseResultsWindow()" id=MSearchResultsWindowClose>Close</a></div>
42
-
43
-
44
- <script language=JavaScript><!--
45
- if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>
@@ -1,841 +0,0 @@
1
- // This file is part of Natural Docs, which is Copyright � 2003-2010 Greg Valure
2
- // Natural Docs is licensed under version 3 of the GNU Affero General Public License (AGPL)
3
- // Refer to License.txt for the complete details
4
-
5
- // This file may be distributed with documentation files generated by Natural Docs.
6
- // Such documentation is not covered by Natural Docs' copyright and licensing,
7
- // and may have its own copyright and distribution terms as decided by its author.
8
-
9
-
10
- //
11
- // Browser Styles
12
- // ____________________________________________________________________________
13
-
14
- var agt=navigator.userAgent.toLowerCase();
15
- var browserType;
16
- var browserVer;
17
-
18
- if (agt.indexOf("opera") != -1)
19
- {
20
- browserType = "Opera";
21
-
22
- if (agt.indexOf("opera 7") != -1 || agt.indexOf("opera/7") != -1)
23
- { browserVer = "Opera7"; }
24
- else if (agt.indexOf("opera 8") != -1 || agt.indexOf("opera/8") != -1)
25
- { browserVer = "Opera8"; }
26
- else if (agt.indexOf("opera 9") != -1 || agt.indexOf("opera/9") != -1)
27
- { browserVer = "Opera9"; }
28
- }
29
-
30
- else if (agt.indexOf("applewebkit") != -1)
31
- {
32
- browserType = "Safari";
33
-
34
- if (agt.indexOf("version/3") != -1)
35
- { browserVer = "Safari3"; }
36
- else if (agt.indexOf("safari/4") != -1)
37
- { browserVer = "Safari2"; }
38
- }
39
-
40
- else if (agt.indexOf("khtml") != -1)
41
- {
42
- browserType = "Konqueror";
43
- }
44
-
45
- else if (agt.indexOf("msie") != -1)
46
- {
47
- browserType = "IE";
48
-
49
- if (agt.indexOf("msie 6") != -1)
50
- { browserVer = "IE6"; }
51
- else if (agt.indexOf("msie 7") != -1)
52
- { browserVer = "IE7"; }
53
- }
54
-
55
- else if (agt.indexOf("gecko") != -1)
56
- {
57
- browserType = "Firefox";
58
-
59
- if (agt.indexOf("rv:1.7") != -1)
60
- { browserVer = "Firefox1"; }
61
- else if (agt.indexOf("rv:1.8)") != -1 || agt.indexOf("rv:1.8.0") != -1)
62
- { browserVer = "Firefox15"; }
63
- else if (agt.indexOf("rv:1.8.1") != -1)
64
- { browserVer = "Firefox2"; }
65
- }
66
-
67
-
68
- //
69
- // Support Functions
70
- // ____________________________________________________________________________
71
-
72
-
73
- function GetXPosition(item)
74
- {
75
- var position = 0;
76
-
77
- if (item.offsetWidth != null)
78
- {
79
- while (item != document.body && item != null)
80
- {
81
- position += item.offsetLeft;
82
- item = item.offsetParent;
83
- };
84
- };
85
-
86
- return position;
87
- };
88
-
89
-
90
- function GetYPosition(item)
91
- {
92
- var position = 0;
93
-
94
- if (item.offsetWidth != null)
95
- {
96
- while (item != document.body && item != null)
97
- {
98
- position += item.offsetTop;
99
- item = item.offsetParent;
100
- };
101
- };
102
-
103
- return position;
104
- };
105
-
106
-
107
- function MoveToPosition(item, x, y)
108
- {
109
- // Opera 5 chokes on the px extension, so it can use the Microsoft one instead.
110
-
111
- if (item.style.left != null)
112
- {
113
- item.style.left = x + "px";
114
- item.style.top = y + "px";
115
- }
116
- else if (item.style.pixelLeft != null)
117
- {
118
- item.style.pixelLeft = x;
119
- item.style.pixelTop = y;
120
- };
121
- };
122
-
123
-
124
- //
125
- // Menu
126
- // ____________________________________________________________________________
127
-
128
-
129
- function ToggleMenu(id)
130
- {
131
- if (!window.document.getElementById)
132
- { return; };
133
-
134
- var display = window.document.getElementById(id).style.display;
135
-
136
- if (display == "none")
137
- { display = "block"; }
138
- else
139
- { display = "none"; }
140
-
141
- window.document.getElementById(id).style.display = display;
142
- }
143
-
144
- function HideAllBut(ids, max)
145
- {
146
- if (document.getElementById)
147
- {
148
- ids.sort( function(a,b) { return a - b; } );
149
- var number = 1;
150
-
151
- while (number < max)
152
- {
153
- if (ids.length > 0 && number == ids[0])
154
- { ids.shift(); }
155
- else
156
- {
157
- document.getElementById("MGroupContent" + number).style.display = "none";
158
- };
159
-
160
- number++;
161
- };
162
- };
163
- }
164
-
165
-
166
- //
167
- // Tooltips
168
- // ____________________________________________________________________________
169
-
170
-
171
- var tooltipTimer = 0;
172
-
173
- function ShowTip(event, tooltipID, linkID)
174
- {
175
- if (tooltipTimer)
176
- { clearTimeout(tooltipTimer); };
177
-
178
- var docX = event.clientX + window.pageXOffset;
179
- var docY = event.clientY + window.pageYOffset;
180
-
181
- var showCommand = "ReallyShowTip('" + tooltipID + "', '" + linkID + "', " + docX + ", " + docY + ")";
182
-
183
- tooltipTimer = setTimeout(showCommand, 1000);
184
- }
185
-
186
- function ReallyShowTip(tooltipID, linkID, docX, docY)
187
- {
188
- tooltipTimer = 0;
189
-
190
- var tooltip;
191
- var link;
192
-
193
- if (document.getElementById)
194
- {
195
- tooltip = document.getElementById(tooltipID);
196
- link = document.getElementById(linkID);
197
- }
198
- /* else if (document.all)
199
- {
200
- tooltip = eval("document.all['" + tooltipID + "']");
201
- link = eval("document.all['" + linkID + "']");
202
- }
203
- */
204
- if (tooltip)
205
- {
206
- var left = GetXPosition(link);
207
- var top = GetYPosition(link);
208
- top += link.offsetHeight;
209
-
210
-
211
- // The fallback method is to use the mouse X and Y relative to the document. We use a separate if and test if its a number
212
- // in case some browser snuck through the above if statement but didn't support everything.
213
-
214
- if (!isFinite(top) || top == 0)
215
- {
216
- left = docX;
217
- top = docY;
218
- }
219
-
220
- // Some spacing to get it out from under the cursor.
221
-
222
- top += 10;
223
-
224
- // Make sure the tooltip doesnt get smushed by being too close to the edge, or in some browsers, go off the edge of the
225
- // page. We do it here because Konqueror does get offsetWidth right even if it doesnt get the positioning right.
226
-
227
- if (tooltip.offsetWidth != null)
228
- {
229
- var width = tooltip.offsetWidth;
230
- var docWidth = document.body.clientWidth;
231
-
232
- if (left + width > docWidth)
233
- { left = docWidth - width - 1; }
234
-
235
- // If there's a horizontal scroll bar we could go past zero because it's using the page width, not the window width.
236
- if (left < 0)
237
- { left = 0; };
238
- }
239
-
240
- MoveToPosition(tooltip, left, top);
241
- tooltip.style.visibility = "visible";
242
- }
243
- }
244
-
245
- function HideTip(tooltipID)
246
- {
247
- if (tooltipTimer)
248
- {
249
- clearTimeout(tooltipTimer);
250
- tooltipTimer = 0;
251
- }
252
-
253
- var tooltip;
254
-
255
- if (document.getElementById)
256
- { tooltip = document.getElementById(tooltipID); }
257
- else if (document.all)
258
- { tooltip = eval("document.all['" + tooltipID + "']"); }
259
-
260
- if (tooltip)
261
- { tooltip.style.visibility = "hidden"; }
262
- }
263
-
264
-
265
- //
266
- // Blockquote fix for IE
267
- // ____________________________________________________________________________
268
-
269
-
270
- function NDOnLoad()
271
- {
272
- if (browserVer == "IE6")
273
- {
274
- var scrollboxes = document.getElementsByTagName('blockquote');
275
-
276
- if (scrollboxes.item(0))
277
- {
278
- NDDoResize();
279
- window.onresize=NDOnResize;
280
- };
281
- };
282
- };
283
-
284
-
285
- var resizeTimer = 0;
286
-
287
- function NDOnResize()
288
- {
289
- if (resizeTimer != 0)
290
- { clearTimeout(resizeTimer); };
291
-
292
- resizeTimer = setTimeout(NDDoResize, 250);
293
- };
294
-
295
-
296
- function NDDoResize()
297
- {
298
- var scrollboxes = document.getElementsByTagName('blockquote');
299
-
300
- var i;
301
- var item;
302
-
303
- i = 0;
304
- while (item = scrollboxes.item(i))
305
- {
306
- item.style.width = 100;
307
- i++;
308
- };
309
-
310
- i = 0;
311
- while (item = scrollboxes.item(i))
312
- {
313
- item.style.width = item.parentNode.offsetWidth;
314
- i++;
315
- };
316
-
317
- clearTimeout(resizeTimer);
318
- resizeTimer = 0;
319
- }
320
-
321
-
322
-
323
- /* ________________________________________________________________________________________________________
324
-
325
- Class: SearchPanel
326
- ________________________________________________________________________________________________________
327
-
328
- A class handling everything associated with the search panel.
329
-
330
- Parameters:
331
-
332
- name - The name of the global variable that will be storing this instance. Is needed to be able to set timeouts.
333
- mode - The mode the search is going to work in. Pass <NaturalDocs::Builder::Base->CommandLineOption()>, so the
334
- value will be something like "HTML" or "FramedHTML".
335
-
336
- ________________________________________________________________________________________________________
337
- */
338
-
339
-
340
- function SearchPanel(name, mode, resultsPath)
341
- {
342
- if (!name || !mode || !resultsPath)
343
- { alert("Incorrect parameters to SearchPanel."); };
344
-
345
-
346
- // Group: Variables
347
- // ________________________________________________________________________
348
-
349
- /*
350
- var: name
351
- The name of the global variable that will be storing this instance of the class.
352
- */
353
- this.name = name;
354
-
355
- /*
356
- var: mode
357
- The mode the search is going to work in, such as "HTML" or "FramedHTML".
358
- */
359
- this.mode = mode;
360
-
361
- /*
362
- var: resultsPath
363
- The relative path from the current HTML page to the results page directory.
364
- */
365
- this.resultsPath = resultsPath;
366
-
367
- /*
368
- var: keyTimeout
369
- The timeout used between a keystroke and when a search is performed.
370
- */
371
- this.keyTimeout = 0;
372
-
373
- /*
374
- var: keyTimeoutLength
375
- The length of <keyTimeout> in thousandths of a second.
376
- */
377
- this.keyTimeoutLength = 500;
378
-
379
- /*
380
- var: lastSearchValue
381
- The last search string executed, or an empty string if none.
382
- */
383
- this.lastSearchValue = "";
384
-
385
- /*
386
- var: lastResultsPage
387
- The last results page. The value is only relevant if <lastSearchValue> is set.
388
- */
389
- this.lastResultsPage = "";
390
-
391
- /*
392
- var: deactivateTimeout
393
-
394
- The timeout used between when a control is deactivated and when the entire panel is deactivated. Is necessary
395
- because a control may be deactivated in favor of another control in the same panel, in which case it should stay
396
- active.
397
- */
398
- this.deactivateTimout = 0;
399
-
400
- /*
401
- var: deactivateTimeoutLength
402
- The length of <deactivateTimeout> in thousandths of a second.
403
- */
404
- this.deactivateTimeoutLength = 200;
405
-
406
-
407
-
408
-
409
- // Group: DOM Elements
410
- // ________________________________________________________________________
411
-
412
-
413
- // Function: DOMSearchField
414
- this.DOMSearchField = function()
415
- { return document.getElementById("MSearchField"); };
416
-
417
- // Function: DOMSearchType
418
- this.DOMSearchType = function()
419
- { return document.getElementById("MSearchType"); };
420
-
421
- // Function: DOMPopupSearchResults
422
- this.DOMPopupSearchResults = function()
423
- { return document.getElementById("MSearchResults"); };
424
-
425
- // Function: DOMPopupSearchResultsWindow
426
- this.DOMPopupSearchResultsWindow = function()
427
- { return document.getElementById("MSearchResultsWindow"); };
428
-
429
- // Function: DOMSearchPanel
430
- this.DOMSearchPanel = function()
431
- { return document.getElementById("MSearchPanel"); };
432
-
433
-
434
-
435
-
436
- // Group: Event Handlers
437
- // ________________________________________________________________________
438
-
439
-
440
- /*
441
- Function: OnSearchFieldFocus
442
- Called when focus is added or removed from the search field.
443
- */
444
- this.OnSearchFieldFocus = function(isActive)
445
- {
446
- this.Activate(isActive);
447
- };
448
-
449
-
450
- /*
451
- Function: OnSearchFieldChange
452
- Called when the content of the search field is changed.
453
- */
454
- this.OnSearchFieldChange = function()
455
- {
456
- if (this.keyTimeout)
457
- {
458
- clearTimeout(this.keyTimeout);
459
- this.keyTimeout = 0;
460
- };
461
-
462
- var searchValue = this.DOMSearchField().value.replace(/ +/g, "");
463
-
464
- if (searchValue != this.lastSearchValue)
465
- {
466
- if (searchValue != "")
467
- {
468
- this.keyTimeout = setTimeout(this.name + ".Search()", this.keyTimeoutLength);
469
- }
470
- else
471
- {
472
- if (this.mode == "HTML")
473
- { this.DOMPopupSearchResultsWindow().style.display = "none"; };
474
- this.lastSearchValue = "";
475
- };
476
- };
477
- };
478
-
479
-
480
- /*
481
- Function: OnSearchTypeFocus
482
- Called when focus is added or removed from the search type.
483
- */
484
- this.OnSearchTypeFocus = function(isActive)
485
- {
486
- this.Activate(isActive);
487
- };
488
-
489
-
490
- /*
491
- Function: OnSearchTypeChange
492
- Called when the search type is changed.
493
- */
494
- this.OnSearchTypeChange = function()
495
- {
496
- var searchValue = this.DOMSearchField().value.replace(/ +/g, "");
497
-
498
- if (searchValue != "")
499
- {
500
- this.Search();
501
- };
502
- };
503
-
504
-
505
-
506
- // Group: Action Functions
507
- // ________________________________________________________________________
508
-
509
-
510
- /*
511
- Function: CloseResultsWindow
512
- Closes the results window.
513
- */
514
- this.CloseResultsWindow = function()
515
- {
516
- this.DOMPopupSearchResultsWindow().style.display = "none";
517
- this.Activate(false, true);
518
- };
519
-
520
-
521
- /*
522
- Function: Search
523
- Performs a search.
524
- */
525
- this.Search = function()
526
- {
527
- this.keyTimeout = 0;
528
-
529
- var searchValue = this.DOMSearchField().value.replace(/^ +/, "");
530
- var searchTopic = this.DOMSearchType().value;
531
-
532
- var pageExtension = searchValue.substr(0,1);
533
-
534
- if (pageExtension.match(/^[a-z]/i))
535
- { pageExtension = pageExtension.toUpperCase(); }
536
- else if (pageExtension.match(/^[0-9]/))
537
- { pageExtension = 'Numbers'; }
538
- else
539
- { pageExtension = "Symbols"; };
540
-
541
- var resultsPage;
542
- var resultsPageWithSearch;
543
- var hasResultsPage;
544
-
545
- // indexSectionsWithContent is defined in searchdata.js
546
- if (indexSectionsWithContent[searchTopic][pageExtension] == true)
547
- {
548
- resultsPage = this.resultsPath + '/' + searchTopic + pageExtension + '.html';
549
- resultsPageWithSearch = resultsPage+'?'+escape(searchValue);
550
- hasResultsPage = true;
551
- }
552
- else
553
- {
554
- resultsPage = this.resultsPath + '/NoResults.html';
555
- resultsPageWithSearch = resultsPage;
556
- hasResultsPage = false;
557
- };
558
-
559
- var resultsFrame;
560
- if (this.mode == "HTML")
561
- { resultsFrame = window.frames.MSearchResults; }
562
- else if (this.mode == "FramedHTML")
563
- { resultsFrame = window.top.frames['Content']; };
564
-
565
-
566
- if (resultsPage != this.lastResultsPage ||
567
-
568
- // Bug in IE. If everything becomes hidden in a run, none of them will be able to be reshown in the next for some
569
- // reason. It counts the right number of results, and you can even read the display as "block" after setting it, but it
570
- // just doesn't work in IE 6 or IE 7. So if we're on the right page but the previous search had no results, reload the
571
- // page anyway to get around the bug.
572
- (browserType == "IE" && hasResultsPage &&
573
- (!resultsFrame.searchResults || resultsFrame.searchResults.lastMatchCount == 0)) )
574
-
575
- {
576
- resultsFrame.location.href = resultsPageWithSearch;
577
- }
578
-
579
- // So if the results page is right and there's no IE bug, reperform the search on the existing page. We have to check if there
580
- // are results because NoResults.html doesn't have any JavaScript, and it would be useless to do anything on that page even
581
- // if it did.
582
- else if (hasResultsPage)
583
- {
584
- // We need to check if this exists in case the frame is present but didn't finish loading.
585
- if (resultsFrame.searchResults)
586
- { resultsFrame.searchResults.Search(searchValue); }
587
-
588
- // Otherwise just reload instead of waiting.
589
- else
590
- { resultsFrame.location.href = resultsPageWithSearch; };
591
- };
592
-
593
-
594
- var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow();
595
-
596
- if (this.mode == "HTML" && domPopupSearchResultsWindow.style.display != "block")
597
- {
598
- var domSearchType = this.DOMSearchType();
599
-
600
- var left = GetXPosition(domSearchType);
601
- var top = GetYPosition(domSearchType) + domSearchType.offsetHeight;
602
-
603
- MoveToPosition(domPopupSearchResultsWindow, left, top);
604
- domPopupSearchResultsWindow.style.display = 'block';
605
- };
606
-
607
-
608
- this.lastSearchValue = searchValue;
609
- this.lastResultsPage = resultsPage;
610
- };
611
-
612
-
613
-
614
- // Group: Activation Functions
615
- // Functions that handle whether the entire panel is active or not.
616
- // ________________________________________________________________________
617
-
618
-
619
- /*
620
- Function: Activate
621
-
622
- Activates or deactivates the search panel, resetting things to their default values if necessary. You can call this on every
623
- control's OnBlur() and it will handle not deactivating the entire panel when focus is just switching between them transparently.
624
-
625
- Parameters:
626
-
627
- isActive - Whether you're activating or deactivating the panel.
628
- ignoreDeactivateDelay - Set if you're positive the action will deactivate the panel and thus want to skip the delay.
629
- */
630
- this.Activate = function(isActive, ignoreDeactivateDelay)
631
- {
632
- // We want to ignore isActive being false while the results window is open.
633
- if (isActive || (this.mode == "HTML" && this.DOMPopupSearchResultsWindow().style.display == "block"))
634
- {
635
- if (this.inactivateTimeout)
636
- {
637
- clearTimeout(this.inactivateTimeout);
638
- this.inactivateTimeout = 0;
639
- };
640
-
641
- this.DOMSearchPanel().className = 'MSearchPanelActive';
642
-
643
- var searchField = this.DOMSearchField();
644
-
645
- if (searchField.value == 'Search')
646
- { searchField.value = ""; }
647
- }
648
- else if (!ignoreDeactivateDelay)
649
- {
650
- this.inactivateTimeout = setTimeout(this.name + ".InactivateAfterTimeout()", this.inactivateTimeoutLength);
651
- }
652
- else
653
- {
654
- this.InactivateAfterTimeout();
655
- };
656
- };
657
-
658
-
659
- /*
660
- Function: InactivateAfterTimeout
661
-
662
- Called by <inactivateTimeout>, which is set by <Activate()>. Inactivation occurs on a timeout because a control may
663
- receive OnBlur() when focus is really transferring to another control in the search panel. In this case we don't want to
664
- actually deactivate the panel because not only would that cause a visible flicker but it could also reset the search value.
665
- So by doing it on a timeout instead, there's a short period where the second control's OnFocus() can cancel the deactivation.
666
- */
667
- this.InactivateAfterTimeout = function()
668
- {
669
- this.inactivateTimeout = 0;
670
-
671
- this.DOMSearchPanel().className = 'MSearchPanelInactive';
672
- this.DOMSearchField().value = "Search";
673
-
674
- this.lastSearchValue = "";
675
- this.lastResultsPage = "";
676
- };
677
- };
678
-
679
-
680
-
681
-
682
- /* ________________________________________________________________________________________________________
683
-
684
- Class: SearchResults
685
- _________________________________________________________________________________________________________
686
-
687
- The class that handles everything on the search results page.
688
- _________________________________________________________________________________________________________
689
- */
690
-
691
-
692
- function SearchResults(name, mode)
693
- {
694
- /*
695
- var: mode
696
- The mode the search is going to work in, such as "HTML" or "FramedHTML".
697
- */
698
- this.mode = mode;
699
-
700
- /*
701
- var: lastMatchCount
702
- The number of matches from the last run of <Search()>.
703
- */
704
- this.lastMatchCount = 0;
705
-
706
-
707
- /*
708
- Function: Toggle
709
- Toggles the visibility of the passed element ID.
710
- */
711
- this.Toggle = function(id)
712
- {
713
- if (this.mode == "FramedHTML")
714
- { return; };
715
-
716
- var parentElement = document.getElementById(id);
717
-
718
- var element = parentElement.firstChild;
719
-
720
- while (element && element != parentElement)
721
- {
722
- if (element.nodeName == 'DIV' && element.className == 'ISubIndex')
723
- {
724
- if (element.style.display == 'block')
725
- { element.style.display = "none"; }
726
- else
727
- { element.style.display = 'block'; }
728
- };
729
-
730
- if (element.nodeName == 'DIV' && element.hasChildNodes())
731
- { element = element.firstChild; }
732
- else if (element.nextSibling)
733
- { element = element.nextSibling; }
734
- else
735
- {
736
- do
737
- {
738
- element = element.parentNode;
739
- }
740
- while (element && element != parentElement && !element.nextSibling);
741
-
742
- if (element && element != parentElement)
743
- { element = element.nextSibling; };
744
- };
745
- };
746
- };
747
-
748
-
749
- /*
750
- Function: Search
751
-
752
- Searches for the passed string. If there is no parameter, it takes it from the URL query.
753
-
754
- Always returns true, since other documents may try to call it and that may or may not be possible.
755
- */
756
- this.Search = function(search)
757
- {
758
- if (!search)
759
- {
760
- search = window.location.search;
761
- search = search.substring(1); // Remove the leading ?
762
- search = unescape(search);
763
- };
764
-
765
- search = search.replace(/^ +/, "");
766
- search = search.replace(/ +$/, "");
767
- search = search.toLowerCase();
768
-
769
- if (search.match(/[^a-z0-9]/)) // Just a little speedup so it doesn't have to go through the below unnecessarily.
770
- {
771
- search = search.replace(/\_/g, "_und");
772
- search = search.replace(/\ +/gi, "_spc");
773
- search = search.replace(/\~/g, "_til");
774
- search = search.replace(/\!/g, "_exc");
775
- search = search.replace(/\@/g, "_att");
776
- search = search.replace(/\#/g, "_num");
777
- search = search.replace(/\$/g, "_dol");
778
- search = search.replace(/\%/g, "_pct");
779
- search = search.replace(/\^/g, "_car");
780
- search = search.replace(/\&/g, "_amp");
781
- search = search.replace(/\*/g, "_ast");
782
- search = search.replace(/\(/g, "_lpa");
783
- search = search.replace(/\)/g, "_rpa");
784
- search = search.replace(/\-/g, "_min");
785
- search = search.replace(/\+/g, "_plu");
786
- search = search.replace(/\=/g, "_equ");
787
- search = search.replace(/\{/g, "_lbc");
788
- search = search.replace(/\}/g, "_rbc");
789
- search = search.replace(/\[/g, "_lbk");
790
- search = search.replace(/\]/g, "_rbk");
791
- search = search.replace(/\:/g, "_col");
792
- search = search.replace(/\;/g, "_sco");
793
- search = search.replace(/\"/g, "_quo");
794
- search = search.replace(/\'/g, "_apo");
795
- search = search.replace(/\</g, "_lan");
796
- search = search.replace(/\>/g, "_ran");
797
- search = search.replace(/\,/g, "_com");
798
- search = search.replace(/\./g, "_per");
799
- search = search.replace(/\?/g, "_que");
800
- search = search.replace(/\//g, "_sla");
801
- search = search.replace(/[^a-z0-9\_]i/gi, "_zzz");
802
- };
803
-
804
- var resultRows = document.getElementsByTagName("div");
805
- var matches = 0;
806
-
807
- var i = 0;
808
- while (i < resultRows.length)
809
- {
810
- var row = resultRows.item(i);
811
-
812
- if (row.className == "SRResult")
813
- {
814
- var rowMatchName = row.id.toLowerCase();
815
- rowMatchName = rowMatchName.replace(/^sr\d*_/, '');
816
-
817
- if (search.length <= rowMatchName.length && rowMatchName.substr(0, search.length) == search)
818
- {
819
- row.style.display = "block";
820
- matches++;
821
- }
822
- else
823
- { row.style.display = "none"; };
824
- };
825
-
826
- i++;
827
- };
828
-
829
- document.getElementById("Searching").style.display="none";
830
-
831
- if (matches == 0)
832
- { document.getElementById("NoMatches").style.display="block"; }
833
- else
834
- { document.getElementById("NoMatches").style.display="none"; }
835
-
836
- this.lastMatchCount = matches;
837
-
838
- return true;
839
- };
840
- };
841
-