Typica is a free program for professional coffee roasters. https://typica.us
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

reminders.js 784B

1234567891011121314151617181920212223
  1. e.forEach(function(item) {
  2. var element = document.createElement("a");
  3. element.href="typica://script/" + item.dbid
  4. var colordiv;
  5. if(item.completion >= 1)
  6. {
  7. colordiv = '<div class="red"></div>';
  8. }
  9. else
  10. {
  11. colordiv = '<div class="orange"></div>';
  12. }
  13. if(item.completion < 0.6)
  14. {
  15. colordiv = '<div class="yellow"></div>';
  16. }
  17. if(item.completion < 0.3)
  18. {
  19. colordiv = '<div class="green"></div>';
  20. }
  21. element.innerHTML = '<div class="reminder">' + colordiv + '<span class="title">' + item.title + '</span><span class="progress">' + Math.floor(item.completion * 100) + '%</span><span class="detail">' + item.detail + '</span><div class="clearfix"></div></div>';
  22. document.body.appendChild(element);
  23. })