aboutsummaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
Diffstat (limited to 'assets')
-rw-r--r--assets/interactive.js19
-rw-r--r--assets/styles.css5
2 files changed, 22 insertions, 2 deletions
diff --git a/assets/interactive.js b/assets/interactive.js
index 05b7556..404cc26 100644
--- a/assets/interactive.js
+++ b/assets/interactive.js
@@ -102,7 +102,7 @@ $(function () {
this.set_visible(false);
return;
}
-
+
this.get_suggestions(input_text, function (suggestions) {
console.log(suggestions);
suggestions = Array.prototype.slice.call(suggestions, 0);
@@ -289,5 +289,20 @@ $(function () {
$("button.confirm").on("click", function (ev) {
if (!window.confirm($(this).data("question")))
ev.preventDefault();
- })
+ });
+
+ function updateAttachmentDeletionClass(tr) {
+ tr = $(tr);
+ tr.toggleClass("delete", tr.find(".attachment-delete-checkbox")[0].checked);
+ }
+
+ function attachmentDeleteCheckbox(tr) {
+ $(tr).each(function () {
+ updateAttachmentDeletionClass(this);
+ }).find(".attachment-delete-checkbox").on("change", function () {
+ updateAttachmentDeletionClass($(this).closest("tr"));
+ });
+ }
+
+ attachmentDeleteCheckbox($(".attachments tbody tr"));
}); \ No newline at end of file
diff --git a/assets/styles.css b/assets/styles.css
index b9fca4d..3008b4e 100644
--- a/assets/styles.css
+++ b/assets/styles.css
@@ -229,4 +229,9 @@ input:placeholder-shown {
.autocomplete-root:not(.show-suggestions) ul {
display: none;
+}
+
+.attachments .delete {
+ font-style: italic;
+ text-decoration: line-through;
} \ No newline at end of file