You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by bu...@apache.org on 2012/05/10 20:02:05 UTC
svn commit: r817103 - in /websites/staging/jena/trunk/content: ./
js/jena-navigation.js
Author: buildbot
Date: Thu May 10 18:02:04 2012
New Revision: 817103
Log:
Staging update by buildbot for jena
Modified:
websites/staging/jena/trunk/content/ (props changed)
websites/staging/jena/trunk/content/js/jena-navigation.js
Propchange: websites/staging/jena/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Thu May 10 18:02:04 2012
@@ -1 +1 @@
-1336789
+1336816
Modified: websites/staging/jena/trunk/content/js/jena-navigation.js
==============================================================================
--- websites/staging/jena/trunk/content/js/jena-navigation.js (original)
+++ websites/staging/jena/trunk/content/js/jena-navigation.js Thu May 10 18:02:04 2012
@@ -49,17 +49,14 @@ var JenaNavigation = function() {
*/
var getLocation = function() {
var url = checkForDefaultPage();
- if (url.match( /\/jena\/index.html$/ )) {
+ if (url.match( /\/index.html$/ )) {
currentSection.fileName = "about-jena";
currentPage.fileName = "index.html";
}
else {
- var current = url.split( "/" );
- while (current.shift() != "jena") {}
-
- // next is the section ID, rest is the page ID
- currentSection.fileName = current.shift();
- currentPage.fileName = current.join( "/" );
+ var matches = url.match( /^.*jena.apache.org\/([^\/]*)\/(.*)$/ );
+ currentSection.fileName = matches[1];
+ currentPage.fileName = matches[2];
}
currentPage.title = asTitle( currentPage.fileName.replace( /.html$/, '' ) );
@@ -136,7 +133,7 @@ var JenaNavigation = function() {
init : init
};
-}(); // "revealing module" pattern
+}();
// Initialize on load
$(function(){ JenaNavigation.init(); });