summaryrefslogtreecommitdiff
path: root/assets/js/src/Task.js
diff options
context:
space:
mode:
Diffstat (limited to 'assets/js/src/Task.js')
-rw-r--r--assets/js/src/Task.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/assets/js/src/Task.js b/assets/js/src/Task.js
index b3dc1b63..75087a40 100644
--- a/assets/js/src/Task.js
+++ b/assets/js/src/Task.js
@@ -7,4 +7,15 @@ Task.prototype.listen = function() {
$(this).addClass("color-square-selected");
$("#form-color_id").val($(this).data("color-id"));
});
+
+ $(document).on("click", ".assign-me", function(e) {
+ e.preventDefault();
+
+ var currentId = $(this).data("current-id");
+ var dropdownId = "#" + $(this).data("target-id");
+
+ if ($(dropdownId + ' option[value=' + currentId + ']').length) {
+ $(dropdownId).val(currentId);
+ }
+ });
};