production controller retrie production menu links list, fixed js drupalSettings bug
This commit is contained in:
@@ -65,8 +65,7 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
// TODO: drupal settings not defined on NOT front page
|
||||
var path = window.location.origin + drupalSettings.basepath + sys_path +'/ajax';
|
||||
var path = window.location.origin + drupalSettings.path.baseUrl + sys_path +'/ajax';
|
||||
closeAllModals();
|
||||
_$body.addClass('ajax-loading');
|
||||
$link.addClass('ajax-loading');
|
||||
@@ -81,7 +80,13 @@
|
||||
console.log('ajax link loaded : data', data);
|
||||
_$content_container.html(data.rendered);
|
||||
_$body.removeClass('ajax-loading');
|
||||
_$body.removeClass().addClass('path-'+sys_path);
|
||||
// add body class for currently loaded content
|
||||
_$body.removeClass().addClass('path-'+sys_path.replace(/\//g, '-'));
|
||||
// id node add a generic path-node class to body
|
||||
m = sys_path.match(/^\/?(edlp\/node\/\d+)$/g);
|
||||
if(m){
|
||||
_$body.addClass('path-edlp-node');
|
||||
}
|
||||
_$ajaxLinks.removeClass('is-active');
|
||||
$link.removeClass('ajax-loading').addClass('is-active');
|
||||
initScrollbars();
|
||||
|
||||
Reference in New Issue
Block a user