Skip to content
Snippets Groups Projects
Commit 00d75292 authored by Eric Bremner's avatar Eric Bremner
Browse files

ISTWCMS-4704: adding view modifier for contacts

parent 4fa515a2
No related branches found
No related tags found
1 merge request!66ISTWCMS-4704: adding date component with ability to handle multiple dates and...
/**
* @file
*/
(function ($, Drupal) {
Drupal.behaviors.viewcontact = {
attach: function (context, settings) {
$(document).ready(function () {
$('.uw-contact-expand-all').click(function() {
$('.uw-contact details').each(function() {
console.log($(this));
$(this).attr("open", "");
});
});
$('.uw-contact-collapse-all').click(function() {
$('.uw-contact details').each(function() {
console.log($(this));
$(this).removeAttr("open");
});
});
});
}
};
})(jQuery, Drupal);
{% set content_list = {
'0': {
'text': 'Expand all',
'button_class': 'uw-contact-expand-all',
},
'1': {
'text': 'Collapse all',
'button_class': 'uw-contact-collapse-all',
}
} %}
{% include '@components/tabs/tabs--buttons/tabs--buttons.twig' with {
content_list: content_list,
tabs_modifier_class: 'uw-contact',
modifier_classes: 'uw-contact-button',
} %}
{% include '@components/view/views-view/views-view.twig' with {
attributes: attributes,
css_name: css_name,
css_class: css_class,
header: header,
footer: footer,
rows: rows,
empty: empty,
pager: pager,
exposed: exposed,
feed_icons: feed_icons,
more: more,
title: title,
title_prefix: title_prefix,
title_suffix: title_suffix,
attachment_before: attachment_before,
attachment_after: attachment_after,
dom_id: dom_id,
} %}
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