Skip to content

Commit

Permalink
Merge pull request #273 from nypublicradio/feature/zendesk-widget-BT-823
Browse files Browse the repository at this point in the history
Feature/zendesk widget bt 823
  • Loading branch information
dparrington authored May 13, 2019
2 parents b579bf5 + 9700a63 commit c26e11c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
14 changes: 14 additions & 0 deletions app/routes/profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,18 @@ export default Route.extend(AuthenticatedRouteMixin, {
controller.send('updateEmailStatus', get(model, 'email'));
return this._super(controller, model);
},
actions: {
didTransition() {
//shows the zendesk widget if prev loaded
if (window.zE && typeof window.zE.show === "function") {
window.zE.show();
}
},
willTransition() {
//hide the zendesk Widget
if (window.zE && typeof window.zE.hide === "function") {
window.zE.hide();
}
}
}
});
11 changes: 11 additions & 0 deletions app/templates/profile.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
<!-- Start of nypublicradio Zendesk Widget script -->
<script type="text/javascript">
window.zESettings = {
webWidget: {
offset: { vertical: '75px' }
}
};
</script>
<script id="ze-snippet" src="https://static.zdassets.com/ekr/snippet.js?key=4e99cf72-9408-4ac4-8092-69ac6f3541c8"> </script>
<!-- End of nypublicradio Zendesk Widget script -->

<div class="l-constrained account-info">
<h2 class="account-header">
<div class="account-avatar">
Expand Down

0 comments on commit c26e11c

Please sign in to comment.