You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by ij...@apache.org on 2012/05/11 10:13:53 UTC
svn commit: r1337051 - /jena/site/trunk/content/js/jena-navigation.js
Author: ijd
Date: Fri May 11 08:13:53 2012
New Revision: 1337051
URL: http://svn.apache.org/viewvc?rev=1337051&view=rev
Log:
Fix for incorrect PE when visiting site root URL
Modified:
jena/site/trunk/content/js/jena-navigation.js
Modified: jena/site/trunk/content/js/jena-navigation.js
URL: http://svn.apache.org/viewvc/jena/site/trunk/content/js/jena-navigation.js?rev=1337051&r1=1337050&r2=1337051&view=diff
==============================================================================
--- jena/site/trunk/content/js/jena-navigation.js (original)
+++ jena/site/trunk/content/js/jena-navigation.js Fri May 11 08:13:53 2012
@@ -48,7 +48,7 @@ var JenaNavigation = function() {
* Identify current page and section.
*/
var getLocation = function() {
- var url = checkForDefaultPage();
+ var url = document.URL;
var matches = url.match( /^.*jena.*apache\.org\/([^\/]*)\/(.*)$/ );
if (matches) {
@@ -56,7 +56,7 @@ var JenaNavigation = function() {
currentPage.fileName = matches[2];
}
else {
- currentSection.fileName = "about-jena";
+ currentSection.fileName = "about_jena";
currentPage.fileName = "index.html";
}
@@ -65,19 +65,6 @@ var JenaNavigation = function() {
};
/**
- * Return the current page url, supplying the default
- * page name if this is the default page
- */
- var checkForDefaultPage = function() {
- var url = document.URL;
- if (!url.match( /.*\.html/ )) {
- // default document
- url = url + (!url.match( /\/$/ ) ? "/" : "") + "index.html";
- }
- return url;
- };
-
- /**
* Hide the irrelevant parts of the side menu. We keep the
* quick links section and the ASF section, and the section
* containing the current page. Also styles the menu to