From fd874379f93d8f179cc9f353230cb34dadd6ee30 Mon Sep 17 00:00:00 2001 From: randomdan Date: Thu, 31 Mar 2011 14:13:39 +0000 Subject: Minor style and text fixes Move JSs into their own files --- gentoobrowse/css/screen.css | 4 +++ gentoobrowse/js/googletracking.js | 10 ++++++++ gentoobrowse/js/pkgtracking.js | 23 +++++++++++++++++ gentoobrowse/js/tabs.js | 10 ++++++++ gentoobrowse/xslt/base.xslt | 12 +-------- gentoobrowse/xslt/package.xslt | 52 ++++++++------------------------------- 6 files changed, 58 insertions(+), 53 deletions(-) create mode 100644 gentoobrowse/js/googletracking.js create mode 100644 gentoobrowse/js/pkgtracking.js create mode 100644 gentoobrowse/js/tabs.js diff --git a/gentoobrowse/css/screen.css b/gentoobrowse/css/screen.css index 5b59d68..db969c6 100644 --- a/gentoobrowse/css/screen.css +++ b/gentoobrowse/css/screen.css @@ -22,6 +22,9 @@ h2 { margin: 0; font-size: 18px; } +p.summary { + text-align: justify; +} p.error { color: red; } @@ -91,6 +94,7 @@ form.generalForm td input { } .tabstrip { + white-space: nowrap; } .tabbox { margin: 0px; diff --git a/gentoobrowse/js/googletracking.js b/gentoobrowse/js/googletracking.js new file mode 100644 index 0000000..62c38cd --- /dev/null +++ b/gentoobrowse/js/googletracking.js @@ -0,0 +1,10 @@ +var _gaq = _gaq || []; +_gaq.push(['_setAccount', 'UA-19177673-1']); +_gaq.push(['_trackPageview']); + +(function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); +})(); + diff --git a/gentoobrowse/js/pkgtracking.js b/gentoobrowse/js/pkgtracking.js new file mode 100644 index 0000000..a8d9f1b --- /dev/null +++ b/gentoobrowse/js/pkgtracking.js @@ -0,0 +1,23 @@ +function track(pid) +{ + xmlhttp = new XMLHttpRequest(); + xmlhttp.open("POST", "/track", false); + xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded"); + xmlhttp.send("packageid=" + pid); + if (xmlhttp.status == 200) { + document.getElementById("dotrack").style.display = "none"; + document.getElementById("dountrack").style.display = "inline"; + } +} + +function untrack(pid) +{ + xmlhttp = new XMLHttpRequest(); + xmlhttp.open("POST", "/untrack", false); + xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded"); + xmlhttp.send("packageid=" + pid); + if (xmlhttp.status == 200) { + document.getElementById("dountrack").style.display = "none"; + document.getElementById("dotrack").style.display = "inline"; + } +} diff --git a/gentoobrowse/js/tabs.js b/gentoobrowse/js/tabs.js new file mode 100644 index 0000000..c1cd1ae --- /dev/null +++ b/gentoobrowse/js/tabs.js @@ -0,0 +1,10 @@ +function showTab(name) +{ + var children = document.getElementById('tabcontainer').childNodes; + for(var c = 0; c != children.length; c++) { + if (children[c].className == 'tabvisible') { + children[c].className = 'tabhidden'; + } + } + document.getElementById(name).className = 'tabvisible'; +} diff --git a/gentoobrowse/xslt/base.xslt b/gentoobrowse/xslt/base.xslt index a17dea3..d8ecb25 100644 --- a/gentoobrowse/xslt/base.xslt +++ b/gentoobrowse/xslt/base.xslt @@ -13,17 +13,7 @@ - + @@ -122,7 +90,7 @@ -

+

@@ -133,7 +101,7 @@

Dependencies

-

Reverse dependencies

+

Runtime dependencies

Dependees

@@ -217,7 +185,7 @@
- +
    @@ -226,7 +194,7 @@ - +
      -- cgit v1.2.3