ajax nav for productions is working

This commit is contained in:
Bachir Soussi Chiadmi
2018-03-05 18:06:16 +01:00
parent 797015b8a5
commit b64a2b289e
9 changed files with 152 additions and 13 deletions
@@ -10,6 +10,9 @@
function init(){
console.log("EdlpTheme init()");
// TODO: redirect all no-front pages to front with write hash
_$body.on('corpus-map-ready', onCorpusMapReady);
initScrollbars();
initAjaxLinks();
@@ -39,14 +42,14 @@
// TODO: implement history.js
function initAjaxLinks(){
console.log('initAjaxLinks');
$('a', '#block-mainnavigation, #block-footer.menu--footer, #block-productions').addClass('ajax-link');
$('a', '#block-mainnavigation, #block-footer.menu--footer, #block-productions, article.node h2.node-title, .productions-subtree, .productions-parent').addClass('ajax-link');
_$ajaxLinks = $('.ajax-link')
_$ajaxLinks = $('.ajax-link:not(.ajax-enabled)')
.each(function(i,e){
var $this = $(this);
// avoid already ajaxified links
if($this.is('.ajax-enable')) return;
// if($this.is('.ajax-enable')) return;
var sys_path = $this.attr('data-drupal-link-system-path');
if(sys_path){