Add auto-hide/show magic to message recipients field when viewing

This commit is contained in:
Lance Edgar 2016-05-01 14:57:41 -05:00
parent f3cab67aaf
commit 70a2f10c81
2 changed files with 29 additions and 0 deletions

View file

@ -4,6 +4,10 @@
<%def name="head_tags()">
${parent.head_tags()}
<style type="text/css">
.field-wrapper.recipients .everyone {
cursor: pointer;
display: none;
}
.message-tools {
margin-bottom: 15px;
}
@ -11,12 +15,31 @@
border-top: 1px solid black;
border-bottom: 1px solid black;
margin-bottom: 15px;
padding: 0 5em;
white-space: pre-line;
}
.message-body p {
margin-bottom: 15px;
}
</style>
<script type="text/javascript">
$(function() {
$('.field-wrapper.recipients .more').click(function() {
$(this).hide();
$(this).siblings('.everyone').css('display', 'inline-block');
return false;
});
$('.field-wrapper.recipients .everyone').click(function() {
$(this).hide();
$(this).siblings('.more').show();
});
});
</script>
</%def>
<%def name="context_menu_items()">