Mercurial > repos > scottx611x > qualimap2_bamqc
annotate test-data/test_stats/css/doctools.js @ 30:418ee04dd1b2 draft
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
author | scottx611x |
---|---|
date | Thu, 26 Jul 2018 16:40:19 -0400 |
parents | |
children |
rev | line source |
---|---|
30
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
1 /* |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
2 * doctools.js |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
3 * ~~~~~~~~~~~ |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
4 * |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
5 * Sphinx JavaScript utilities for all documentation. |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
6 * |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
7 * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
8 * :license: BSD, see LICENSE for details. |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
9 * |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
10 */ |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
11 |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
12 /** |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
13 * select a different prefix for underscore |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
14 */ |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
15 $u = _.noConflict(); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
16 |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
17 /** |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
18 * make the code below compatible with browsers without |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
19 * an installed firebug like debugger |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
20 if (!window.console || !console.firebug) { |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
21 var names = ["log", "debug", "info", "warn", "error", "assert", "dir", |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
22 "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
23 "profile", "profileEnd"]; |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
24 window.console = {}; |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
25 for (var i = 0; i < names.length; ++i) |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
26 window.console[names[i]] = function() {}; |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
27 } |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
28 */ |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
29 |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
30 /** |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
31 * small helper function to urldecode strings |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
32 */ |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
33 jQuery.urldecode = function(x) { |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
34 return decodeURIComponent(x).replace(/\+/g, ' '); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
35 } |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
36 |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
37 /** |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
38 * small helper function to urlencode strings |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
39 */ |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
40 jQuery.urlencode = encodeURIComponent; |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
41 |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
42 /** |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
43 * This function returns the parsed url parameters of the |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
44 * current request. Multiple values per key are supported, |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
45 * it will always return arrays of strings for the value parts. |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
46 */ |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
47 jQuery.getQueryParameters = function(s) { |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
48 if (typeof s == 'undefined') |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
49 s = document.location.search; |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
50 var parts = s.substr(s.indexOf('?') + 1).split('&'); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
51 var result = {}; |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
52 for (var i = 0; i < parts.length; i++) { |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
53 var tmp = parts[i].split('=', 2); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
54 var key = jQuery.urldecode(tmp[0]); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
55 var value = jQuery.urldecode(tmp[1]); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
56 if (key in result) |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
57 result[key].push(value); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
58 else |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
59 result[key] = [value]; |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
60 } |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
61 return result; |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
62 }; |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
63 |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
64 /** |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
65 * small function to check if an array contains |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
66 * a given item. |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
67 */ |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
68 jQuery.contains = function(arr, item) { |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
69 for (var i = 0; i < arr.length; i++) { |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
70 if (arr[i] == item) |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
71 return true; |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
72 } |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
73 return false; |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
74 }; |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
75 |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
76 /** |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
77 * highlight a given string on a jquery object by wrapping it in |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
78 * span elements with the given class name. |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
79 */ |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
80 jQuery.fn.highlightText = function(text, className) { |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
81 function highlight(node) { |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
82 if (node.nodeType == 3) { |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
83 var val = node.nodeValue; |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
84 var pos = val.toLowerCase().indexOf(text); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
85 if (pos >= 0 && !jQuery(node.parentNode).hasClass(className)) { |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
86 var span = document.createElement("span"); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
87 span.className = className; |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
88 span.appendChild(document.createTextNode(val.substr(pos, text.length))); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
89 node.parentNode.insertBefore(span, node.parentNode.insertBefore( |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
90 document.createTextNode(val.substr(pos + text.length)), |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
91 node.nextSibling)); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
92 node.nodeValue = val.substr(0, pos); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
93 } |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
94 } |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
95 else if (!jQuery(node).is("button, select, textarea")) { |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
96 jQuery.each(node.childNodes, function() { |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
97 highlight(this); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
98 }); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
99 } |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
100 } |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
101 return this.each(function() { |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
102 highlight(this); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
103 }); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
104 }; |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
105 |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
106 /** |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
107 * Small JavaScript module for the documentation. |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
108 */ |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
109 var Documentation = { |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
110 |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
111 init : function() { |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
112 this.fixFirefoxAnchorBug(); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
113 this.highlightSearchWords(); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
114 this.initIndexTable(); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
115 }, |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
116 |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
117 /** |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
118 * i18n support |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
119 */ |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
120 TRANSLATIONS : {}, |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
121 PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; }, |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
122 LOCALE : 'unknown', |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
123 |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
124 // gettext and ngettext don't access this so that the functions |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
125 // can safely bound to a different name (_ = Documentation.gettext) |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
126 gettext : function(string) { |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
127 var translated = Documentation.TRANSLATIONS[string]; |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
128 if (typeof translated == 'undefined') |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
129 return string; |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
130 return (typeof translated == 'string') ? translated : translated[0]; |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
131 }, |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
132 |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
133 ngettext : function(singular, plural, n) { |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
134 var translated = Documentation.TRANSLATIONS[singular]; |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
135 if (typeof translated == 'undefined') |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
136 return (n == 1) ? singular : plural; |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
137 return translated[Documentation.PLURALEXPR(n)]; |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
138 }, |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
139 |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
140 addTranslations : function(catalog) { |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
141 for (var key in catalog.messages) |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
142 this.TRANSLATIONS[key] = catalog.messages[key]; |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
143 this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
144 this.LOCALE = catalog.locale; |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
145 }, |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
146 |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
147 /** |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
148 * add context elements like header anchor links |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
149 */ |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
150 addContextElements : function() { |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
151 $('div[id] > :header:first').each(function() { |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
152 $('<a class="headerlink">\u00B6</a>'). |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
153 attr('href', '#' + this.id). |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
154 attr('title', _('Permalink to this headline')). |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
155 appendTo(this); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
156 }); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
157 $('dt[id]').each(function() { |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
158 $('<a class="headerlink">\u00B6</a>'). |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
159 attr('href', '#' + this.id). |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
160 attr('title', _('Permalink to this definition')). |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
161 appendTo(this); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
162 }); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
163 }, |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
164 |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
165 /** |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
166 * workaround a firefox stupidity |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
167 */ |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
168 fixFirefoxAnchorBug : function() { |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
169 if (document.location.hash && $.browser.mozilla) |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
170 window.setTimeout(function() { |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
171 document.location.href += ''; |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
172 }, 10); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
173 }, |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
174 |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
175 /** |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
176 * highlight the search words provided in the url in the text |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
177 */ |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
178 highlightSearchWords : function() { |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
179 var params = $.getQueryParameters(); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
180 var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
181 if (terms.length) { |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
182 var body = $('div.body'); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
183 window.setTimeout(function() { |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
184 $.each(terms, function() { |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
185 body.highlightText(this.toLowerCase(), 'highlighted'); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
186 }); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
187 }, 10); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
188 $('<p class="highlight-link"><a href="javascript:Documentation.' + |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
189 'hideSearchWords()">' + _('Hide Search Matches') + '</a></p>') |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
190 .appendTo($('#searchbox')); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
191 } |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
192 }, |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
193 |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
194 /** |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
195 * init the domain index toggle buttons |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
196 */ |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
197 initIndexTable : function() { |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
198 var togglers = $('img.toggler').click(function() { |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
199 var src = $(this).attr('src'); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
200 var idnum = $(this).attr('id').substr(7); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
201 $('tr.cg-' + idnum).toggle(); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
202 if (src.substr(-9) == 'minus.png') |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
203 $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
204 else |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
205 $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
206 }).css('display', ''); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
207 if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
208 togglers.click(); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
209 } |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
210 }, |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
211 |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
212 /** |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
213 * helper function to hide the search marks again |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
214 */ |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
215 hideSearchWords : function() { |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
216 $('#searchbox .highlight-link').fadeOut(300); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
217 $('span.highlighted').removeClass('highlighted'); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
218 }, |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
219 |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
220 /** |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
221 * make the url absolute |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
222 */ |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
223 makeURL : function(relativeURL) { |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
224 return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
225 }, |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
226 |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
227 /** |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
228 * get the current relative url |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
229 */ |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
230 getCurrentURL : function() { |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
231 var path = document.location.pathname; |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
232 var parts = path.split(/\//); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
233 $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
234 if (this == '..') |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
235 parts.pop(); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
236 }); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
237 var url = parts.join('/'); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
238 return path.substring(url.lastIndexOf('/') + 1, path.length - 1); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
239 } |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
240 }; |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
241 |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
242 // quick alias for translations |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
243 _ = Documentation.gettext; |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
244 |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
245 $(document).ready(function() { |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
246 Documentation.init(); |
418ee04dd1b2
planemo upload for repository https://github.com/scottx611x/qualimap2 commit dc78b7c4b1780b316ca4aba2be247969ac1100ec-dirty
scottx611x
parents:
diff
changeset
|
247 }); |