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/10 20:11:37 UTC
svn commit: r1336817 - /jena/site/trunk/content/js/jena-navigation.js
Author: ijd
Date: Thu May 10 18:11:37 2012
New Revision: 1336817
URL: http://svn.apache.org/viewvc?rev=1336817&view=rev
Log:
Fix bug in section determiner
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=1336817&r1=1336816&r2=1336817&view=diff
==============================================================================
--- jena/site/trunk/content/js/jena-navigation.js (original)
+++ jena/site/trunk/content/js/jena-navigation.js Thu May 10 18:11:37 2012
@@ -49,18 +49,19 @@ var JenaNavigation = function() {
*/
var getLocation = function() {
var url = checkForDefaultPage();
- if (url.match( /\/index.html$/ )) {
- currentSection.fileName = "about-jena";
- currentPage.fileName = "index.html";
- }
- else {
- var matches = url.match( /^.*jena.apache.org\/([^\/]*)\/(.*)$/ );
+ var matches = url.match( /^.*jena.*apache\.org\/([^\/]*)\/(.*)$/ );
+
+ if (matches) {
currentSection.fileName = matches[1];
currentPage.fileName = matches[2];
}
+ else {
+ currentSection.fileName = "about-jena";
+ currentPage.fileName = "index.html";
+ }
- currentPage.title = asTitle( currentPage.fileName.replace( /.html$/, '' ) );
currentSection.title = asTitle( currentSection.fileName );
+ currentPage.title = asTitle( currentPage.fileName.replace( /.html$/, '' ) );
};
/**