Browse Source

Improve reminders dashboard display

Neal Wilson 7 years ago
parent
commit
ee46695240
2 changed files with 26 additions and 5 deletions
  1. 8
    0
      config/Scripts/dashboard.css
  2. 18
    5
      config/Windows/navigation.xml

+ 8
- 0
config/Scripts/dashboard.css View File

93
     margin: 0;
93
     margin: 0;
94
     padding: 0;
94
     padding: 0;
95
 }
95
 }
96
+
97
+a {
98
+    text-decoration: none;
99
+}
100
+
101
+.reminder {
102
+    margin-bottom: 4px;
103
+}

+ 18
- 5
config/Windows/navigation.xml View File

618
                     so += 1;
618
                     so += 1;
619
                 }
619
                 }
620
             });
620
             });
621
-            if(c > 0 || s > 0) {
621
+            if(c > 0 || so > 0) {
622
                 output.writeStartElement("a");
622
                 output.writeStartElement("a");
623
                 output.writeAttribute("href", "typica://script/reminders");
623
                 output.writeAttribute("href", "typica://script/reminders");
624
                 startCell(output, TTR("navwindow", "Reminders"));
624
                 startCell(output, TTR("navwindow", "Reminders"));
626
                 var summaryText;
626
                 var summaryText;
627
                 if(c > 0) {
627
                 if(c > 0) {
628
                     summaryText = "" + c + TTR("navwindow", " reminders due");
628
                     summaryText = "" + c + TTR("navwindow", " reminders due");
629
+                    for(var i = 0; i < c; i++) {
630
+                        output.writeStartElement("div");
631
+                        output.writeAttribute("class", "reminder");
632
+                        output.writeTextElement("p", s[i].title);
633
+                        output.writeTextElement("p", Math.floor(s[i].completion * 100) + "%");
634
+                        output.writeTextElement("p", s[i].detail);
635
+                        output.writeEndElement();
636
+                    }
629
                 } else {
637
                 } else {
630
-                    summaryText = "" + s + TTR("navwindow", " reminders due soon");
638
+                    summaryText = "" + so + TTR("navwindow", " reminders due soon");
639
+                    for(var i = 0; i < so; i++) {
640
+                        output.writeStartElement("div");
641
+                        output.writeAttribute("class", "reminder");
642
+                        output.writeTextElement("p", s[i].title);
643
+                        output.writeTextElement("p", Math.floor(s[i].completion * 100) + "%");
644
+                        output.writeTextElement("p", s[i].detail);
645
+                        output.writeEndElement();
646
+                    }
631
                 }
647
                 }
632
-                output.writeTextElement("p", s[0].title);
633
-                output.writeTextElement("p", Math.floor(s[0].completion * 100) + "%");
634
-                output.writeTextElement("p", s[0].detail);
635
                 endStage(output);
648
                 endStage(output);
636
                 endCell(output, summaryText);
649
                 endCell(output, summaryText);
637
                 output.writeEndElement();
650
                 output.writeEndElement();

Loading…
Cancel
Save