dieta-alu0100226300 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.rspec +2 -0
- data/.travis.yml +5 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +4 -0
- data/Guardfile +82 -0
- data/LICENSE.txt +21 -0
- data/README.md +49 -0
- data/Rakefile +6 -0
- data/algo.log +1 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/dieta.gemspec +39 -0
- data/documentacion/CODE_OF_CONDUCT_md.html +195 -0
- data/documentacion/Dieta.html +109 -0
- data/documentacion/Dietas.html +219 -0
- data/documentacion/Gemfile.html +100 -0
- data/documentacion/Gemfile_lock.html +182 -0
- data/documentacion/Guardfile.html +180 -0
- data/documentacion/LICENSE_txt.html +117 -0
- data/documentacion/Lista.html +457 -0
- data/documentacion/Menu.html +624 -0
- data/documentacion/Menu_alimento.html +221 -0
- data/documentacion/Menu_edad.html +221 -0
- data/documentacion/Object.html +116 -0
- data/documentacion/Plato.html +314 -0
- data/documentacion/README_md.html +173 -0
- data/documentacion/Rakefile.html +101 -0
- data/documentacion/bin/setup.html +101 -0
- data/documentacion/created.rid +19 -0
- data/documentacion/css/fonts.css +167 -0
- data/documentacion/css/rdoc.css +590 -0
- data/documentacion/dieta_gemspec.html +135 -0
- data/documentacion/fonts/Lato-Light.ttf +0 -0
- data/documentacion/fonts/Lato-LightItalic.ttf +0 -0
- data/documentacion/fonts/Lato-Regular.ttf +0 -0
- data/documentacion/fonts/Lato-RegularItalic.ttf +0 -0
- data/documentacion/fonts/SourceCodePro-Bold.ttf +0 -0
- data/documentacion/fonts/SourceCodePro-Regular.ttf +0 -0
- data/documentacion/images/add.png +0 -0
- data/documentacion/images/arrow_up.png +0 -0
- data/documentacion/images/brick.png +0 -0
- data/documentacion/images/brick_link.png +0 -0
- data/documentacion/images/bug.png +0 -0
- data/documentacion/images/bullet_black.png +0 -0
- data/documentacion/images/bullet_toggle_minus.png +0 -0
- data/documentacion/images/bullet_toggle_plus.png +0 -0
- data/documentacion/images/date.png +0 -0
- data/documentacion/images/delete.png +0 -0
- data/documentacion/images/find.png +0 -0
- data/documentacion/images/loadingAnimation.gif +0 -0
- data/documentacion/images/macFFBgHack.png +0 -0
- data/documentacion/images/package.png +0 -0
- data/documentacion/images/page_green.png +0 -0
- data/documentacion/images/page_white_text.png +0 -0
- data/documentacion/images/page_white_width.png +0 -0
- data/documentacion/images/plugin.png +0 -0
- data/documentacion/images/ruby.png +0 -0
- data/documentacion/images/tag_blue.png +0 -0
- data/documentacion/images/tag_green.png +0 -0
- data/documentacion/images/transparent.png +0 -0
- data/documentacion/images/wrench.png +0 -0
- data/documentacion/images/wrench_orange.png +0 -0
- data/documentacion/images/zoom.png +0 -0
- data/documentacion/index.html +119 -0
- data/documentacion/js/darkfish.js +161 -0
- data/documentacion/js/jquery.js +4 -0
- data/documentacion/js/navigation.js +142 -0
- data/documentacion/js/navigation.js.gz +0 -0
- data/documentacion/js/search.js +109 -0
- data/documentacion/js/search_index.js +1 -0
- data/documentacion/js/search_index.js.gz +0 -0
- data/documentacion/js/searcher.js +228 -0
- data/documentacion/js/searcher.js.gz +0 -0
- data/documentacion/table_of_contents.html +257 -0
- data/lib/dieta.rb +10 -0
- data/lib/dieta/dietas.rb +11 -0
- data/lib/dieta/lista.rb +65 -0
- data/lib/dieta/menu.rb +78 -0
- data/lib/dieta/menudsl.rb +58 -0
- data/lib/dieta/plato.rb +19 -0
- data/lib/dieta/version.rb +3 -0
- metadata +210 -0
@@ -0,0 +1,135 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>dieta.gemspec - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "./";
|
11
|
+
</script>
|
12
|
+
|
13
|
+
<script src="./js/jquery.js"></script>
|
14
|
+
<script src="./js/darkfish.js"></script>
|
15
|
+
|
16
|
+
<link href="./css/fonts.css" rel="stylesheet">
|
17
|
+
<link href="./css/rdoc.css" rel="stylesheet">
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
<body id="top" role="document" class="file">
|
22
|
+
<nav role="navigation">
|
23
|
+
<div id="project-navigation">
|
24
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
25
|
+
<h2>
|
26
|
+
<a href="./index.html" rel="home">Home</a>
|
27
|
+
</h2>
|
28
|
+
|
29
|
+
<div id="table-of-contents-navigation">
|
30
|
+
<a href="./table_of_contents.html#pages">Pages</a>
|
31
|
+
<a href="./table_of_contents.html#classes">Classes</a>
|
32
|
+
<a href="./table_of_contents.html#methods">Methods</a>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
|
36
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
37
|
+
<form action="#" method="get" accept-charset="utf-8">
|
38
|
+
<div id="search-field-wrapper">
|
39
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
40
|
+
aria-autocomplete="list" aria-controls="search-results"
|
41
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
42
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
43
|
+
</div>
|
44
|
+
|
45
|
+
<ul id="search-results" aria-label="Search Results"
|
46
|
+
aria-busy="false" aria-expanded="false"
|
47
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
48
|
+
</form>
|
49
|
+
</div>
|
50
|
+
|
51
|
+
</div>
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
<div id="project-metadata">
|
56
|
+
<div id="fileindex-section" class="nav-section">
|
57
|
+
<h3>Pages</h3>
|
58
|
+
|
59
|
+
<ul class="link-list">
|
60
|
+
|
61
|
+
<li><a href="./CODE_OF_CONDUCT_md.html">CODE_OF_CONDUCT</a>
|
62
|
+
|
63
|
+
<li><a href="./Gemfile.html">Gemfile</a>
|
64
|
+
|
65
|
+
<li><a href="./Gemfile_lock.html">Gemfile.lock</a>
|
66
|
+
|
67
|
+
<li><a href="./Guardfile.html">Guardfile</a>
|
68
|
+
|
69
|
+
<li><a href="./LICENSE_txt.html">LICENSE</a>
|
70
|
+
|
71
|
+
<li><a href="./README_md.html">README</a>
|
72
|
+
|
73
|
+
<li><a href="./Rakefile.html">Rakefile</a>
|
74
|
+
|
75
|
+
<li><a href="./bin/setup.html">setup</a>
|
76
|
+
|
77
|
+
<li><a href="./dieta_gemspec.html">dieta.gemspec</a>
|
78
|
+
|
79
|
+
</ul>
|
80
|
+
</div>
|
81
|
+
|
82
|
+
</div>
|
83
|
+
</nav>
|
84
|
+
|
85
|
+
<main role="main" aria-label="Page dieta.gemspec">
|
86
|
+
|
87
|
+
<p>lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib)
|
88
|
+
unless $LOAD_PATH.include?(lib) require 'dieta/version'</p>
|
89
|
+
|
90
|
+
<p>Gem::Specification.new do |spec|</p>
|
91
|
+
|
92
|
+
<pre class="ruby"><span class="ruby-identifier">spec</span>.<span class="ruby-identifier">name</span> = <span class="ruby-string">"dieta"</span>
|
93
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">version</span> = <span class="ruby-constant">Dieta</span><span class="ruby-operator">::</span><span class="ruby-constant">VERSION</span>
|
94
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">authors</span> = [<span class="ruby-string">"Joram Real Gómez"</span>]
|
95
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">email</span> = [<span class="ruby-string">"alu0100226300@ull.edu.es"</span>]
|
96
|
+
|
97
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">summary</span> = <span class="ruby-string">%q{sumario de la gema dieta}</span>
|
98
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">description</span> = <span class="ruby-string">%q{Descripcion de la gema}</span>
|
99
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">homepage</span> = <span class="ruby-string">"https://github.com/ULL-ESIT-LPP-1617/menu-dietetico-alu0100226300.git"</span>
|
100
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">license</span> = <span class="ruby-string">"MIT"</span>
|
101
|
+
|
102
|
+
<span class="ruby-comment"># Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'</span>
|
103
|
+
<span class="ruby-comment"># to allow pushing to a single host or delete this section to allow pushing to any host.</span>
|
104
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">respond_to?</span>(:<span class="ruby-identifier">metadata</span>)
|
105
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">metadata</span>[<span class="ruby-string">'allowed_push_host'</span>] = <span class="ruby-string">"TODO: Set to 'http://mygemserver.com'"</span>
|
106
|
+
<span class="ruby-keyword">else</span>
|
107
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-string">"RubyGems 2.0 or newer is required to protect against "</span> <span class="ruby-string">"public gem pushes."</span>
|
108
|
+
<span class="ruby-keyword">end</span>
|
109
|
+
|
110
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">files</span> = <span class="ruby-value">%x`git ls-files -z`</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">"\x0"</span>).<span class="ruby-identifier">reject</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
|
111
|
+
<span class="ruby-identifier">f</span>.<span class="ruby-identifier">match</span>(<span class="ruby-regexp">%r{^(test|spec|features)/}</span>)
|
112
|
+
<span class="ruby-keyword">end</span>
|
113
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">bindir</span> = <span class="ruby-string">"exe"</span>
|
114
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">executables</span> = <span class="ruby-identifier">spec</span>.<span class="ruby-identifier">files</span>.<span class="ruby-identifier">grep</span>(<span class="ruby-regexp">%r{^exe/}</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>(<span class="ruby-identifier">f</span>) }
|
115
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">require_paths</span> = [<span class="ruby-string">"lib"</span>]
|
116
|
+
|
117
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">add_development_dependency</span> <span class="ruby-string">"bundler"</span>, <span class="ruby-string">"~> 1.13"</span>
|
118
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">add_development_dependency</span> <span class="ruby-string">"rake"</span>, <span class="ruby-string">"~> 10.0"</span>
|
119
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">add_development_dependency</span> <span class="ruby-string">"rspec"</span>, <span class="ruby-string">"~> 3.0"</span>
|
120
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">add_development_dependency</span> <span class="ruby-string">"guard"</span>
|
121
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">add_development_dependency</span> <span class="ruby-string">"guard-rspec"</span>
|
122
|
+
<span class="ruby-identifier">spec</span>.<span class="ruby-identifier">add_development_dependency</span> <span class="ruby-string">"guard-bundler"</span>
|
123
|
+
</pre>
|
124
|
+
|
125
|
+
<p>end</p>
|
126
|
+
</main>
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
<footer id="validator-badges" role="contentinfo">
|
131
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
132
|
+
<p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.1.
|
133
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
134
|
+
</footer>
|
135
|
+
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,119 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>RDoc Documentation</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "./";
|
11
|
+
</script>
|
12
|
+
|
13
|
+
<script src="./js/jquery.js"></script>
|
14
|
+
<script src="./js/darkfish.js"></script>
|
15
|
+
|
16
|
+
<link href="./css/fonts.css" rel="stylesheet">
|
17
|
+
<link href="./css/rdoc.css" rel="stylesheet">
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
<body id="top" role="document" class="file">
|
22
|
+
<nav role="navigation">
|
23
|
+
<div id="project-navigation">
|
24
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
25
|
+
<h2>
|
26
|
+
<a href="./index.html" rel="home">Home</a>
|
27
|
+
</h2>
|
28
|
+
|
29
|
+
<div id="table-of-contents-navigation">
|
30
|
+
<a href="./table_of_contents.html#pages">Pages</a>
|
31
|
+
<a href="./table_of_contents.html#classes">Classes</a>
|
32
|
+
<a href="./table_of_contents.html#methods">Methods</a>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
|
36
|
+
|
37
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
38
|
+
<form action="#" method="get" accept-charset="utf-8">
|
39
|
+
<div id="search-field-wrapper">
|
40
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
41
|
+
aria-autocomplete="list" aria-controls="search-results"
|
42
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
43
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<ul id="search-results" aria-label="Search Results"
|
47
|
+
aria-busy="false" aria-expanded="false"
|
48
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
49
|
+
</form>
|
50
|
+
</div>
|
51
|
+
|
52
|
+
</div>
|
53
|
+
|
54
|
+
<div id="project-metadata">
|
55
|
+
<div id="fileindex-section" class="nav-section">
|
56
|
+
<h3>Pages</h3>
|
57
|
+
|
58
|
+
<ul class="link-list">
|
59
|
+
|
60
|
+
<li><a href="./CODE_OF_CONDUCT_md.html">CODE_OF_CONDUCT</a>
|
61
|
+
|
62
|
+
<li><a href="./Gemfile.html">Gemfile</a>
|
63
|
+
|
64
|
+
<li><a href="./Gemfile_lock.html">Gemfile.lock</a>
|
65
|
+
|
66
|
+
<li><a href="./Guardfile.html">Guardfile</a>
|
67
|
+
|
68
|
+
<li><a href="./LICENSE_txt.html">LICENSE</a>
|
69
|
+
|
70
|
+
<li><a href="./README_md.html">README</a>
|
71
|
+
|
72
|
+
<li><a href="./Rakefile.html">Rakefile</a>
|
73
|
+
|
74
|
+
<li><a href="./bin/setup.html">setup</a>
|
75
|
+
|
76
|
+
<li><a href="./dieta_gemspec.html">dieta.gemspec</a>
|
77
|
+
|
78
|
+
</ul>
|
79
|
+
</div>
|
80
|
+
|
81
|
+
<div id="classindex-section" class="nav-section">
|
82
|
+
<h3>Class and Module Index</h3>
|
83
|
+
|
84
|
+
<ul class="link-list">
|
85
|
+
|
86
|
+
<li><a href="./Dieta.html">Dieta</a>
|
87
|
+
|
88
|
+
<li><a href="./Dietas.html">Dietas</a>
|
89
|
+
|
90
|
+
<li><a href="./Lista.html">Lista</a>
|
91
|
+
|
92
|
+
<li><a href="./Menu.html">Menu</a>
|
93
|
+
|
94
|
+
<li><a href="./Menu_alimento.html">Menu_alimento</a>
|
95
|
+
|
96
|
+
<li><a href="./Menu_edad.html">Menu_edad</a>
|
97
|
+
|
98
|
+
<li><a href="./Object.html">Object</a>
|
99
|
+
|
100
|
+
<li><a href="./Plato.html">Plato</a>
|
101
|
+
|
102
|
+
</ul>
|
103
|
+
</div>
|
104
|
+
|
105
|
+
</div>
|
106
|
+
</nav>
|
107
|
+
|
108
|
+
<main role="main">
|
109
|
+
<p>This is the API documentation for RDoc Documentation.
|
110
|
+
</main>
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
<footer id="validator-badges" role="contentinfo">
|
115
|
+
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
116
|
+
<p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.1.
|
117
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
118
|
+
</footer>
|
119
|
+
|
@@ -0,0 +1,161 @@
|
|
1
|
+
/**
|
2
|
+
*
|
3
|
+
* Darkfish Page Functions
|
4
|
+
* $Id: darkfish.js 53 2009-01-07 02:52:03Z deveiant $
|
5
|
+
*
|
6
|
+
* Author: Michael Granger <mgranger@laika.com>
|
7
|
+
*
|
8
|
+
*/
|
9
|
+
|
10
|
+
/* Provide console simulation for firebug-less environments */
|
11
|
+
if (!("console" in window) || !("firebug" in console)) {
|
12
|
+
var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml",
|
13
|
+
"group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
|
14
|
+
|
15
|
+
window.console = {};
|
16
|
+
for (var i = 0; i < names.length; ++i)
|
17
|
+
window.console[names[i]] = function() {};
|
18
|
+
};
|
19
|
+
|
20
|
+
|
21
|
+
/**
|
22
|
+
* Unwrap the first element that matches the given @expr@ from the targets and return them.
|
23
|
+
*/
|
24
|
+
$.fn.unwrap = function( expr ) {
|
25
|
+
return this.each( function() {
|
26
|
+
$(this).parents( expr ).eq( 0 ).after( this ).remove();
|
27
|
+
});
|
28
|
+
};
|
29
|
+
|
30
|
+
|
31
|
+
function showSource( e ) {
|
32
|
+
var target = e.target;
|
33
|
+
var codeSections = $(target).
|
34
|
+
parents('.method-detail').
|
35
|
+
find('.method-source-code');
|
36
|
+
|
37
|
+
$(target).
|
38
|
+
parents('.method-detail').
|
39
|
+
find('.method-source-code').
|
40
|
+
slideToggle();
|
41
|
+
};
|
42
|
+
|
43
|
+
function hookSourceViews() {
|
44
|
+
$('.method-heading').click( showSource );
|
45
|
+
};
|
46
|
+
|
47
|
+
function hookSearch() {
|
48
|
+
var input = $('#search-field').eq(0);
|
49
|
+
var result = $('#search-results').eq(0);
|
50
|
+
$(result).show();
|
51
|
+
|
52
|
+
var search_section = $('#search-section').get(0);
|
53
|
+
$(search_section).show();
|
54
|
+
|
55
|
+
var search = new Search(search_data, input, result);
|
56
|
+
|
57
|
+
search.renderItem = function(result) {
|
58
|
+
var li = document.createElement('li');
|
59
|
+
var html = '';
|
60
|
+
|
61
|
+
// TODO add relative path to <script> per-page
|
62
|
+
html += '<p class="search-match"><a href="' + rdoc_rel_prefix + result.path + '">' + this.hlt(result.title);
|
63
|
+
if (result.params)
|
64
|
+
html += '<span class="params">' + result.params + '</span>';
|
65
|
+
html += '</a>';
|
66
|
+
|
67
|
+
|
68
|
+
if (result.namespace)
|
69
|
+
html += '<p class="search-namespace">' + this.hlt(result.namespace);
|
70
|
+
|
71
|
+
if (result.snippet)
|
72
|
+
html += '<div class="search-snippet">' + result.snippet + '</div>';
|
73
|
+
|
74
|
+
li.innerHTML = html;
|
75
|
+
|
76
|
+
return li;
|
77
|
+
}
|
78
|
+
|
79
|
+
search.select = function(result) {
|
80
|
+
var result_element = result.get(0);
|
81
|
+
window.location.href = result_element.firstChild.firstChild.href;
|
82
|
+
}
|
83
|
+
|
84
|
+
search.scrollIntoView = search.scrollInWindow;
|
85
|
+
};
|
86
|
+
|
87
|
+
function highlightTarget( anchor ) {
|
88
|
+
console.debug( "Highlighting target '%s'.", anchor );
|
89
|
+
|
90
|
+
$("a[name]").each( function() {
|
91
|
+
if ( $(this).attr("name") == anchor ) {
|
92
|
+
if ( !$(this).parent().parent().hasClass('target-section') ) {
|
93
|
+
console.debug( "Wrapping the target-section" );
|
94
|
+
$('div.method-detail').unwrap( 'div.target-section' );
|
95
|
+
$(this).parent().wrap( '<div class="target-section"></div>' );
|
96
|
+
} else {
|
97
|
+
console.debug( "Already wrapped." );
|
98
|
+
}
|
99
|
+
}
|
100
|
+
});
|
101
|
+
};
|
102
|
+
|
103
|
+
function highlightLocationTarget() {
|
104
|
+
console.debug( "Location hash: %s", window.location.hash );
|
105
|
+
if ( ! window.location.hash || window.location.hash.length == 0 ) return;
|
106
|
+
|
107
|
+
var anchor = window.location.hash.substring(1);
|
108
|
+
console.debug( "Found anchor: %s; matching %s", anchor, "a[name=" + anchor + "]" );
|
109
|
+
|
110
|
+
highlightTarget( anchor );
|
111
|
+
};
|
112
|
+
|
113
|
+
function highlightClickTarget( event ) {
|
114
|
+
console.debug( "Highlighting click target for event %o", event.target );
|
115
|
+
try {
|
116
|
+
var anchor = $(event.target).attr( 'href' ).substring(1);
|
117
|
+
console.debug( "Found target anchor: %s", anchor );
|
118
|
+
highlightTarget( anchor );
|
119
|
+
} catch ( err ) {
|
120
|
+
console.error( "Exception while highlighting: %o", err );
|
121
|
+
};
|
122
|
+
};
|
123
|
+
|
124
|
+
function loadAsync(path, success) {
|
125
|
+
$.ajax({
|
126
|
+
url: rdoc_rel_prefix + path,
|
127
|
+
dataType: 'script',
|
128
|
+
success: success,
|
129
|
+
cache: true
|
130
|
+
});
|
131
|
+
};
|
132
|
+
|
133
|
+
$(document).ready( function() {
|
134
|
+
hookSourceViews();
|
135
|
+
highlightLocationTarget();
|
136
|
+
$('ul.link-list a').bind( "click", highlightClickTarget );
|
137
|
+
|
138
|
+
var search_scripts_loaded = {
|
139
|
+
navigation_loaded: false,
|
140
|
+
search_loaded: false,
|
141
|
+
search_index_loaded: false,
|
142
|
+
searcher_loaded: false,
|
143
|
+
}
|
144
|
+
|
145
|
+
var search_success_function = function(variable) {
|
146
|
+
return (function (data, status, xhr) {
|
147
|
+
search_scripts_loaded[variable] = true;
|
148
|
+
|
149
|
+
if (search_scripts_loaded['navigation_loaded'] == true &&
|
150
|
+
search_scripts_loaded['search_loaded'] == true &&
|
151
|
+
search_scripts_loaded['search_index_loaded'] == true &&
|
152
|
+
search_scripts_loaded['searcher_loaded'] == true)
|
153
|
+
hookSearch();
|
154
|
+
});
|
155
|
+
}
|
156
|
+
|
157
|
+
loadAsync('js/navigation.js', search_success_function('navigation_loaded'));
|
158
|
+
loadAsync('js/search.js', search_success_function('search_loaded'));
|
159
|
+
loadAsync('js/search_index.js', search_success_function('search_index_loaded'));
|
160
|
+
loadAsync('js/searcher.js', search_success_function('searcher_loaded'));
|
161
|
+
});
|