Skip to content
Snippets Groups Projects
Commit eca7078e authored by Fabian de Rijk's avatar Fabian de Rijk
Browse files

Fixed tabs

parent dc5bbf4e
No related branches found
No related tags found
No related merge requests found
......@@ -78,8 +78,7 @@ function fortytwo_preprocess_html(array &$variables) {
($variables['responsive_identifier']) ? $classes[] = 'show-responsive-identifier' : FALSE;
// Set edit tabs.
$variables['ft_layout_tabs'] = theme_get_setting('ft_layout_tabs');
($variables['ft_layout_tabs'] && $user->isAuthenticated()) ? $classes[] = 'ft-tabs' : FALSE;
($user->isAuthenticated()) ? $classes[] = 'ft-tabs' : FALSE;
// Add the body classes to the attributes array.
if (isset($variables['attributes']['class']) && is_array($variables['attributes']['class'])) {
......
......@@ -32,6 +32,8 @@ function fortytwo_get_staticpath($addprefix = FALSE, $theme_key = 'fortytwo') {
* Add libraries to the theme.
*/
function fortytwo_add_libraries(&$variables) {
$variables['page']['#attached']['library'][] = 'fortytwo/tabs';
$enquire = theme_get_setting('ft_enquire_js');
if (!empty($enquire)) {
$variables['page']['#attached']['library'][] = 'fortytwo/enquire';
......@@ -47,11 +49,6 @@ function fortytwo_add_libraries(&$variables) {
$variables['page']['#attached']['library'][] = 'fortytwo/placeholder';
}
$tabs = theme_get_setting('ft_layout_tabs');
if (!empty($tabs)) {
$variables['page']['#attached']['library'][] = 'fortytwo/tabs';
}
$prettify = theme_get_setting('ft_prettify_js');
if (!empty($prettify)) {
$variables['page']['#attached']['drupalSettings']['fortytwo']['prettify_hide_upload'] = theme_get_setting('ft_prettify_js_hide_upload');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment