|
From: <pe...@us...> - 2012-08-16 07:44:42
|
Revision: 967
http://openautomation.svn.sourceforge.net/openautomation/?rev=967&view=rev
Author: peuter
Date: 2012-08-16 07:44:36 +0000 (Thu, 16 Aug 2012)
Log Message:
-----------
* Fixed Bug: pageActive class gets removed from all pages that are not in the path from the current page up to the root page
Modified Paths:
--------------
CometVisu/trunk/visu/lib/templateengine.js
Modified: CometVisu/trunk/visu/lib/templateengine.js
===================================================================
--- CometVisu/trunk/visu/lib/templateengine.js 2012-08-16 07:35:03 UTC (rev 966)
+++ CometVisu/trunk/visu/lib/templateengine.js 2012-08-16 07:44:36 UTC (rev 967)
@@ -565,7 +565,7 @@
}
});
}
-
+
$('#'+page_id).addClass('pageActive activePage');// show new page
// update visibility ob navbars, top-navigation, footer
updatePageParts($('#'+page_id));
@@ -574,7 +574,7 @@
window.history.pushState(page_id, page_id, window.location.href);
main_scroll.seekTo( $('#'+page_id), speed ); // scroll to it
-
+
// show the navbars for this page
$('#'+page_id+'_top_navbar').addClass('navbarActive');
$('#'+page_id+'_right_navbar').addClass('navbarActive');
@@ -650,6 +650,15 @@
id += '_';
}
$('.nav_path').html( nav );
+ var page_id = path.join('_');
+ // remove unnecessary pageActive´s
+ $('.pageActive').each(function(i) {
+ var pagePath = $(this).attr('id');
+ var expr = new RegExp("^"+pagePath+".*","i");
+ if (pagePath!=page_id && !expr.test(page_id)) {
+ $(this).removeClass('pageActive');
+ }
+ });
}
/*
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|