From 72f2e9e9f3116accd3f977d222597dc64927745f Mon Sep 17 00:00:00 2001
From: ebremner <ebremner@uwaterloo.ca>
Date: Tue, 15 Jun 2021 11:51:56 -0400
Subject: [PATCH] ISTWCMS-4704: updating js to include view contact

---
 js/component_scripts.min.js | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/js/component_scripts.min.js b/js/component_scripts.min.js
index bcc0831f..35167cdd 100644
--- a/js/component_scripts.min.js
+++ b/js/component_scripts.min.js
@@ -592,3 +592,31 @@ else {
         }
     }
 })(jQuery, document, Drupal);
+
+/**
+ * @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);
-- 
GitLab