diff options
author | Marc MERLIN <merlin@chromium.org> | 2014-03-07 18:29:50 -0800 |
---|---|---|
committer | Marc MERLIN <merlin@chromium.org> | 2014-03-10 20:06:41 +0000 |
commit | 6f3d4ed823c2c0f7ffa615561df5e639542baac8 (patch) | |
tree | fbb3b2efeb6865d86427b9cbc66073bb905df823 /licensing | |
parent | f4017ad20650b9b2a59af753c1833029f6307c95 (diff) | |
download | chromite-6f3d4ed823c2c0f7ffa615561df5e639542baac8.tar.gz |
licensing: toogle all licenses in one click.
TEST=generated license file, tested buttons
BUG=chromium:319909
Change-Id: Ic943651367be988edd42a66b2c836372fb05aa93
Reviewed-on: https://chromium-review.googlesource.com/189391
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Marc MERLIN <merlin@chromium.org>
Diffstat (limited to 'licensing')
-rw-r--r-- | licensing/about_credits.tmpl | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/licensing/about_credits.tmpl b/licensing/about_credits.tmpl index 3e3018278..5a891d4a6 100644 --- a/licensing/about_credits.tmpl +++ b/licensing/about_credits.tmpl @@ -59,7 +59,6 @@ body { </style> <script> //<![CDATA[ -function $(o) {return document.getElementById(o);} function toggle(o) { var licence = o.nextSibling; @@ -67,7 +66,10 @@ function toggle(o) { if (!licence) return false; licence = licence.nextSibling; } + toggleblock(licence, o); +} +function toggleblock(licence, o) { if (licence.style && licence.style.display == 'block') { licence.style.display = 'none'; o.innerHTML = 'show license text'; @@ -77,12 +79,22 @@ function toggle(o) { } return false; } + +function toggleall() { + var a = window.document.getElementsByClassName('licence'); + for (var i = 0; i < a.length; i++) { + toggleblock(a[i], a[i].previousSibling.previousSibling.previousSibling.previousSibling); + } +} //]]> </script> </head> <body> <span class="page-title" style="float:left;">Credits</span> -<a href="javascript:window.print();" style="float:right;">Print</a> +<span style="float:right"> +<a href="javascript:toggleall()">Toggle All</a> +<a href="javascript:window.print();">Print</a> +</span> <div style="clear:both; overflow:auto;"> <h2>List of Packages used in Google Chrome OS:</h2> <!-- Chromium <3s the following projects --> |