summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gentoobrowse/css/screen.css4
-rw-r--r--gentoobrowse/js/googletracking.js10
-rw-r--r--gentoobrowse/js/pkgtracking.js23
-rw-r--r--gentoobrowse/js/tabs.js10
-rw-r--r--gentoobrowse/xslt/base.xslt12
-rw-r--r--gentoobrowse/xslt/package.xslt52
6 files changed, 58 insertions, 53 deletions
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 @@
<link rel="search" href="/search" />
<meta http-equiv="content-language" content="en" />
<xsl:call-template name="head" />
- <script type="text/javascript">
- 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);
- })();
- </script>
+ <script language="JavaScript" type="text/javascript" src="/js/googletracking.hs" />
</head>
<body>
<h1>Gentoo Browse</h1>
diff --git a/gentoobrowse/xslt/package.xslt b/gentoobrowse/xslt/package.xslt
index 11eb475..e4c5f46 100644
--- a/gentoobrowse/xslt/package.xslt
+++ b/gentoobrowse/xslt/package.xslt
@@ -6,46 +6,14 @@
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" />
<xsl:template name="head">
- <title><xsl:value-of select="/gentoo/summary/package/pkgname" /> (in <xsl:value-of select="/gentoo/summary/package/catname" />) Package Details - Gentoo Browse</title>
- <meta name="description">
- <xsl:attribute name="content">Gentoo Linux package details for <xsl:value-of select="/gentoo/summary/package/catname" />/<xsl:value-of select="/gentoo/summary/package/pkgname" />: <xsl:value-of select="/gentoo/summary/package/description" /></xsl:attribute>
- </meta>
- <script type="text/javascript">
- 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';
- }
+ <title><xsl:value-of select="/gentoo/summary/package/pkgname" /> (in <xsl:value-of select="/gentoo/summary/package/catname" />) Package Details - Gentoo Browse</title>
+ <meta name="description">
+ <xsl:attribute name="content">Gentoo Linux package details for <xsl:value-of select="/gentoo/summary/package/catname" />/<xsl:value-of select="/gentoo/summary/package/pkgname" />: <xsl:value-of select="/gentoo/summary/package/description" /></xsl:attribute>
+ </meta>
+ <script language="JavaScript" type="text/javascript" src="/js/tabs.js" />
<xsl:if test="count(/gentoo/project2:session/project2:var[@name='loggedInUserID']) != 0">
- 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";
- }
- }
+ <script language="JavaScript" type="text/javascript" src="/js/pkgtracking.js" />
</xsl:if>
- </script>
</xsl:template>
<xsl:template name="content">
<xsl:apply-templates select="/gentoo/summary/package" />
@@ -122,7 +90,7 @@
<xsl:value-of select="description" />
</h3>
<xsl:if test="summary != description and summary != ''">
- <p>
+ <p class="summary">
<xsl:value-of select="summary" />
</p>
</xsl:if>
@@ -133,7 +101,7 @@
<h3 class="tabhandle"><a href="javascript:showTab('deps');">Dependencies</a></h3>
</xsl:if>
<xsl:if test="count(/gentoo/summary/package/rdeps/package) &gt; 0">
- <h3 class="tabhandle"><a href="javascript:showTab('rdeps');">Reverse dependencies</a></h3>
+ <h3 class="tabhandle"><a href="javascript:showTab('rdeps');">Runtime dependencies</a></h3>
</xsl:if>
<xsl:if test="count(/gentoo/summary/package/depees/package) &gt; 0">
<h3 class="tabhandle"><a href="javascript:showTab('depees');">Dependees</a></h3>
@@ -217,7 +185,7 @@
</xsl:if>
</xsl:template>
- <!-- Package reverse dependencies -->
+ <!-- Package runtime dependencies -->
<xsl:template match="/gentoo/summary/package/rdeps">
<xsl:if test="count(/gentoo/summary/package/rdeps/package) &gt; 0">
<ul class="tabhidden" id="rdeps">
@@ -226,7 +194,7 @@
</xsl:if>
</xsl:template>
- <!-- Package reverse dependencies -->
+ <!-- Package dependees -->
<xsl:template match="/gentoo/summary/package/depees">
<xsl:if test="count(/gentoo/summary/package/depees/package) &gt; 0">
<ul class="tabhidden" id="depees">