ninjs 0.13.7 → 0.13.8
Sign up to get free protection for your applications and to get access to all the features.
- data/.bundle/config +2 -0
- data/CNAME +1 -0
- data/Gemfile +13 -0
- data/Gemfile.lock +36 -0
- data/LICENSE +29 -0
- data/README.md +348 -0
- data/VERSION +1 -1
- data/bin/ninjs +211 -0
- data/lib/ninjs.rb +10 -0
- data/lib/ninjs/command.rb +88 -0
- data/lib/ninjs/configuration.rb +82 -0
- data/lib/ninjs/dependencies.rb +16 -0
- data/lib/ninjs/generator.rb +57 -0
- data/lib/ninjs/helpers.rb +17 -0
- data/lib/ninjs/manifest.rb +9 -0
- data/lib/ninjs/notification.rb +37 -0
- data/lib/ninjs/project.rb +214 -0
- data/ninjs.gemspec +294 -5
- data/repository/jquery/1.1.4.js +2508 -0
- data/repository/jquery/1.2.6.js +32 -0
- data/repository/jquery/1.3.2.js +19 -0
- data/repository/jquery/1.4.2.js +154 -0
- data/repository/jquery/1.4.3.js +166 -0
- data/repository/jquery/1.4.4.js +167 -0
- data/repository/jquery/1.5.js +16 -0
- data/repository/jquery/fancybox/1.3.1.js +1079 -0
- data/repository/jquery/fancybox/assets/1.3.1/css/fancybox.css +363 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/blank.gif +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_close.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_loading.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_nav_left.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_nav_right.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_shadow_e.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_shadow_n.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_shadow_ne.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_shadow_nw.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_shadow_s.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_shadow_se.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_shadow_sw.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_shadow_w.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_title_left.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_title_main.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_title_over.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancy_title_right.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancybox-x.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancybox-y.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/fancybox.png +0 -0
- data/repository/jquery/fancybox/assets/1.3.1/images/fancybox/jquery.easing-1.3.pack.js +72 -0
- data/repository/jquery/fancybox/latest.js +1 -0
- data/repository/jquery/latest.js +1 -0
- data/repository/jquery/mobile/1.0a3.js +123 -0
- data/repository/jquery/mobile/1.0a3/assets/css/jquery.mobile.css +1652 -0
- data/repository/jquery/mobile/1.0a3/assets/images/jquerymobile/ajax-loader.png +0 -0
- data/repository/jquery/mobile/1.0a3/assets/images/jquerymobile/form-check-off.png +0 -0
- data/repository/jquery/mobile/1.0a3/assets/images/jquerymobile/form-check-on.png +0 -0
- data/repository/jquery/mobile/1.0a3/assets/images/jquerymobile/form-radio-off.png +0 -0
- data/repository/jquery/mobile/1.0a3/assets/images/jquerymobile/form-radio-on.png +0 -0
- data/repository/jquery/mobile/1.0a3/assets/images/jquerymobile/icon-search-black.png +0 -0
- data/repository/jquery/mobile/1.0a3/assets/images/jquerymobile/icons-18-black.png +0 -0
- data/repository/jquery/mobile/1.0a3/assets/images/jquerymobile/icons-18-white.png +0 -0
- data/repository/jquery/mobile/1.0a3/assets/images/jquerymobile/icons-36-black.png +0 -0
- data/repository/jquery/mobile/1.0a3/assets/images/jquerymobile/icons-36-white.png +0 -0
- data/repository/jquery/mobile/latest.js +1 -0
- data/repository/jquery/mousewheel/3.0.2.js +11 -0
- data/repository/jquery/mousewheel/latest.js +1 -0
- data/repository/jquery/ui/1.8.7.js +783 -0
- data/repository/jquery/ui/assets/1.8.7/css/jqueryui/jquery.ui.accordion.css +19 -0
- data/repository/jquery/ui/assets/1.8.7/css/jqueryui/jquery.ui.all.css +11 -0
- data/repository/jquery/ui/assets/1.8.7/css/jqueryui/jquery.ui.autocomplete.css +53 -0
- data/repository/jquery/ui/assets/1.8.7/css/jqueryui/jquery.ui.base.css +11 -0
- data/repository/jquery/ui/assets/1.8.7/css/jqueryui/jquery.ui.button.css +38 -0
- data/repository/jquery/ui/assets/1.8.7/css/jqueryui/jquery.ui.core.css +41 -0
- data/repository/jquery/ui/assets/1.8.7/css/jqueryui/jquery.ui.datepicker.css +68 -0
- data/repository/jquery/ui/assets/1.8.7/css/jqueryui/jquery.ui.dialog.css +21 -0
- data/repository/jquery/ui/assets/1.8.7/css/jqueryui/jquery.ui.progressbar.css +11 -0
- data/repository/jquery/ui/assets/1.8.7/css/jqueryui/jquery.ui.resizable.css +20 -0
- data/repository/jquery/ui/assets/1.8.7/css/jqueryui/jquery.ui.selectable.css +10 -0
- data/repository/jquery/ui/assets/1.8.7/css/jqueryui/jquery.ui.slider.css +24 -0
- data/repository/jquery/ui/assets/1.8.7/css/jqueryui/jquery.ui.tabs.css +18 -0
- data/repository/jquery/ui/assets/1.8.7/css/jqueryui/jquery.ui.theme.css +252 -0
- data/repository/jquery/ui/assets/1.8.7/images/jqueryui/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/repository/jquery/ui/assets/1.8.7/images/jqueryui/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/repository/jquery/ui/assets/1.8.7/images/jqueryui/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/repository/jquery/ui/assets/1.8.7/images/jqueryui/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/repository/jquery/ui/assets/1.8.7/images/jqueryui/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/repository/jquery/ui/assets/1.8.7/images/jqueryui/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/repository/jquery/ui/assets/1.8.7/images/jqueryui/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/repository/jquery/ui/assets/1.8.7/images/jqueryui/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/repository/jquery/ui/assets/1.8.7/images/jqueryui/ui-icons_222222_256x240.png +0 -0
- data/repository/jquery/ui/assets/1.8.7/images/jqueryui/ui-icons_2e83ff_256x240.png +0 -0
- data/repository/jquery/ui/assets/1.8.7/images/jqueryui/ui-icons_454545_256x240.png +0 -0
- data/repository/jquery/ui/assets/1.8.7/images/jqueryui/ui-icons_888888_256x240.png +0 -0
- data/repository/jquery/ui/assets/1.8.7/images/jqueryui/ui-icons_cd0a0a_256x240.png +0 -0
- data/repository/jquery/ui/latest.js +1 -0
- data/repository/json2.js +482 -0
- data/repository/modernizr/1.5.js +28 -0
- data/repository/modernizr/latest.js +1 -0
- data/repository/ninjs/core/.core.pdoc.yaml +0 -0
- data/repository/ninjs/core/.existence.pdoc.yaml +12 -0
- data/repository/ninjs/core/.extend.pdoc.yaml +0 -0
- data/repository/ninjs/core/.nin.pdoc.yaml +0 -0
- data/repository/ninjs/core/application.js +47 -0
- data/repository/ninjs/core/existence.js +277 -0
- data/repository/ninjs/core/extend.js +77 -0
- data/repository/ninjs/core/module.js +135 -0
- data/repository/ninjs/core/nin.js +4 -0
- data/repository/ninjs/docs/Data/ClassHierarchy.nd +0 -0
- data/repository/ninjs/docs/Data/ConfigFileInfo.nd +0 -0
- data/repository/ninjs/docs/Data/FileInfo.nd +16 -0
- data/repository/ninjs/docs/Data/ImageFileInfo.nd +0 -0
- data/repository/ninjs/docs/Data/ImageReferenceTable.nd +0 -0
- data/repository/ninjs/docs/Data/IndexInfo.nd +0 -0
- data/repository/ninjs/docs/Data/PreviousMenuState.nd +0 -0
- data/repository/ninjs/docs/Data/PreviousSettings.nd +0 -0
- data/repository/ninjs/docs/Data/SymbolTable.nd +0 -0
- data/repository/ninjs/docs/Languages.txt +113 -0
- data/repository/ninjs/docs/Menu.txt +63 -0
- data/repository/ninjs/docs/Topics.txt +81 -0
- data/repository/ninjs/docs/files/core/application-js.html +44 -0
- data/repository/ninjs/docs/files/core/existence-js.html +60 -0
- data/repository/ninjs/docs/files/core/extend-js.html +55 -0
- data/repository/ninjs/docs/files/core/module-js.html +80 -0
- data/repository/ninjs/docs/files/core/nin-js.html +38 -0
- data/repository/ninjs/docs/index.html +1 -0
- data/repository/ninjs/docs/index/Classes.html +33 -0
- data/repository/ninjs/docs/index/Files.html +45 -0
- data/repository/ninjs/docs/index/Functions.html +65 -0
- data/repository/ninjs/docs/index/General.html +85 -0
- data/repository/ninjs/docs/index/Variables.html +45 -0
- data/repository/ninjs/docs/javascript/main.js +841 -0
- data/repository/ninjs/docs/javascript/prettify.js +1526 -0
- data/repository/ninjs/docs/javascript/searchdata.js +152 -0
- data/repository/ninjs/docs/search/ClassesN.html +20 -0
- data/repository/ninjs/docs/search/FilesA.html +20 -0
- data/repository/ninjs/docs/search/FilesE.html +20 -0
- data/repository/ninjs/docs/search/FilesM.html +20 -0
- data/repository/ninjs/docs/search/FilesN.html +20 -0
- data/repository/ninjs/docs/search/FunctionsA.html +20 -0
- data/repository/ninjs/docs/search/FunctionsC.html +20 -0
- data/repository/ninjs/docs/search/FunctionsE.html +20 -0
- data/repository/ninjs/docs/search/FunctionsI.html +20 -0
- data/repository/ninjs/docs/search/FunctionsM.html +20 -0
- data/repository/ninjs/docs/search/FunctionsR.html +20 -0
- data/repository/ninjs/docs/search/FunctionsS.html +20 -0
- data/repository/ninjs/docs/search/FunctionsSymbols.html +20 -0
- data/repository/ninjs/docs/search/FunctionsU.html +20 -0
- data/repository/ninjs/docs/search/GeneralA.html +20 -0
- data/repository/ninjs/docs/search/GeneralC.html +20 -0
- data/repository/ninjs/docs/search/GeneralD.html +20 -0
- data/repository/ninjs/docs/search/GeneralE.html +20 -0
- data/repository/ninjs/docs/search/GeneralF.html +20 -0
- data/repository/ninjs/docs/search/GeneralI.html +20 -0
- data/repository/ninjs/docs/search/GeneralM.html +20 -0
- data/repository/ninjs/docs/search/GeneralN.html +20 -0
- data/repository/ninjs/docs/search/GeneralR.html +20 -0
- data/repository/ninjs/docs/search/GeneralS.html +20 -0
- data/repository/ninjs/docs/search/GeneralSymbols.html +20 -0
- data/repository/ninjs/docs/search/GeneralT.html +20 -0
- data/repository/ninjs/docs/search/GeneralU.html +20 -0
- data/repository/ninjs/docs/search/GeneralV.html +20 -0
- data/repository/ninjs/docs/search/NoResults.html +15 -0
- data/repository/ninjs/docs/search/VariablesD.html +20 -0
- data/repository/ninjs/docs/search/VariablesN.html +20 -0
- data/repository/ninjs/docs/search/VariablesR.html +20 -0
- data/repository/ninjs/docs/search/VariablesT.html +20 -0
- data/repository/ninjs/docs/styles/main.css +828 -0
- data/repository/ninjs/extensions/jquery.elements.js +60 -0
- data/repository/ninjs/tests/index.html +21 -0
- data/repository/ninjs/tests/ninjs.test.js +188 -0
- data/repository/ninjs/tests/ninjs.utilities.test.js +137 -0
- data/repository/ninjs/tests/qunit/qunit.css +197 -0
- data/repository/ninjs/tests/qunit/qunit.js +1415 -0
- data/repository/ninjs/utilities/all.js +5 -0
- data/repository/ninjs/utilities/array.js +29 -0
- data/repository/ninjs/utilities/cookie.js +0 -0
- data/repository/ninjs/utilities/css.js +51 -0
- data/repository/ninjs/utilities/number.js +11 -0
- data/repository/ninjs/utilities/string.js +61 -0
- data/repository/nullconsole.js +7 -0
- data/repository/qunit/assets/css/qunit.css +196 -0
- data/repository/qunit/qunit.js +1374 -0
- data/repository/selectivizr/1.0.js +5 -0
- data/repository/selectivizr/latest.js +1 -0
- data/repository/syntaxhighlighter/all.js +11 -0
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shCore.css +226 -0
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shCoreDefault.css +328 -0
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shCoreDjango.css +331 -0
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shCoreEclipse.css +339 -0
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shCoreEmacs.css +324 -0
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shCoreFadeToGrey.css +328 -0
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shCoreMDUltra.css +324 -0
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shCoreMidnight.css +324 -0
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shCoreRDark.css +324 -0
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shThemeDefault.css +117 -0
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shThemeDjango.css +120 -0
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shThemeEclipse.css +128 -0
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shThemeEmacs.css +113 -0
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shThemeFadeToGrey.css +117 -0
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shThemeMDUltra.css +113 -0
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shThemeMidnight.css +113 -0
- data/repository/syntaxhighlighter/assets/css/syntaxhighlighter/shThemeRDark.css +113 -0
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shCore.scss +216 -0
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shCoreDefault.scss +2 -0
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shCoreDjango.scss +2 -0
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shCoreEclipse.scss +2 -0
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shCoreEmacs.scss +2 -0
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shCoreFadeToGrey.scss +2 -0
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shCoreMDUltra.scss +2 -0
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shCoreMidnight.scss +2 -0
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shCoreRDark.scss +2 -0
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shThemeDefault.scss +7 -0
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shThemeDjango.scss +36 -0
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shThemeEclipse.scss +48 -0
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shThemeEmacs.scss +32 -0
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shThemeFadeToGrey.scss +36 -0
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shThemeMDUltra.scss +32 -0
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shThemeMidnight.scss +32 -0
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_shThemeRDark.scss +32 -0
- data/repository/syntaxhighlighter/assets/scss/syntaxhighlighter/_theme_template.scss +120 -0
- data/repository/syntaxhighlighter/shAutoloader.js +17 -0
- data/repository/syntaxhighlighter/shBrushAS3.js +59 -0
- data/repository/syntaxhighlighter/shBrushAppleScript.js +75 -0
- data/repository/syntaxhighlighter/shBrushBash.js +59 -0
- data/repository/syntaxhighlighter/shBrushCSharp.js +65 -0
- data/repository/syntaxhighlighter/shBrushColdFusion.js +100 -0
- data/repository/syntaxhighlighter/shBrushCpp.js +97 -0
- data/repository/syntaxhighlighter/shBrushCss.js +91 -0
- data/repository/syntaxhighlighter/shBrushDelphi.js +55 -0
- data/repository/syntaxhighlighter/shBrushDiff.js +41 -0
- data/repository/syntaxhighlighter/shBrushErlang.js +52 -0
- data/repository/syntaxhighlighter/shBrushGroovy.js +67 -0
- data/repository/syntaxhighlighter/shBrushJScript.js +52 -0
- data/repository/syntaxhighlighter/shBrushJava.js +57 -0
- data/repository/syntaxhighlighter/shBrushJavaFX.js +58 -0
- data/repository/syntaxhighlighter/shBrushPerl.js +72 -0
- data/repository/syntaxhighlighter/shBrushPhp.js +88 -0
- data/repository/syntaxhighlighter/shBrushPlain.js +33 -0
- data/repository/syntaxhighlighter/shBrushPowerShell.js +74 -0
- data/repository/syntaxhighlighter/shBrushPython.js +64 -0
- data/repository/syntaxhighlighter/shBrushRuby.js +55 -0
- data/repository/syntaxhighlighter/shBrushSass.js +94 -0
- data/repository/syntaxhighlighter/shBrushScala.js +51 -0
- data/repository/syntaxhighlighter/shBrushSql.js +66 -0
- data/repository/syntaxhighlighter/shBrushVb.js +56 -0
- data/repository/syntaxhighlighter/shBrushXml.js +69 -0
- data/repository/syntaxhighlighter/shCore.js +17 -0
- data/repository/syntaxhighlighter/shLegacy.js +17 -0
- data/spec/command_spec.rb +9 -0
- data/spec/configuration_spec.rb +70 -0
- data/spec/dependencies_spec.rb +27 -0
- data/spec/fixtures/autoload.js +3 -0
- data/spec/fixtures/changed.ninjs.conf +6 -0
- data/spec/fixtures/compressed.myapp.js +39 -0
- data/spec/fixtures/core.js +6 -0
- data/spec/fixtures/dependencies.js +3 -0
- data/spec/fixtures/foo.elements.js +3 -0
- data/spec/fixtures/foo.js +17 -0
- data/spec/fixtures/foo.model.js +3 -0
- data/spec/fixtures/foo.module.js +13 -0
- data/spec/fixtures/hello.elements.js +3 -0
- data/spec/fixtures/hello.js +17 -0
- data/spec/fixtures/hello.model.js +3 -0
- data/spec/fixtures/hello.module.js +13 -0
- data/spec/fixtures/myapp.initial.js +535 -0
- data/spec/fixtures/myapp.js +710 -0
- data/spec/fixtures/new.ninjs.conf +6 -0
- data/spec/fixtures/ninjs.conf +6 -0
- data/spec/generator_spec.rb +34 -0
- data/spec/helpers_spec.rb +11 -0
- data/spec/manifest_spec.rb +8 -0
- data/spec/ninjs_spec.rb +20 -0
- data/spec/notification_spec.rb +27 -0
- data/spec/project_spec.rb +239 -0
- data/spec/spec_helper.rb +29 -0
- metadata +294 -50
@@ -0,0 +1,45 @@
|
|
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>$#! · 0-9 · A · B · C · <a href="#D">D</a> · E · F · G · H · I · J · K · L · M · <a href="#N">N</a> · O · P · Q · <a href="#R">R</a> · S · <a href="#T">T</a> · U · V · W · X · Y · 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> </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> </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> </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> </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’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’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>
|
@@ -0,0 +1,841 @@
|
|
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
|
+
|