Add a "Me" button to assignee form element

This commit is contained in:
Frederic Guillot
2016-01-31 11:05:47 -05:00
parent 3279768c1c
commit 9570793f68
34 changed files with 83 additions and 9 deletions

View File

@@ -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);
}
});
};