started to activate translations ajax nav

This commit is contained in:
Bachir Soussi Chiadmi
2018-04-13 19:23:02 +02:00
parent 0d555a596e
commit 10f68b951d
156 changed files with 21811 additions and 168 deletions
@@ -1,12 +1,13 @@
console.log('EDLP THEME HISTORY.js');
// var edlp is provided by edlp_ajax.module file
if(edlp.redirect){
console.log('history redirect');
console.log('history redirect', edlp);
console.log('window.location', window.location);
window.localStorage.setItem('edlp_origin_path', edlp.sys_path.replace(/^\//, ''));
window.localStorage.setItem('edlp_origin_url', window.location.pathname);
window.localStorage.setItem('edlp_origin_hash', window.location.hash);
// redirect to home
window.location.replace(window.location.origin);
window.location.replace(window.location.origin+'/'+edlp.lang_code);
}else{
console.log('history do not redirect');
}
@@ -371,6 +371,7 @@
$('a.site-name', '#block-edlptheme-branding')
.add('a', '#block-mainnavigation')
.add('a', '.block.language-switcher-language-url')
.add('a', '#block-footer.menu--footer')
.add('a', '#block-productions')
.add('a', 'article.node:not(.node--type-enregistrement) h2.node-title')
@@ -408,6 +409,11 @@
return false;
}
if($link.is('.language-link')){
// TODO load all blocks translated ... :/
// then let load the content
}
// other links
var sys_path = $(this).attr('data-drupal-link-system-path');