my_yard 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (151) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +5 -0
  3. data/doc/GlobalSettings.html +556 -0
  4. data/doc/MyYard.html +1203 -0
  5. data/doc/TreeContext/Alternator.html +301 -0
  6. data/doc/TreeContext.html +471 -0
  7. data/doc/YardTheme.html +750 -0
  8. data/doc/YardThemeDefaults.html +418 -0
  9. data/doc/_index.html +174 -0
  10. data/doc/class_and_method_list.html +842 -0
  11. data/doc/class_list.html +51 -0
  12. data/doc/css/common.css +36 -0
  13. data/doc/css/full_list.css +62 -0
  14. data/doc/css/style.css +476 -0
  15. data/doc/file.README.html +79 -0
  16. data/doc/file_list.html +56 -0
  17. data/doc/frames.html +17 -0
  18. data/doc/index.html +79 -0
  19. data/doc/js/app.js +243 -0
  20. data/doc/js/full_list.js +213 -0
  21. data/doc/js/jquery.js +4 -0
  22. data/doc/just_file_list.html +37 -0
  23. data/doc/method_list.html +835 -0
  24. data/full_list.css +58 -0
  25. data/home_my_yard/templates/visualruby/class/dot/setup.rb +6 -0
  26. data/home_my_yard/templates/visualruby/class/dot/superklass.erb +3 -0
  27. data/home_my_yard/templates/visualruby/class/html/constructor_details.erb +8 -0
  28. data/home_my_yard/templates/visualruby/class/html/setup.rb +1 -0
  29. data/home_my_yard/templates/visualruby/class/html/subclasses.erb +4 -0
  30. data/home_my_yard/templates/visualruby/class/setup.rb +36 -0
  31. data/home_my_yard/templates/visualruby/class/text/setup.rb +11 -0
  32. data/home_my_yard/templates/visualruby/class/text/subclasses.erb +5 -0
  33. data/home_my_yard/templates/visualruby/constant/text/header.erb +11 -0
  34. data/home_my_yard/templates/visualruby/constant/text/setup.rb +3 -0
  35. data/home_my_yard/templates/visualruby/docstring/html/abstract.erb +4 -0
  36. data/home_my_yard/templates/visualruby/docstring/html/deprecated.erb +1 -0
  37. data/home_my_yard/templates/visualruby/docstring/html/index.erb +5 -0
  38. data/home_my_yard/templates/visualruby/docstring/html/note.erb +6 -0
  39. data/home_my_yard/templates/visualruby/docstring/html/private.erb +4 -0
  40. data/home_my_yard/templates/visualruby/docstring/html/returns_void.erb +1 -0
  41. data/home_my_yard/templates/visualruby/docstring/html/text.erb +1 -0
  42. data/home_my_yard/templates/visualruby/docstring/html/todo.erb +6 -0
  43. data/home_my_yard/templates/visualruby/docstring/setup.rb +51 -0
  44. data/home_my_yard/templates/visualruby/docstring/text/abstract.erb +2 -0
  45. data/home_my_yard/templates/visualruby/docstring/text/deprecated.erb +2 -0
  46. data/home_my_yard/templates/visualruby/docstring/text/index.erb +2 -0
  47. data/home_my_yard/templates/visualruby/docstring/text/note.erb +4 -0
  48. data/home_my_yard/templates/visualruby/docstring/text/private.erb +2 -0
  49. data/home_my_yard/templates/visualruby/docstring/text/returns_void.erb +1 -0
  50. data/home_my_yard/templates/visualruby/docstring/text/text.erb +1 -0
  51. data/home_my_yard/templates/visualruby/docstring/text/todo.erb +4 -0
  52. data/home_my_yard/templates/visualruby/fulldoc/html/class_and_method.erb +42 -0
  53. data/home_my_yard/templates/visualruby/fulldoc/html/css/common.css +1 -0
  54. data/home_my_yard/templates/visualruby/fulldoc/html/css/full_list.css +62 -0
  55. data/home_my_yard/templates/visualruby/fulldoc/html/css/style.css +476 -0
  56. data/home_my_yard/templates/visualruby/fulldoc/html/frames.erb +17 -0
  57. data/home_my_yard/templates/visualruby/fulldoc/html/full_list.erb +37 -0
  58. data/home_my_yard/templates/visualruby/fulldoc/html/full_list_class.erb +2 -0
  59. data/home_my_yard/templates/visualruby/fulldoc/html/full_list_file.erb +7 -0
  60. data/home_my_yard/templates/visualruby/fulldoc/html/full_list_method.erb +10 -0
  61. data/home_my_yard/templates/visualruby/fulldoc/html/js/app.js +243 -0
  62. data/home_my_yard/templates/visualruby/fulldoc/html/js/full_list.js +213 -0
  63. data/home_my_yard/templates/visualruby/fulldoc/html/js/jquery.js +4 -0
  64. data/home_my_yard/templates/visualruby/fulldoc/html/just_files.erb +33 -0
  65. data/home_my_yard/templates/visualruby/fulldoc/html/setup.rb +267 -0
  66. data/home_my_yard/templates/visualruby/layout/dot/header.erb +6 -0
  67. data/home_my_yard/templates/visualruby/layout/dot/setup.rb +14 -0
  68. data/home_my_yard/templates/visualruby/layout/html/breadcrumb.erb +11 -0
  69. data/home_my_yard/templates/visualruby/layout/html/files.erb +11 -0
  70. data/home_my_yard/templates/visualruby/layout/html/footer.erb +5 -0
  71. data/home_my_yard/templates/visualruby/layout/html/headers.erb +15 -0
  72. data/home_my_yard/templates/visualruby/layout/html/index.erb +2 -0
  73. data/home_my_yard/templates/visualruby/layout/html/layout.erb +30 -0
  74. data/home_my_yard/templates/visualruby/layout/html/listing.erb +4 -0
  75. data/home_my_yard/templates/visualruby/layout/html/objects.erb +32 -0
  76. data/home_my_yard/templates/visualruby/layout/html/script_setup.erb +4 -0
  77. data/home_my_yard/templates/visualruby/layout/html/search.erb +13 -0
  78. data/home_my_yard/templates/visualruby/layout/html/setup.rb +88 -0
  79. data/home_my_yard/templates/visualruby/method/html/header.erb +17 -0
  80. data/home_my_yard/templates/visualruby/method/setup.rb +3 -0
  81. data/home_my_yard/templates/visualruby/method/text/header.erb +1 -0
  82. data/home_my_yard/templates/visualruby/method_details/html/header.erb +3 -0
  83. data/home_my_yard/templates/visualruby/method_details/html/method_signature.erb +25 -0
  84. data/home_my_yard/templates/visualruby/method_details/html/source.erb +10 -0
  85. data/home_my_yard/templates/visualruby/method_details/setup.rb +10 -0
  86. data/home_my_yard/templates/visualruby/method_details/text/header.erb +10 -0
  87. data/home_my_yard/templates/visualruby/method_details/text/method_signature.erb +12 -0
  88. data/home_my_yard/templates/visualruby/method_details/text/setup.rb +10 -0
  89. data/home_my_yard/templates/visualruby/module/dot/child.erb +1 -0
  90. data/home_my_yard/templates/visualruby/module/dot/dependencies.erb +3 -0
  91. data/home_my_yard/templates/visualruby/module/dot/header.erb +6 -0
  92. data/home_my_yard/templates/visualruby/module/dot/info.erb +14 -0
  93. data/home_my_yard/templates/visualruby/module/dot/setup.rb +14 -0
  94. data/home_my_yard/templates/visualruby/module/html/attribute_details.erb +10 -0
  95. data/home_my_yard/templates/visualruby/module/html/attribute_summary.erb +8 -0
  96. data/home_my_yard/templates/visualruby/module/html/box_info.erb +43 -0
  97. data/home_my_yard/templates/visualruby/module/html/children.erb +8 -0
  98. data/home_my_yard/templates/visualruby/module/html/constant_summary.erb +13 -0
  99. data/home_my_yard/templates/visualruby/module/html/defines.erb +3 -0
  100. data/home_my_yard/templates/visualruby/module/html/header.erb +5 -0
  101. data/home_my_yard/templates/visualruby/module/html/inherited_attributes.erb +14 -0
  102. data/home_my_yard/templates/visualruby/module/html/inherited_constants.erb +8 -0
  103. data/home_my_yard/templates/visualruby/module/html/inherited_methods.erb +19 -0
  104. data/home_my_yard/templates/visualruby/module/html/item_summary.erb +40 -0
  105. data/home_my_yard/templates/visualruby/module/html/method_details_list.erb +9 -0
  106. data/home_my_yard/templates/visualruby/module/html/method_summary.erb +14 -0
  107. data/home_my_yard/templates/visualruby/module/html/methodmissing.erb +12 -0
  108. data/home_my_yard/templates/visualruby/module/html/pre_docstring.erb +1 -0
  109. data/home_my_yard/templates/visualruby/module/setup.rb +164 -0
  110. data/home_my_yard/templates/visualruby/module/text/children.erb +10 -0
  111. data/home_my_yard/templates/visualruby/module/text/class_meths_list.erb +8 -0
  112. data/home_my_yard/templates/visualruby/module/text/extends.erb +8 -0
  113. data/home_my_yard/templates/visualruby/module/text/header.erb +7 -0
  114. data/home_my_yard/templates/visualruby/module/text/includes.erb +8 -0
  115. data/home_my_yard/templates/visualruby/module/text/instance_meths_list.erb +8 -0
  116. data/home_my_yard/templates/visualruby/module/text/setup.rb +12 -0
  117. data/home_my_yard/templates/visualruby/onefile/html/files.erb +5 -0
  118. data/home_my_yard/templates/visualruby/onefile/html/headers.erb +6 -0
  119. data/home_my_yard/templates/visualruby/onefile/html/layout.erb +17 -0
  120. data/home_my_yard/templates/visualruby/onefile/html/readme.erb +3 -0
  121. data/home_my_yard/templates/visualruby/onefile/html/setup.rb +61 -0
  122. data/home_my_yard/templates/visualruby/root/dot/child.erb +3 -0
  123. data/home_my_yard/templates/visualruby/root/dot/setup.rb +5 -0
  124. data/home_my_yard/templates/visualruby/root/html/setup.rb +1 -0
  125. data/home_my_yard/templates/visualruby/tags/html/example.erb +11 -0
  126. data/home_my_yard/templates/visualruby/tags/html/index.erb +3 -0
  127. data/home_my_yard/templates/visualruby/tags/html/option.erb +24 -0
  128. data/home_my_yard/templates/visualruby/tags/html/overload.erb +14 -0
  129. data/home_my_yard/templates/visualruby/tags/html/see.erb +8 -0
  130. data/home_my_yard/templates/visualruby/tags/html/tag.erb +20 -0
  131. data/home_my_yard/templates/visualruby/tags/setup.rb +55 -0
  132. data/home_my_yard/templates/visualruby/tags/text/example.erb +12 -0
  133. data/home_my_yard/templates/visualruby/tags/text/index.erb +1 -0
  134. data/home_my_yard/templates/visualruby/tags/text/option.erb +20 -0
  135. data/home_my_yard/templates/visualruby/tags/text/overload.erb +19 -0
  136. data/home_my_yard/templates/visualruby/tags/text/see.erb +11 -0
  137. data/home_my_yard/templates/visualruby/tags/text/tag.erb +13 -0
  138. data/home_my_yard/themes/visualruby.yaml +36 -0
  139. data/install.md +11 -0
  140. data/my_yard +31 -0
  141. data/my_yard.gemspec +20 -0
  142. data/src/GlobalSettings.rb +22 -0
  143. data/src/MyYard.rb +195 -0
  144. data/src/YardTheme.rb +77 -0
  145. data/src/YardThemeDefaults.rb +100 -0
  146. data/src/glade/MyYard.glade +595 -0
  147. data/src/glade/MyYard.glade~ +595 -0
  148. data/src/glade/YardTheme.glade +791 -0
  149. data/src/glade/YardTheme.glade~ +812 -0
  150. data/style.css +474 -0
  151. metadata +224 -0
@@ -0,0 +1,79 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ File: My Yard
8
+
9
+ &mdash; My Yard
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ pathId = "README";
19
+ relpath = '';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="just_file_list.html"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <!-- <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="_index.html">Index</a> &raquo;
40
+ <span class="title">File: My Yard</span>
41
+
42
+ </div>
43
+
44
+ <div id="search">
45
+
46
+ <a class="full_list_link" id="class_list_link"
47
+ href="class_list.html">
48
+
49
+ <svg width="24" height="24">
50
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
51
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
52
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
53
+ </svg>
54
+ </a>
55
+
56
+ </div>
57
+ <div class="clear"></div>
58
+ </div>
59
+
60
+ <iframe id="search_frame" src=""></iframe>
61
+ -->
62
+ <div id="content"><div id='filecontents'>
63
+ <p>Welcome to my_yard. This will make the awesome document generator, yard,
64
+ awesomer.</p>
65
+ </div></div>
66
+
67
+ <div id="footer">
68
+ Generated on Wed Jul 13 20:52:52 2016 by
69
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
70
+ 0.9.0 (ruby-2.3.0).
71
+ </div>
72
+
73
+ </div>
74
+ <div id="resizer"></div>
75
+ <div class="nav_wrap">
76
+ <iframe id="nav" src="class_and_method_list.html" ></iframe>
77
+ </div>
78
+ </body>
79
+ </html>
@@ -0,0 +1,56 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
5
+ <meta charset="utf-8" />
6
+
7
+ <link rel="stylesheet" href="css/full_list.css" type="text/css" media="screen" charset="utf-8" />
8
+
9
+ <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
10
+
11
+
12
+
13
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
14
+
15
+ <script type="text/javascript" charset="utf-8" src="js/full_list.js"></script>
16
+
17
+
18
+ <title>File List</title>
19
+ <base id="base_target" target="_parent" />
20
+ </head>
21
+ <body>
22
+ <div id="content">
23
+ <div class="fixed_header">
24
+ <h1 id="full_list_header">File List</h1>
25
+ <div id="full_list_nav">
26
+
27
+ <span><a target="_self" href="class_list.html">
28
+ Classes
29
+ </a></span>
30
+
31
+ <span><a target="_self" href="method_list.html">
32
+ Methods
33
+ </a></span>
34
+
35
+ <span><a target="_self" href="file_list.html">
36
+ Files
37
+ </a></span>
38
+
39
+ </div>
40
+
41
+ <div id="search">Search: <input type="text" /></div>
42
+ </div>
43
+
44
+ <ul id="full_list" class="file">
45
+
46
+
47
+ <li id="object_README" class="odd">
48
+ <div class="item"><span class="object_link"><a href="index.html" title="My Yard">My Yard</a></span></div>
49
+ </li>
50
+
51
+
52
+
53
+ </ul>
54
+ </div>
55
+ </body>
56
+ </html>
data/doc/frames.html ADDED
@@ -0,0 +1,17 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>My Yard</title>
6
+ </head>
7
+ <script type="text/javascript" charset="utf-8">
8
+ var match = unescape(window.location.hash).match(/^#!(.+)/);
9
+ var name = match ? match[1] : 'index.html';
10
+ name = name.replace(/^(\w+):\/\//, '').replace(/^\/\//, '');
11
+ window.top.location = name;
12
+ </script>
13
+ <noscript>
14
+ <h1>Oops!</h1>
15
+ <h2>YARD requires JavaScript!</h2>
16
+ </noscript>
17
+ </html>
data/doc/index.html ADDED
@@ -0,0 +1,79 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ File: My Yard
8
+
9
+ &mdash; My Yard
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ pathId = "README";
19
+ relpath = '';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="just_file_list.html"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <!-- <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="_index.html">Index</a> &raquo;
40
+ <span class="title">File: My Yard</span>
41
+
42
+ </div>
43
+
44
+ <div id="search">
45
+
46
+ <a class="full_list_link" id="class_list_link"
47
+ href="class_list.html">
48
+
49
+ <svg width="24" height="24">
50
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
51
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
52
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
53
+ </svg>
54
+ </a>
55
+
56
+ </div>
57
+ <div class="clear"></div>
58
+ </div>
59
+
60
+ <iframe id="search_frame" src=""></iframe>
61
+ -->
62
+ <div id="content"><div id='filecontents'>
63
+ <p>Welcome to my_yard. This will make the awesome document generator, yard,
64
+ awesomer.</p>
65
+ </div></div>
66
+
67
+ <div id="footer">
68
+ Generated on Wed Jul 13 20:52:52 2016 by
69
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
70
+ 0.9.0 (ruby-2.3.0).
71
+ </div>
72
+
73
+ </div>
74
+ <div id="resizer"></div>
75
+ <div class="nav_wrap">
76
+ <iframe id="nav" src="class_and_method_list.html" ></iframe>
77
+ </div>
78
+ </body>
79
+ </html>
data/doc/js/app.js ADDED
@@ -0,0 +1,243 @@
1
+ (function() {
2
+
3
+ var localStorage = {}, sessionStorage = {};
4
+ try { localStorage = window.localStorage; } catch (e) { }
5
+ try { sessionStorage = window.sessionStorage; } catch (e) { }
6
+
7
+ function createSourceLinks() {
8
+ $('.method_details_list .source_code').
9
+ before("<span class='showSource'>[<a href='#' class='toggleSource'>View source</a>]</span>");
10
+ $('.toggleSource').toggle(function() {
11
+ $(this).parent().nextAll('.source_code').slideDown(100);
12
+ $(this).text("Hide source");
13
+ },
14
+ function() {
15
+ $(this).parent().nextAll('.source_code').slideUp(100);
16
+ $(this).text("View source");
17
+ });
18
+ }
19
+
20
+ function createDefineLinks() {
21
+ var tHeight = 0;
22
+ $('.defines').after(" <a href='#' class='toggleDefines'>more...</a>");
23
+ $('.toggleDefines').toggle(function() {
24
+ tHeight = $(this).parent().prev().height();
25
+ $(this).prev().css('display', 'inline');
26
+ $(this).parent().prev().height($(this).parent().height());
27
+ $(this).text("(less)");
28
+ },
29
+ function() {
30
+ $(this).prev().hide();
31
+ $(this).parent().prev().height(tHeight);
32
+ $(this).text("more...");
33
+ });
34
+ }
35
+
36
+ function createFullTreeLinks() {
37
+ var tHeight = 0;
38
+ $('.inheritanceTree').toggle(function() {
39
+ tHeight = $(this).parent().prev().height();
40
+ $(this).parent().toggleClass('showAll');
41
+ $(this).text("(hide)");
42
+ $(this).parent().prev().height($(this).parent().height());
43
+ },
44
+ function() {
45
+ $(this).parent().toggleClass('showAll');
46
+ $(this).parent().prev().height(tHeight);
47
+ $(this).text("show all");
48
+ });
49
+ }
50
+
51
+ function searchFrameButtons() {
52
+ $('.full_list_link').click(function() {
53
+ toggleSearchFrame(this, $(this).attr('href'));
54
+ return false;
55
+ });
56
+ window.addEventListener('message', function(e) {
57
+ if (e.data === 'navEscape') {
58
+ $('#search_frame').slideUp(100);
59
+ $('#search a').removeClass('active inactive');
60
+ $(window).focus();
61
+ }
62
+ });
63
+
64
+ $(window).resize(function() {
65
+ if ($('#search:visible').length === 0) {
66
+ $('#search_frame').slideUp(100);
67
+ $('#search a').removeClass('active inactive');
68
+ $(window).focus();
69
+ }
70
+ });
71
+ }
72
+
73
+ function toggleSearchFrame(id, link) {
74
+ var frame = $('#search_frame');
75
+ $('#search a').removeClass('active').addClass('inactive');
76
+ if (frame.attr('src') === link && frame.css('display') !== "none") {
77
+ frame.slideUp(100);
78
+ $('#search a').removeClass('active inactive');
79
+ }
80
+ else {
81
+ $(id).addClass('active').removeClass('inactive');
82
+ if (frame.attr('src') !== link) frame.attr('src', link);
83
+ frame.slideDown(100);
84
+ }
85
+ }
86
+
87
+ function linkSummaries() {
88
+ $('.summary_signature').click(function() {
89
+ document.location = $(this).find('a').attr('href');
90
+ });
91
+ }
92
+
93
+ function summaryToggle() {
94
+ $('.summary_toggle').click(function(e) {
95
+ e.preventDefault();
96
+ localStorage.summaryCollapsed = $(this).text();
97
+ $('.summary_toggle').each(function() {
98
+ $(this).text($(this).text() == "collapse" ? "expand" : "collapse");
99
+ var next = $(this).parent().parent().nextAll('ul.summary').first();
100
+ if (next.hasClass('compact')) {
101
+ next.toggle();
102
+ next.nextAll('ul.summary').first().toggle();
103
+ }
104
+ else if (next.hasClass('summary')) {
105
+ var list = $('<ul class="summary compact" />');
106
+ list.html(next.html());
107
+ list.find('.summary_desc, .note').remove();
108
+ list.find('a').each(function() {
109
+ $(this).html($(this).find('strong').html());
110
+ $(this).parent().html($(this)[0].outerHTML);
111
+ });
112
+ next.before(list);
113
+ next.toggle();
114
+ }
115
+ });
116
+ return false;
117
+ });
118
+ if (localStorage.summaryCollapsed == "collapse") {
119
+ $('.summary_toggle').first().click();
120
+ } else { localStorage.summaryCollapsed = "expand"; }
121
+ }
122
+
123
+ function generateTOC() {
124
+ if ($('#filecontents').length === 0) return;
125
+ var _toc = $('<ol class="top"></ol>');
126
+ var show = false;
127
+ var toc = _toc;
128
+ var counter = 0;
129
+ var tags = ['h2', 'h3', 'h4', 'h5', 'h6'];
130
+ var i;
131
+ if ($('#filecontents h1').length > 1) tags.unshift('h1');
132
+ for (i = 0; i < tags.length; i++) { tags[i] = '#filecontents ' + tags[i]; }
133
+ var lastTag = parseInt(tags[0][1], 10);
134
+ $(tags.join(', ')).each(function() {
135
+ if ($(this).parents('.method_details .docstring').length != 0) return;
136
+ if (this.id == "filecontents") return;
137
+ show = true;
138
+ var thisTag = parseInt(this.tagName[1], 10);
139
+ if (this.id.length === 0) {
140
+ var proposedId = $(this).attr('toc-id');
141
+ if (typeof(proposedId) != "undefined") this.id = proposedId;
142
+ else {
143
+ var proposedId = $(this).text().replace(/[^a-z0-9-]/ig, '_');
144
+ if ($('#' + proposedId).length > 0) { proposedId += counter; counter++; }
145
+ this.id = proposedId;
146
+ }
147
+ }
148
+ if (thisTag > lastTag) {
149
+ for (i = 0; i < thisTag - lastTag; i++) {
150
+ var tmp = $('<ol/>'); toc.append(tmp); toc = tmp;
151
+ }
152
+ }
153
+ if (thisTag < lastTag) {
154
+ for (i = 0; i < lastTag - thisTag; i++) toc = toc.parent();
155
+ }
156
+ var title = $(this).attr('toc-title');
157
+ if (typeof(title) == "undefined") title = $(this).text();
158
+ toc.append('<li><a href="#' + this.id + '">' + title + '</a></li>');
159
+ lastTag = thisTag;
160
+ });
161
+ if (!show) return;
162
+ html = '<div id="toc"><p class="title hide_toc"><a href="#"><strong>Table of Contents</strong></a></p></div>';
163
+ $('#content').prepend(html);
164
+ $('#toc').append(_toc);
165
+ $('#toc .hide_toc').toggle(function() {
166
+ $('#toc .top').slideUp('fast');
167
+ $('#toc').toggleClass('hidden');
168
+ $('#toc .title small').toggle();
169
+ }, function() {
170
+ $('#toc .top').slideDown('fast');
171
+ $('#toc').toggleClass('hidden');
172
+ $('#toc .title small').toggle();
173
+ });
174
+ }
175
+
176
+ function navResizeFn(e) {
177
+ if (e.which !== 1) {
178
+ navResizeFnStop();
179
+ return;
180
+ }
181
+
182
+ sessionStorage.navWidth = e.pageX.toString();
183
+ $('.nav_wrap').css('width', e.pageX);
184
+ $('.nav_wrap').css('-ms-flex', 'inherit');
185
+ }
186
+
187
+ function navResizeFnStop() {
188
+ $(window).unbind('mousemove', navResizeFn);
189
+ window.removeEventListener('message', navMessageFn, false);
190
+ }
191
+
192
+ function navMessageFn(e) {
193
+ if (e.data.action === 'mousemove') navResizeFn(e.data.event);
194
+ if (e.data.action === 'mouseup') navResizeFnStop();
195
+ }
196
+
197
+ function navResizer() {
198
+ $('#resizer').mousedown(function(e) {
199
+ e.preventDefault();
200
+ $(window).mousemove(navResizeFn);
201
+ window.addEventListener('message', navMessageFn, false);
202
+ });
203
+ $(window).mouseup(navResizeFnStop);
204
+
205
+ if (sessionStorage.navWidth) {
206
+ navResizeFn({which: 1, pageX: parseInt(sessionStorage.navWidth, 10)});
207
+ }
208
+ }
209
+
210
+ function navExpander() {
211
+ var done = false, timer = setTimeout(postMessage, 500);
212
+ function postMessage() {
213
+ if (done) return;
214
+ clearTimeout(timer);
215
+ var opts = { action: 'expand', path: pathId };
216
+ document.getElementById('nav').contentWindow.postMessage(opts, '*');
217
+ done = true;
218
+ }
219
+
220
+ window.addEventListener('message', function(event) {
221
+ if (event.data === 'navReady') postMessage();
222
+ return false;
223
+ }, false);
224
+ }
225
+
226
+ function mainFocus() {
227
+ $('#main')[0].focus();
228
+ }
229
+
230
+ $(document).ready(function() {
231
+ navResizer();
232
+ navExpander();
233
+ createSourceLinks();
234
+ createDefineLinks();
235
+ createFullTreeLinks();
236
+ searchFrameButtons();
237
+ linkSummaries();
238
+ summaryToggle();
239
+ generateTOC();
240
+ mainFocus();
241
+ });
242
+
243
+ })();
@@ -0,0 +1,213 @@
1
+ (function() {
2
+
3
+ var $clicked = $(null);
4
+ var searchTimeout = null;
5
+ var searchCache = [];
6
+ var caseSensitiveMatch = false;
7
+ var ignoreKeyCodeMin = 8;
8
+ var ignoreKeyCodeMax = 46;
9
+ var commandKey = 91;
10
+
11
+ RegExp.escape = function(text) {
12
+ return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
13
+ }
14
+
15
+ function escapeShortcut() {
16
+ $(document).keydown(function(evt) {
17
+ if (evt.which == 27) {
18
+ window.parent.postMessage('navEscape', '*');
19
+ }
20
+ });
21
+ }
22
+
23
+ function navResizer() {
24
+ $(window).mousemove(function(e) {
25
+ window.parent.postMessage({
26
+ action: 'mousemove', event: {pageX: e.pageX, which: e.which}
27
+ }, '*');
28
+ }).mouseup(function(e) {
29
+ window.parent.postMessage({action: 'mouseup'}, '*');
30
+ });
31
+ window.parent.postMessage("navReady", "*");
32
+ }
33
+
34
+ function clearSearchTimeout() {
35
+ clearTimeout(searchTimeout);
36
+ searchTimeout = null;
37
+ }
38
+
39
+ function enableLinks() {
40
+ // load the target page in the parent window
41
+ $('#full_list li').on('click', function(evt) {
42
+ $('#full_list li').removeClass('clicked');
43
+ $clicked = $(this);
44
+ $clicked.addClass('clicked');
45
+
46
+ if (evt.target.tagName === 'A') return true;
47
+
48
+ var elem = $clicked.find('> .item .object_link a')[0];
49
+ var e = evt.originalEvent;
50
+ var newEvent = new MouseEvent(evt.originalEvent.type);
51
+ newEvent.initMouseEvent(e.type, e.canBubble, e.cancelable, e.view, e.detail, e.screenX, e.screenY, e.clientX, e.clientY, e.ctrlKey, e.altKey, e.shiftKey, e.metaKey, e.button, e.relatedTarget);
52
+ elem.dispatchEvent(newEvent);
53
+ });
54
+ }
55
+
56
+ function enableToggles() {
57
+ // show/hide nested classes on toggle click
58
+ $('#full_list a.toggle').on('click', function(evt) {
59
+ evt.stopPropagation();
60
+ evt.preventDefault();
61
+ $(this).parent().parent().toggleClass('collapsed');
62
+ highlight();
63
+ });
64
+ }
65
+
66
+ function populateSearchCache() {
67
+ $('#full_list li .item').each(function() {
68
+ var $node = $(this);
69
+ var $link = $node.find('.object_link a');
70
+ if ($link.length > 0) {
71
+ searchCache.push({
72
+ node: $node,
73
+ link: $link,
74
+ name: $link.text(),
75
+ fullName: $link.attr('title').split(' ')[0]
76
+ });
77
+ }
78
+ });
79
+ }
80
+
81
+ function enableSearch() {
82
+ $('#search input').keyup(function(event) {
83
+ if (ignoredKeyPress(event)) return;
84
+ if (this.value === "") {
85
+ clearSearch();
86
+ } else {
87
+ performSearch(this.value);
88
+ }
89
+ });
90
+
91
+ $('#full_list').after("<div id='noresults' style='display:none'></div>");
92
+ }
93
+
94
+ function ignoredKeyPress(event) {
95
+ if (
96
+ (event.keyCode > ignoreKeyCodeMin && event.keyCode < ignoreKeyCodeMax) ||
97
+ (event.keyCode == commandKey)
98
+ ) {
99
+ return true;
100
+ } else {
101
+ return false;
102
+ }
103
+ }
104
+
105
+ function clearSearch() {
106
+ clearSearchTimeout();
107
+ $('#full_list .found').removeClass('found').each(function() {
108
+ var $link = $(this).find('.object_link a');
109
+ $link.text($link.text());
110
+ });
111
+ $('#full_list, #content').removeClass('insearch');
112
+ $clicked.parents().removeClass('collapsed');
113
+ highlight();
114
+ }
115
+
116
+ function performSearch(searchString) {
117
+ clearSearchTimeout();
118
+ $('#full_list, #content').addClass('insearch');
119
+ $('#noresults').text('').hide();
120
+ partialSearch(searchString, 0);
121
+ }
122
+
123
+ function partialSearch(searchString, offset) {
124
+ var lastRowClass = '';
125
+ var i = null;
126
+ for (i = offset; i < Math.min(offset + 50, searchCache.length); i++) {
127
+ var item = searchCache[i];
128
+ var searchName = (searchString.indexOf('::') != -1 ? item.fullName : item.name);
129
+ var matchString = buildMatchString(searchString);
130
+ var matchRegexp = new RegExp(matchString, caseSensitiveMatch ? "" : "i");
131
+ if (searchName.match(matchRegexp) == null) {
132
+ item.node.removeClass('found');
133
+ item.link.text(item.link.text());
134
+ }
135
+ else {
136
+ item.node.addClass('found');
137
+ item.node.removeClass(lastRowClass).addClass(lastRowClass == 'r1' ? 'r2' : 'r1');
138
+ lastRowClass = item.node.hasClass('r1') ? 'r1' : 'r2';
139
+ item.link.html(item.name.replace(matchRegexp, "<strong>$&</strong>"));
140
+ }
141
+ }
142
+ if(i == searchCache.length) {
143
+ searchDone();
144
+ } else {
145
+ searchTimeout = setTimeout(function() {
146
+ partialSearch(searchString, i);
147
+ }, 0);
148
+ }
149
+ }
150
+
151
+ function searchDone() {
152
+ searchTimeout = null;
153
+ highlight();
154
+ if ($('#full_list li:visible').size() === 0) {
155
+ $('#noresults').text('No results were found.').hide().fadeIn();
156
+ } else {
157
+ $('#noresults').text('').hide();
158
+ }
159
+ $('#content').removeClass('insearch');
160
+ }
161
+
162
+ function buildMatchString(searchString, event) {
163
+ caseSensitiveMatch = searchString.match(/[A-Z]/) != null;
164
+ var regexSearchString = RegExp.escape(searchString);
165
+ if (caseSensitiveMatch) {
166
+ regexSearchString += "|" +
167
+ $.map(searchString.split(''), function(e) { return RegExp.escape(e); }).
168
+ join('.+?');
169
+ }
170
+ return regexSearchString;
171
+ }
172
+
173
+ function highlight() {
174
+ $('#full_list li:visible').each(function(n) {
175
+ $(this).removeClass('even odd').addClass(n % 2 == 0 ? 'odd' : 'even');
176
+ });
177
+ }
178
+
179
+ /**
180
+ * Expands the tree to the target element and its immediate
181
+ * children.
182
+ */
183
+ function expandTo(path) {
184
+ var $target = $(document.getElementById('object_' + path));
185
+ $target.addClass('clicked');
186
+ $target.removeClass('collapsed');
187
+ $target.parentsUntil('#full_list', 'li').removeClass('collapsed');
188
+ if($target[0]) {
189
+ window.scrollTo(window.scrollX, $target.offset().top - 250);
190
+ highlight();
191
+ }
192
+ }
193
+
194
+ function windowEvents(event) {
195
+ var msg = event.data;
196
+ if (msg.action === "expand") {
197
+ expandTo(msg.path);
198
+ }
199
+ return false;
200
+ }
201
+
202
+ window.addEventListener("message", windowEvents, false);
203
+
204
+ $(document).ready(function() {
205
+ escapeShortcut();
206
+ navResizer();
207
+ enableLinks();
208
+ enableToggles();
209
+ populateSearchCache();
210
+ enableSearch();
211
+ });
212
+
213
+ })();