maillist.html 2.5 KB

1234567891011121314151617181920212223242526272829303132
  1. <!-- <div class="fadeIn" style="position: absolute; top: 5pt; left: 0; right: 0; height: 10pt"></div> -->
  2. {{range .}}
  3. <div id="mail{{.Id}}" class="mailHeaderContainer {{if .Read}}read{{else}}unread{{end}}" style="position: relative;" onmouseover="$('#mailControlPanel{{.Id}}').show()" onmouseout="$('#mailControlPanel{{.Id}}').hide()" onclick="mailOpen('{{.Id}}');">
  4. <div class="mailHeader noselect">
  5. <div style="display: block; margin: 10px 12px;">
  6. <label class="cbox" onclick="event.stopPropagation();">
  7. <input type="checkbox" id="mailCheckbox{{.Id}}" onclick="toggleMailSelection('{{.Id}}'); event.stopPropagation(); return true;">
  8. <span></span>
  9. </label>
  10. </div>
  11. <div class="mailFrom elidedText noselect">{{.Mail.Header.From}}</div>
  12. <div class="mailSubject elidedText noselect">{{.Mail.Header.Subject}}</div>
  13. <div id="mailDate{{.Id}}" class="mailDate elidedText noselect"><script>localDate('mailDate{{.Id}}', {{.Mail.Header.Date}})</script></div>
  14. </div>
  15. {{if len .Mail.Body.Attachments}}
  16. <div class="noselect" style="display: flex; flex-direction: row; margin-bottom: 10px;">
  17. <img id="attachementIcon" style="width: 20px; margin-left: 60px; margin-right: 10px;" src="/assets/attachments.svg"/>
  18. {{range .Mail.Body.Attachments}}
  19. <div class="listAttachment" onclick="downloadAttachment({{.Id}}, {{.FileName}}); event.stopPropagation(); return false;">{{.FileName}}</div>
  20. {{end}}
  21. </div>
  22. {{end}}
  23. <div id="mailControlPanel{{.Id}}" class="mailControlPanel">
  24. <div style="width: 100%; height: 100%; display: flex; flex-direction: row;">
  25. <img id="readListIcon{{.Id}}" class="iconBtn" style="width: 20px; margin-left: 40px; margin-right: 10px;" onclick="toggleRead('{{.Id}}'); event.stopPropagation(); return false;" src="/assets/{{if .Read}}read{{else}}unread{{end}}.svg"/>
  26. <img id="restoreListIcon{{.Id}}" class="iconBtn" style="display: none; width: 24px; margin: auto 10px auto 0; height: 24px; flex: 0 1 auto;" onclick="restoreMail({{.Id}}, closeDetails); event.stopPropagation(); return false;" src="/assets/restore.svg"/>
  27. <img id="deleteListIcon" class="iconBtn" style="width: 20px; margin-right: 10px;" onclick="removeMail({{.Id}}, function(){}); event.stopPropagation(); return false;" src="/assets/remove.svg"/>
  28. </div>
  29. </div>
  30. </div>
  31. {{end}}
  32. <!-- <div class="fadeOut" style="position: absolute; bottom: 5pt; left: 0; right: 0; height:10pt"></div> -->