diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-05 01:41:25 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-09-05 01:41:25 +0000 |
commit | d42d6e690e3f553b971322eae783ac6b0d4d9692 (patch) | |
tree | 2004bf4517ee7b81466c300cf30092e62e65467e /lib/rdoc/generator/template | |
parent | 670c6e8ce9d4a12bb4832e10fab27365398649bf (diff) | |
download | ruby-d42d6e690e3f553b971322eae783ac6b0d4d9692.tar.gz |
* lib/rdoc.rb, lib/rdoc, test/rdoc: Update to RDoc 4.2.0.alpha(313287)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/generator/template')
-rw-r--r-- | lib/rdoc/generator/template/darkfish/_head.rhtml | 17 | ||||
-rw-r--r--[-rwxr-xr-x] | lib/rdoc/generator/template/darkfish/images/add.png | bin | 733 -> 733 bytes | |||
-rw-r--r--[-rwxr-xr-x] | lib/rdoc/generator/template/darkfish/images/arrow_up.png | bin | 372 -> 372 bytes | |||
-rw-r--r--[-rwxr-xr-x] | lib/rdoc/generator/template/darkfish/images/delete.png | bin | 715 -> 715 bytes | |||
-rw-r--r--[-rwxr-xr-x] | lib/rdoc/generator/template/darkfish/images/tag_blue.png | bin | 1880 -> 1880 bytes | |||
-rw-r--r-- | lib/rdoc/generator/template/darkfish/js/darkfish.js | 43 | ||||
-rw-r--r-- | lib/rdoc/generator/template/darkfish/rdoc.css | 12 |
7 files changed, 50 insertions, 22 deletions
diff --git a/lib/rdoc/generator/template/darkfish/_head.rhtml b/lib/rdoc/generator/template/darkfish/_head.rhtml index 062160a751..c87ba95096 100644 --- a/lib/rdoc/generator/template/darkfish/_head.rhtml +++ b/lib/rdoc/generator/template/darkfish/_head.rhtml @@ -2,6 +2,13 @@ <title><%= h @title %></title> +<script type="text/javascript"> + var rdoc_rel_prefix = "<%= rel_prefix %>/"; +</script> + +<script src="<%= asset_rel_prefix %>/js/jquery.js"></script> +<script src="<%= asset_rel_prefix %>/js/darkfish.js"></script> + <link href="<%= asset_rel_prefix %>/fonts.css" rel="stylesheet"> <link href="<%= asset_rel_prefix %>/rdoc.css" rel="stylesheet"> <% if @options.template_stylesheets.flatten.any? then %> @@ -10,13 +17,3 @@ <% end %> <% end %> -<script type="text/javascript"> - var rdoc_rel_prefix = "<%= rel_prefix %>/"; -</script> - -<script src="<%= asset_rel_prefix %>/js/jquery.js"></script> -<script src="<%= asset_rel_prefix %>/js/navigation.js"></script> -<script src="<%= search_index_rel_prefix %>/js/search_index.js"></script> -<script src="<%= asset_rel_prefix %>/js/search.js"></script> -<script src="<%= asset_rel_prefix %>/js/searcher.js"></script> -<script src="<%= asset_rel_prefix %>/js/darkfish.js"></script> diff --git a/lib/rdoc/generator/template/darkfish/images/add.png b/lib/rdoc/generator/template/darkfish/images/add.png Binary files differindex 6332fefea4..6332fefea4 100755..100644 --- a/lib/rdoc/generator/template/darkfish/images/add.png +++ b/lib/rdoc/generator/template/darkfish/images/add.png diff --git a/lib/rdoc/generator/template/darkfish/images/arrow_up.png b/lib/rdoc/generator/template/darkfish/images/arrow_up.png Binary files differindex 1ebb193243..1ebb193243 100755..100644 --- a/lib/rdoc/generator/template/darkfish/images/arrow_up.png +++ b/lib/rdoc/generator/template/darkfish/images/arrow_up.png diff --git a/lib/rdoc/generator/template/darkfish/images/delete.png b/lib/rdoc/generator/template/darkfish/images/delete.png Binary files differindex 08f249365a..08f249365a 100755..100644 --- a/lib/rdoc/generator/template/darkfish/images/delete.png +++ b/lib/rdoc/generator/template/darkfish/images/delete.png diff --git a/lib/rdoc/generator/template/darkfish/images/tag_blue.png b/lib/rdoc/generator/template/darkfish/images/tag_blue.png Binary files differindex 3f02b5f8f8..3f02b5f8f8 100755..100644 --- a/lib/rdoc/generator/template/darkfish/images/tag_blue.png +++ b/lib/rdoc/generator/template/darkfish/images/tag_blue.png diff --git a/lib/rdoc/generator/template/darkfish/js/darkfish.js b/lib/rdoc/generator/template/darkfish/js/darkfish.js index 06fef3b215..b789a65631 100644 --- a/lib/rdoc/generator/template/darkfish/js/darkfish.js +++ b/lib/rdoc/generator/template/darkfish/js/darkfish.js @@ -44,14 +44,6 @@ function hookSourceViews() { $('.method-heading').click( showSource ); }; -function toggleDebuggingSection() { - $('.debugging-section').slideToggle(); -}; - -function hookDebuggingToggle() { - $('#debugging-toggle img').click( toggleDebuggingSection ); -}; - function hookSearch() { var input = $('#search-field').eq(0); var result = $('#search-results').eq(0); @@ -129,12 +121,41 @@ function highlightClickTarget( event ) { }; }; +function loadAsync(path, success) { + $.ajax({ + url: rdoc_rel_prefix + path, + dataType: 'script', + success: success, + cache: true + }); +}; $(document).ready( function() { hookSourceViews(); - hookDebuggingToggle(); - hookSearch(); highlightLocationTarget(); - $('ul.link-list a').bind( "click", highlightClickTarget ); + + var search_scripts_loaded = { + navigation_loaded: false, + search_loaded: false, + search_index_loaded: false, + searcher_loaded: false, + } + + var search_success_function = function(variable) { + return (function (data, status, xhr) { + search_scripts_loaded[variable] = true; + + if (search_scripts_loaded['navigation_loaded'] == true && + search_scripts_loaded['search_loaded'] == true && + search_scripts_loaded['search_index_loaded'] == true && + search_scripts_loaded['searcher_loaded'] == true) + hookSearch(); + }); + } + + loadAsync('js/navigation.js', search_success_function('navigation_loaded')); + loadAsync('js/search.js', search_success_function('search_loaded')); + loadAsync('js/search_index.js', search_success_function('search_index_loaded')); + loadAsync('js/searcher.js', search_success_function('searcher_loaded')); }); diff --git a/lib/rdoc/generator/template/darkfish/rdoc.css b/lib/rdoc/generator/template/darkfish/rdoc.css index 4f22adaae1..2f4dca7e08 100644 --- a/lib/rdoc/generator/template/darkfish/rdoc.css +++ b/lib/rdoc/generator/template/darkfish/rdoc.css @@ -23,12 +23,22 @@ h3 span, h4 span, h5 span, h6 span { + position: relative; + display: none; padding-left: 1em; + line-height: 0; + vertical-align: baseline; font-size: 10px; - vertical-align: super; } +h1 span { top: -1.3em; } +h2 span { top: -1.2em; } +h3 span { top: -1.0em; } +h4 span { top: -0.8em; } +h5 span { top: -0.5em; } +h6 span { top: -0.5em; } + h1:hover span, h2:hover span, h3:hover span, |