Add a "Me" button to assignee form element
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -329,3 +329,9 @@ div.color-square-selected {
|
||||
height: 28px;
|
||||
box-shadow: 3px 2px 10px 0 rgba(180,180,180,0.9);
|
||||
}
|
||||
|
||||
/* Assign to me */
|
||||
.assign-me {
|
||||
font-size: 0.8em;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -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);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user