|
@@ -9,12 +9,15 @@
|
|
|
2015
|
|
|
*/
|
|
|
|
|
|
+
|
|
|
jQuery(document).ready(function($) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
+
|
|
|
var _debug = false,
|
|
|
_avgDelay = 1,
|
|
|
_lastDraw = new Date,
|
|
@@ -344,24 +347,33 @@ jQuery(document).ready(function($) {
|
|
|
};
|
|
|
|
|
|
function initHashNav(){
|
|
|
+
|
|
|
if(window.location.hash !== ''){
|
|
|
|
|
|
var p = window.location.hash.match('^#principe-([0-9]+)$');
|
|
|
|
|
|
if(p){
|
|
|
-
|
|
|
- setTimeout((function(nid){
|
|
|
- $('li.node-readmore a[href="/node/'+nid+'"]', 'section#node-'+nid).trigger('click').delay(1000).trigger('click');
|
|
|
- }(p[1])), 500);
|
|
|
- }else{
|
|
|
- var h = window.location.hash.match('^#(.+)$');
|
|
|
-
|
|
|
+ var hash = $('li.node-readmore a', 'section#node-'+p[1]).attr('href');
|
|
|
+ updateHash(hash);
|
|
|
+ }
|
|
|
+
|
|
|
+ var page = window.location.hash.match('^#/page/.+$');
|
|
|
+ var h = window.location.hash.match('^#(.+)$');
|
|
|
+
|
|
|
+ if(page){
|
|
|
setTimeout((function(href){
|
|
|
$('a[href="'+href+'"]', '#block-menu-menu-footer-menu').trigger('click');
|
|
|
- }(h[1])), 500);
|
|
|
+ }(h[1])), 100);
|
|
|
+ }else{
|
|
|
+ setTimeout((function(href){
|
|
|
+ $('li.node-readmore a[href="'+href+'"]', 'section.node-chapitre').trigger('click').delay(1000).trigger('click');
|
|
|
+ }(h[1])), 100);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
+
|
|
|
};
|
|
|
|
|
|
_____ _____ _____ _____ _____ _____ _____
|
|
@@ -427,6 +439,7 @@ jQuery(document).ready(function($) {
|
|
|
this.e = e;
|
|
|
this.$e = $(e);
|
|
|
this.nid = this.$e.attr("id").match(/^node-(\d+)/)[1];
|
|
|
+ this.hashref = $('li.node-readmore a', e).attr('href');
|
|
|
this.geom = {
|
|
|
base_a:base_a,
|
|
|
a:0,
|
|
@@ -789,10 +802,10 @@ jQuery(document).ready(function($) {
|
|
|
|
|
|
|
|
|
Chapter.prototype.loadNode = function(e){
|
|
|
- console.log("Chapter :: open : nid", this.nid);
|
|
|
+ console.log("Chapter :: open : e", e);
|
|
|
|
|
|
|
|
|
- updateHash("principe-"+this.nid);
|
|
|
+ updateHash(this.hashref);
|
|
|
|
|
|
_$body.addClass('loading');
|
|
|
|