started to activate translations ajax nav
This commit is contained in:
@@ -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');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user