summaryrefslogtreecommitdiff
path: root/assets/js
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-05-17 20:25:25 -0400
committerFrédéric Guillot <fred@kanboard.net>2014-05-17 20:25:25 -0400
commitaed7fb5cf5b04b296689771e3337b19a4a281f55 (patch)
tree67277db536225b08215e15f3898cbc01522880e1 /assets/js
parentf9c24f3c2c46eccd18e70704c0e8767fa6023206 (diff)
Assignee change from the board is now a popover
Diffstat (limited to 'assets/js')
-rw-r--r--assets/js/board.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/assets/js/board.js b/assets/js/board.js
index 105641ef..1d936a27 100644
--- a/assets/js/board.js
+++ b/assets/js/board.js
@@ -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();