Assignee change from the board is now a popover

This commit is contained in:
Frédéric Guillot
2014-05-17 20:25:25 -04:00
parent f9c24f3c2c
commit aed7fb5cf5
5 changed files with 78 additions and 12 deletions

View File

@@ -14,6 +14,19 @@
}
});
// Open assignee popover
$(".task-user a").click(function(e) {
e.preventDefault();
e.stopPropagation();
var taskId = $(this).parent().parent().attr("data-task-id");
$.get("?controller=board&action=assign&task_id=" + taskId, function(data) {
popover_show(data);
});
});
// Redirect to the task details page
$("[data-task-id]").each(function() {
$(this).click(function() {
@@ -137,6 +150,20 @@
});
}
// Show popup
function popover_show(content)
{
$("body").append('<div id="popover-container"><div id="popover-content">' + content + '</div></div>');
$("#popover-container").click(function() {
$(this).remove();
});
$("#popover-content").click(function(e) {
e.stopPropagation();
});
}
// Initialization
$(function() {
board_load_events();